* [PATCH v2] s390/tape: Use bitwise instead of arithmetic operator for flags
@ 2022-03-15 8:53 Haowen Bai
2022-03-16 18:48 ` Heiko Carstens
0 siblings, 1 reply; 2+ messages in thread
From: Haowen Bai @ 2022-03-15 8:53 UTC (permalink / raw)
To: hca, gor, agordeev; +Cc: linux-s390, linux-kernel, Haowen Bai
This silences the following coccinelle warning:
drivers/s390/char/tape_34xx.c:360:38-39: WARNING: sum of probable bitmasks, consider |
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
drivers/s390/char/tape_34xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c
index 7ada994..487ad2d 100644
--- a/drivers/s390/char/tape_34xx.c
+++ b/drivers/s390/char/tape_34xx.c
@@ -354,10 +354,10 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
if ((
sense[0] == SENSE_DATA_CHECK ||
sense[0] == SENSE_EQUIPMENT_CHECK ||
- sense[0] == SENSE_EQUIPMENT_CHECK + SENSE_DEFERRED_UNIT_CHECK
+ sense[0] == (SENSE_EQUIPMENT_CHECK | SENSE_DEFERRED_UNIT_CHECK)
) && (
sense[1] == SENSE_DRIVE_ONLINE ||
- sense[1] == SENSE_BEGINNING_OF_TAPE + SENSE_WRITE_MODE
+ sense[1] == (SENSE_BEGINNING_OF_TAPE | SENSE_WRITE_MODE)
)) {
switch (request->op) {
/*
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] s390/tape: Use bitwise instead of arithmetic operator for flags
2022-03-15 8:53 [PATCH v2] s390/tape: Use bitwise instead of arithmetic operator for flags Haowen Bai
@ 2022-03-16 18:48 ` Heiko Carstens
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Carstens @ 2022-03-16 18:48 UTC (permalink / raw)
To: Haowen Bai; +Cc: gor, agordeev, linux-s390, linux-kernel
On Tue, Mar 15, 2022 at 04:53:41PM +0800, Haowen Bai wrote:
> This silences the following coccinelle warning:
> drivers/s390/char/tape_34xx.c:360:38-39: WARNING: sum of probable bitmasks, consider |
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
> drivers/s390/char/tape_34xx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-16 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15 8:53 [PATCH v2] s390/tape: Use bitwise instead of arithmetic operator for flags Haowen Bai
2022-03-16 18:48 ` Heiko Carstens
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.