From: kernel test robot <lkp@intel.com>
To: Richard chien <m8809301@gmail.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: oe-kbuild-all@lists.linux.dev, jesse.brandeburg@intel.com,
anthony.l.nguyen@intel.com, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Richard chien <richard.chien@hpe.com>
Subject: Re: [PATCH] igb: Add support for firmware update
Date: Mon, 10 Jun 2024 14:55:15 +0800 [thread overview]
Message-ID: <202406101404.oWWqbJmG-lkp@intel.com> (raw)
In-Reply-To: <20240609081526.5621-1-richard.chien@hpe.com>
Hi Richard,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tnguy-next-queue/dev-queue]
[also build test WARNING on tnguy-net-queue/dev-queue linus/master v6.10-rc3 next-20240607]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Richard-chien/igb-Add-support-for-firmware-update/20240609-162047
base: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git dev-queue
patch link: https://lore.kernel.org/r/20240609081526.5621-1-richard.chien%40hpe.com
patch subject: [PATCH] igb: Add support for firmware update
config: alpha-randconfig-r112-20240610 (https://download.01.org/0day-ci/archive/20240610/202406101404.oWWqbJmG-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240610/202406101404.oWWqbJmG-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406101404.oWWqbJmG-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/intel/igb/igb_ethtool.c:923:34: sparse: sparse: cast to restricted __le16
drivers/net/ethernet/intel/igb/igb_ethtool.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/stackdepot.h, ...):
include/linux/page-flags.h:240:46: sparse: sparse: self-comparison always evaluates to false
include/linux/page-flags.h:240:46: sparse: sparse: self-comparison always evaluates to false
vim +923 drivers/net/ethernet/intel/igb/igb_ethtool.c
874
875 static int igb_get_eeprom(struct net_device *netdev,
876 struct ethtool_eeprom *eeprom, u8 *bytes)
877 {
878 struct igb_adapter *adapter = netdev_priv(netdev);
879 struct e1000_hw *hw = &adapter->hw;
880 u16 *eeprom_buff;
881 int first_word, last_word;
882 int ret_val = 0;
883 struct e1000_nvm_access *nvm;
884 u32 magic;
885 u16 i;
886
887 if (eeprom->len == 0)
888 return -EINVAL;
889
890 magic = hw->vendor_id | (hw->device_id << 16);
891 if (eeprom->magic && eeprom->magic != magic) {
892 nvm = (struct e1000_nvm_access *)eeprom;
893 ret_val = igb_nvmupd_command(hw, nvm, bytes);
894 return ret_val;
895 }
896
897 /* normal ethtool get_eeprom support */
898 eeprom->magic = hw->vendor_id | (hw->device_id << 16);
899
900 first_word = eeprom->offset >> 1;
901 last_word = (eeprom->offset + eeprom->len - 1) >> 1;
902
903 eeprom_buff = kmalloc(sizeof(u16) *
904 (last_word - first_word + 1), GFP_KERNEL);
905 if (!eeprom_buff)
906 return -ENOMEM;
907
908 if (hw->nvm.type == e1000_nvm_eeprom_spi)
909 ret_val = e1000_read_nvm(hw, first_word,
910 last_word - first_word + 1,
911 eeprom_buff);
912 else {
913 for (i = 0; i < last_word - first_word + 1; i++) {
914 ret_val = e1000_read_nvm(hw, first_word + i, 1,
915 &eeprom_buff[i]);
916 if (ret_val)
917 break;
918 }
919 }
920
921 /* Device's eeprom is always little-endian, word addressable */
922 for (i = 0; i < last_word - first_word + 1; i++)
> 923 eeprom_buff[i] = le16_to_cpu(eeprom_buff[i]);
924
925 memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 1),
926 eeprom->len);
927 kfree(eeprom_buff);
928
929 return ret_val;
930 }
931
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-06-10 6:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-09 8:15 [PATCH] igb: Add support for firmware update Richard chien
2024-06-09 13:22 ` Markus Elfring
2024-06-10 6:55 ` kernel test robot [this message]
2024-06-10 19:27 ` Andrew Lunn
2024-06-10 22:04 ` Jacob Keller
2024-06-11 7:55 ` Chien, Richard (Options Engineering)
2024-06-11 18:21 ` Jacob Keller
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=202406101404.oWWqbJmG-lkp@intel.com \
--to=lkp@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m8809301@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=richard.chien@hpe.com \
/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).