All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/ethernet/sfc/ef100.c:70 ef100_pci_parse_ef100_entry() warn: should '_ef100_pci_get_bar_bits_with_width(efx, entry_location, 67, 29) << 4' be a 64 bit type?
Date: Sat, 26 Jun 2021 00:36:17 +0800	[thread overview]
Message-ID: <202106260014.mn64D7TC-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3880 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Edward Cree <ecree@solarflare.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   44db63d1ad8d71c6932cbe007eb41f31c434d140
commit: 51b35a454efdcd86f578e61ec8bf7596299c5f80 sfc: skeleton EF100 PF driver
date:   11 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 11 months ago
config: i386-randconfig-m031-20210625 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/net/ethernet/sfc/ef100.c:70 ef100_pci_parse_ef100_entry() warn: should '_ef100_pci_get_bar_bits_with_width(efx, entry_location, 67, 29) << 4' be a 64 bit type?

Old smatch warnings:
drivers/net/ethernet/sfc/ef100.c:493 ef100_pci_probe() warn: missing error code 'rc'

vim +70 drivers/net/ethernet/sfc/ef100.c

51b35a454efdcd Edward Cree 2020-07-27  60  
51b35a454efdcd Edward Cree 2020-07-27  61  #define ef100_pci_get_bar_bits(efx, entry_location, bitdef)	\
51b35a454efdcd Edward Cree 2020-07-27  62  	_ef100_pci_get_bar_bits_with_width(efx, entry_location,	\
51b35a454efdcd Edward Cree 2020-07-27  63  		ESF_GZ_CFGBAR_ ## bitdef ## _LBN,		\
51b35a454efdcd Edward Cree 2020-07-27  64  		ESF_GZ_CFGBAR_ ## bitdef ## _WIDTH)
51b35a454efdcd Edward Cree 2020-07-27  65  
51b35a454efdcd Edward Cree 2020-07-27  66  static int ef100_pci_parse_ef100_entry(struct efx_nic *efx, int entry_location,
51b35a454efdcd Edward Cree 2020-07-27  67  				       struct ef100_func_ctl_window *result)
51b35a454efdcd Edward Cree 2020-07-27  68  {
51b35a454efdcd Edward Cree 2020-07-27  69  	u64 offset = ef100_pci_get_bar_bits(efx, entry_location, EF100_FUNC_CTL_WIN_OFF) <<
51b35a454efdcd Edward Cree 2020-07-27 @70  					ESE_GZ_EF100_FUNC_CTL_WIN_OFF_SHIFT;
51b35a454efdcd Edward Cree 2020-07-27  71  	u32 bar = ef100_pci_get_bar_bits(efx, entry_location, EF100_BAR);
51b35a454efdcd Edward Cree 2020-07-27  72  
51b35a454efdcd Edward Cree 2020-07-27  73  	netif_dbg(efx, probe, efx->net_dev,
51b35a454efdcd Edward Cree 2020-07-27  74  		  "Found EF100 function control window bar=%d offset=0x%llx\n",
51b35a454efdcd Edward Cree 2020-07-27  75  		  bar, offset);
51b35a454efdcd Edward Cree 2020-07-27  76  
51b35a454efdcd Edward Cree 2020-07-27  77  	if (result->valid) {
51b35a454efdcd Edward Cree 2020-07-27  78  		netif_err(efx, probe, efx->net_dev,
51b35a454efdcd Edward Cree 2020-07-27  79  			  "Duplicated EF100 table entry.\n");
51b35a454efdcd Edward Cree 2020-07-27  80  		return -EINVAL;
51b35a454efdcd Edward Cree 2020-07-27  81  	}
51b35a454efdcd Edward Cree 2020-07-27  82  
51b35a454efdcd Edward Cree 2020-07-27  83  	if (bar == ESE_GZ_CFGBAR_EF100_BAR_NUM_EXPANSION_ROM ||
51b35a454efdcd Edward Cree 2020-07-27  84  	    bar == ESE_GZ_CFGBAR_EF100_BAR_NUM_INVALID) {
51b35a454efdcd Edward Cree 2020-07-27  85  		netif_err(efx, probe, efx->net_dev,
51b35a454efdcd Edward Cree 2020-07-27  86  			  "Bad BAR value of %d in Xilinx capabilities EF100 entry.\n",
51b35a454efdcd Edward Cree 2020-07-27  87  			  bar);
51b35a454efdcd Edward Cree 2020-07-27  88  		return -EINVAL;
51b35a454efdcd Edward Cree 2020-07-27  89  	}
51b35a454efdcd Edward Cree 2020-07-27  90  
51b35a454efdcd Edward Cree 2020-07-27  91  	result->bar = bar;
51b35a454efdcd Edward Cree 2020-07-27  92  	result->offset = offset;
51b35a454efdcd Edward Cree 2020-07-27  93  	result->valid = true;
51b35a454efdcd Edward Cree 2020-07-27  94  	return 0;
51b35a454efdcd Edward Cree 2020-07-27  95  }
51b35a454efdcd Edward Cree 2020-07-27  96  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35751 bytes --]

                 reply	other threads:[~2021-06-25 16:36 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=202106260014.mn64D7TC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 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.