From: Samuel Zou <zou_wei@huawei.com>
To: <johannes.berg@intel.com>, <emmanuel.grumbach@intel.com>,
<luciano.coelho@intel.com>, <linuxwifi@intel.com>,
<kvalo@codeaurora.org>, <davem@davemloft.net>
Cc: <linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Samuel Zou <zou_wei@huawei.com>
Subject: [PATCH -next] iwlwifi: pcie: Use bitwise instead of arithmetic operator for flags
Date: Wed, 6 May 2020 11:07:03 +0800 [thread overview]
Message-ID: <1588734423-33988-1-git-send-email-zou_wei@huawei.com> (raw)
This silences the following coccinelle warning:
"WARNING: sum of probable bitmasks, consider |"
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Samuel Zou <zou_wei@huawei.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index a0daae0..6d9bf9f 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -109,9 +109,9 @@ void iwl_trans_pcie_dump_regs(struct iwl_trans *trans)
/* Alloc a max size buffer */
alloc_size = PCI_ERR_ROOT_ERR_SRC + 4 + PREFIX_LEN;
- alloc_size = max_t(u32, alloc_size, PCI_DUMP_SIZE + PREFIX_LEN);
- alloc_size = max_t(u32, alloc_size, PCI_MEM_DUMP_SIZE + PREFIX_LEN);
- alloc_size = max_t(u32, alloc_size, PCI_PARENT_DUMP_SIZE + PREFIX_LEN);
+ alloc_size = max_t(u32, alloc_size, PCI_DUMP_SIZE | PREFIX_LEN);
+ alloc_size = max_t(u32, alloc_size, PCI_MEM_DUMP_SIZE | PREFIX_LEN);
+ alloc_size = max_t(u32, alloc_size, PCI_PARENT_DUMP_SIZE | PREFIX_LEN);
buf = kmalloc(alloc_size, GFP_ATOMIC);
if (!buf)
--
2.6.2
next reply other threads:[~2020-05-06 3:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 3:07 Samuel Zou [this message]
2020-05-06 3:19 ` [PATCH -next] iwlwifi: pcie: Use bitwise instead of arithmetic operator for flags Joe Perches
2020-05-06 13:51 ` Luciano Coelho
2020-05-06 15:15 ` Joe Perches
2020-05-07 4:10 ` Samuel Zou
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=1588734423-33988-1-git-send-email-zou_wei@huawei.com \
--to=zou_wei@huawei.com \
--cc=davem@davemloft.net \
--cc=emmanuel.grumbach@intel.com \
--cc=johannes.berg@intel.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxwifi@intel.com \
--cc=luciano.coelho@intel.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).