mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: stefanr@s5r6.in-berlin.de
Cc: linux1394-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Subject: [PATCH] firewire: Use bitwise instead of arithmetic operator for flags
Date: Tue,  9 Mar 2021 15:11:39 +0800	[thread overview]
Message-ID: <1615273899-88446-1-git-send-email-jiapeng.chong@linux.alibaba.com> (raw)

Fix the following coccicheck warnings:

./drivers/firewire/core-device.c:973:22-23: WARNING: sum of probable
bitmasks, consider |.

./drivers/firewire/core-device.c:954:22-23: WARNING: sum of probable
bitmasks, consider |.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/firewire/core-device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index 6821698..e04832d 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -951,7 +951,7 @@ static void set_broadcast_channel(struct fw_device *device, int generation)
 	if (device->bc_implemented == BC_UNKNOWN) {
 		rcode = fw_run_transaction(card, TCODE_READ_QUADLET_REQUEST,
 				device->node_id, generation, device->max_speed,
-				CSR_REGISTER_BASE + CSR_BROADCAST_CHANNEL,
+				CSR_REGISTER_BASE | CSR_BROADCAST_CHANNEL,
 				&data, 4);
 		switch (rcode) {
 		case RCODE_COMPLETE:
@@ -970,7 +970,7 @@ static void set_broadcast_channel(struct fw_device *device, int generation)
 				   BROADCAST_CHANNEL_VALID);
 		fw_run_transaction(card, TCODE_WRITE_QUADLET_REQUEST,
 				device->node_id, generation, device->max_speed,
-				CSR_REGISTER_BASE + CSR_BROADCAST_CHANNEL,
+				CSR_REGISTER_BASE | CSR_BROADCAST_CHANNEL,
 				&data, 4);
 	}
 }
-- 
1.8.3.1


             reply	other threads:[~2021-03-09  7:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09  7:11 Jiapeng Chong [this message]
2021-03-14  9:20 ` Stefan Richter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1615273899-88446-1-git-send-email-jiapeng.chong@linux.alibaba.com \
    --to=jiapeng.chong@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=stefanr@s5r6.in-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®