From: kernel test robot <lkp@intel.com>
To: Edward Cree <ecree@solarflare.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/net/ethernet/sfc/ef100_rx.c:44:9-10: WARNING: return of 0/1 in function 'check_fcs' with return type bool
Date: Sat, 22 Aug 2020 09:23:01 +0800 [thread overview]
Message-ID: <202008220942.d5PcIZQ5%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2397 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f873db9acd3c92d4741bc3676c9eb511b2f9a6f6
commit: 8e57daf70671e482209b5d231a181f04845cf73e sfc_ef100: RX path for EF100
date: 3 weeks ago
config: i386-randconfig-c003-20200821 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/sfc/ef100_rx.c:44:9-10: WARNING: return of 0/1 in function 'check_fcs' with return type bool
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8e57daf70671e482209b5d231a181f04845cf73e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8e57daf70671e482209b5d231a181f04845cf73e
vim +/check_fcs +44 drivers/net/ethernet/sfc/ef100_rx.c
20
21 /* Get the value of a field in the RX prefix */
22 #define PREFIX_OFFSET_W(_f) (ESF_GZ_RX_PREFIX_ ## _f ## _LBN / 32)
23 #define PREFIX_OFFSET_B(_f) (ESF_GZ_RX_PREFIX_ ## _f ## _LBN % 32)
24 #define PREFIX_WIDTH_MASK(_f) ((1UL << ESF_GZ_RX_PREFIX_ ## _f ## _WIDTH) - 1)
25 #define PREFIX_WORD(_p, _f) le32_to_cpu((__force __le32)(_p)[PREFIX_OFFSET_W(_f)])
26 #define PREFIX_FIELD(_p, _f) ((PREFIX_WORD(_p, _f) >> PREFIX_OFFSET_B(_f)) & \
27 PREFIX_WIDTH_MASK(_f))
28
29 #define ESF_GZ_RX_PREFIX_NT_OR_INNER_L3_CLASS_LBN \
30 (ESF_GZ_RX_PREFIX_CLASS_LBN + ESF_GZ_RX_PREFIX_HCLASS_NT_OR_INNER_L3_CLASS_LBN)
31 #define ESF_GZ_RX_PREFIX_NT_OR_INNER_L3_CLASS_WIDTH \
32 ESF_GZ_RX_PREFIX_HCLASS_NT_OR_INNER_L3_CLASS_WIDTH
33
34 static bool check_fcs(struct efx_channel *channel, u32 *prefix)
35 {
36 u16 rxclass;
37 u8 l2status;
38
39 rxclass = le16_to_cpu((__force __le16)PREFIX_FIELD(prefix, CLASS));
40 l2status = PREFIX_FIELD(&rxclass, HCLASS_L2_STATUS);
41
42 if (likely(l2status == ESE_GZ_RH_HCLASS_L2_STATUS_OK))
43 /* Everything is ok */
> 44 return 0;
45
46 if (l2status == ESE_GZ_RH_HCLASS_L2_STATUS_FCS_ERR)
47 channel->n_rx_eth_crc_err++;
48 return 1;
49 }
50
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34260 bytes --]
reply other threads:[~2020-08-22 1:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202008220942.d5PcIZQ5%lkp@intel.com \
--to=lkp@intel.com \
--cc=ecree@solarflare.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®