Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, llvm@lists.linux.dev
Subject: drivers/staging/gpib/eastwood/fluke_gpib.c:196:23: warning: variable 'nec_priv' set but not used
Date: Wed, 8 Jan 2025 22:59:09 +0800	[thread overview]
Message-ID: <202501082213.4JCKIepk-lkp@intel.com> (raw)

CC: linux-kernel@vger.kernel.org
TO: Dave Penkler <dpenkler@gmail.com>

Hi Dave,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   09a0fa92e5b45e99cf435b2fbf5ebcf889cf8780
commit: 165e8cc3cfec9ef51f3376b0d49b115294f34f3b staging: gpib: Add KBUILD files for GPIB drivers
date:   3 months ago
config: arm-randconfig-003-20250105 (https://download.01.org/0day-ci/archive/20250108/202501082213.4JCKIepk-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 096551537b2a747a3387726ca618ceeb3950e9bc)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250108/202501082213.4JCKIepk-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/202501082213.4JCKIepk-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/staging/gpib/eastwood/fluke_gpib.c:10:
   In file included from drivers/staging/gpib/eastwood/fluke_gpib.h:9:
   In file included from include/linux/dmaengine.h:12:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/staging/gpib/eastwood/fluke_gpib.c:196:23: warning: variable 'nec_priv' set but not used [-Wunused-but-set-variable]
     196 |         struct nec7210_priv *nec_priv;
         |                              ^
   2 warnings generated.
--
   In file included from drivers/staging/gpib/nec7210/nec7210.c:14:
   In file included from include/linux/pci.h:2676:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/staging/gpib/nec7210/nec7210.c:940:16: warning: variable 'command' set but not used [-Wunused-but-set-variable]
     940 |                 unsigned int command;
         |                              ^
>> drivers/staging/gpib/nec7210/nec7210.c:1000:23: warning: bitwise operation between different enumeration types ('enum auxmr_bits' and 'enum ppr_bits') [-Wenum-enum-conversion]
    1000 |         write_byte(priv, PPR | HR_PPU, AUXMR);
         |                          ~~~ ^ ~~~~~~
>> drivers/staging/gpib/nec7210/nec7210.c:1004:26: warning: bitwise operation between different enumeration types ('enum auxmr_bits' and 'enum auxra_bits') [-Wenum-enum-conversion]
    1004 |         priv->auxa_bits = AUXRA | HR_HLDA;
         |                           ~~~~~ ^ ~~~~~~~
>> drivers/staging/gpib/nec7210/nec7210.c:1010:26: warning: bitwise operation between different enumeration types ('enum auxmr_bits' and 'enum auxrb_bits') [-Wenum-enum-conversion]
    1010 |         priv->auxb_bits = AUXRB | HR_CPTE;
         |                           ~~~~~ ^ ~~~~~~~
   5 warnings generated.


vim +/nec_priv +196 drivers/staging/gpib/eastwood/fluke_gpib.c

55936779f49612 Dave Penkler 2024-09-18  190  
55936779f49612 Dave Penkler 2024-09-18  191  static int fluke_line_status(const gpib_board_t *board)
55936779f49612 Dave Penkler 2024-09-18  192  {
55936779f49612 Dave Penkler 2024-09-18  193  	int status = ValidALL;
55936779f49612 Dave Penkler 2024-09-18  194  	int bsr_bits;
55936779f49612 Dave Penkler 2024-09-18  195  	struct fluke_priv *e_priv;
55936779f49612 Dave Penkler 2024-09-18 @196  	struct nec7210_priv *nec_priv;
55936779f49612 Dave Penkler 2024-09-18  197  
55936779f49612 Dave Penkler 2024-09-18  198  	e_priv = board->private_data;
55936779f49612 Dave Penkler 2024-09-18  199  	nec_priv = &e_priv->nec7210_priv;
55936779f49612 Dave Penkler 2024-09-18  200  
55936779f49612 Dave Penkler 2024-09-18  201  	bsr_bits = fluke_paged_read_byte(e_priv, BUS_STATUS, BUS_STATUS_PAGE);
55936779f49612 Dave Penkler 2024-09-18  202  
55936779f49612 Dave Penkler 2024-09-18  203  	if ((bsr_bits & BSR_REN_BIT) == 0)
55936779f49612 Dave Penkler 2024-09-18  204  		status |= BusREN;
55936779f49612 Dave Penkler 2024-09-18  205  	if ((bsr_bits & BSR_IFC_BIT) == 0)
55936779f49612 Dave Penkler 2024-09-18  206  		status |= BusIFC;
55936779f49612 Dave Penkler 2024-09-18  207  	if ((bsr_bits & BSR_SRQ_BIT) == 0)
55936779f49612 Dave Penkler 2024-09-18  208  		status |= BusSRQ;
55936779f49612 Dave Penkler 2024-09-18  209  	if ((bsr_bits & BSR_EOI_BIT) == 0)
55936779f49612 Dave Penkler 2024-09-18  210  		status |= BusEOI;
55936779f49612 Dave Penkler 2024-09-18  211  	if ((bsr_bits & BSR_NRFD_BIT) == 0)
55936779f49612 Dave Penkler 2024-09-18  212  		status |= BusNRFD;
55936779f49612 Dave Penkler 2024-09-18  213  	if ((bsr_bits & BSR_NDAC_BIT) == 0)
55936779f49612 Dave Penkler 2024-09-18  214  		status |= BusNDAC;
55936779f49612 Dave Penkler 2024-09-18  215  	if ((bsr_bits & BSR_DAV_BIT) == 0)
55936779f49612 Dave Penkler 2024-09-18  216  		status |= BusDAV;
55936779f49612 Dave Penkler 2024-09-18  217  	if ((bsr_bits & BSR_ATN_BIT) == 0)
55936779f49612 Dave Penkler 2024-09-18  218  		status |= BusATN;
55936779f49612 Dave Penkler 2024-09-18  219  
55936779f49612 Dave Penkler 2024-09-18  220  	return status;
55936779f49612 Dave Penkler 2024-09-18  221  }
55936779f49612 Dave Penkler 2024-09-18  222  

:::::: The code at line 196 was first introduced by commit
:::::: 55936779f4961299efa99a6843c8ff3b019d3858 staging: gpib: Add Fluke cda based cards GPIB driver

:::::: TO: Dave Penkler <dpenkler@gmail.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-01-08 14:59 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=202501082213.4JCKIepk-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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