Thread (2 messages) 2 messages, 2 authors, 2020-11-12

Re: [PATCH] fixup! can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2020-11-12 01:56:16

On 7/30/20 10:40 AM, Dmitry Dunaev wrote:
can: mscan: mscan_rx_poll(): fix void function return result check

Last operation in mscan_rx_poll() check result of calling napi_complete_done()
function which has void type. So some compilers (like riscv32-unknown-linux-gnu-gcc)
raises error on this line.
Since commit:

    364b6055738b net: busy-poll:
                 return busypolling status to drivers

the function napi_complete_done() is bool, that was in v4.10-rc1~202^2~255^2~2.
quoted hunk
According to 'likely' compiler option and network api usage this check is removed.

Signed-off-by: Dmitry Dunaev <redacted>
---
 drivers/net/can/mscan/mscan.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c
index 99101d7027a8..e06ae5888358 100644
--- a/drivers/net/can/mscan/mscan.c
+++ b/drivers/net/can/mscan/mscan.c
@@ -412,11 +412,10 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota)
         }
 
         if (work_done < quota) {
-               if (likely(napi_complete_done(&priv->napi, work_done))) {
This "likely(napi_complete_done())" was introduced in:

    2d77bd61a292 can: mscan: mscan_rx_poll():
    fix rx path lockup when returning from polling to irq mode

which is v5.5-rc6~23^2~35^2.

Are you using a kernel older than v4.10?

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help