* [PATCH] liquidio CN23XX: check if PENDING bit is clear using logical and
@ 2016-11-18 18:45 Colin King
2016-11-18 19:04 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2016-11-18 18:45 UTC (permalink / raw)
To: Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi, netdev
Cc: linux-kernel
From: Colin Ian King <colin.king@canonical.com>
the mbox state should be bitwise anded rather than logically anded
with OCTEON_MBOX_STATE_RESPONSE_PENDING. Fix this by using the
correct & operator instead of &&.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c b/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c
index 5309384..73696b42 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c
@@ -301,7 +301,7 @@ int octeon_mbox_process_message(struct octeon_mbox *mbox)
sizeof(struct octeon_mbox_cmd));
if (!mbox_cmd.msg.s.resp_needed) {
mbox->state &= ~OCTEON_MBOX_STATE_REQUEST_RECEIVED;
- if (!(mbox->state &&
+ if (!(mbox->state &
OCTEON_MBOX_STATE_RESPONSE_PENDING))
mbox->state = OCTEON_MBOX_STATE_IDLE;
writeq(OCTEON_PFVFSIG, mbox->mbox_read_reg);
--
2.10.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] liquidio CN23XX: check if PENDING bit is clear using logical and
2016-11-18 18:45 [PATCH] liquidio CN23XX: check if PENDING bit is clear using logical and Colin King
@ 2016-11-18 19:04 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-11-18 19:04 UTC (permalink / raw)
To: colin.king
Cc: derek.chickles, satananda.burla, felix.manlunas, raghu.vatsavayi,
netdev, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Fri, 18 Nov 2016 18:45:32 +0000
> From: Colin Ian King <colin.king@canonical.com>
>
> the mbox state should be bitwise anded rather than logically anded
> with OCTEON_MBOX_STATE_RESPONSE_PENDING. Fix this by using the
> correct & operator instead of &&.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Dan Carpenter already submitted a fix for this.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-18 19:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18 18:45 [PATCH] liquidio CN23XX: check if PENDING bit is clear using logical and Colin King
2016-11-18 19:04 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.