All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Zhu Lingshan <lingshan.zhu@intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [ls-zhu:shared_irq_v4 3/3] drivers/vdpa/ifcvf/ifcvf_main.c:94:6: warning: variable 'max_intr' set but not used
Date: Wed, 16 Feb 2022 21:58:11 +0800	[thread overview]
Message-ID: <202202162136.H3NDPxQe-lkp@intel.com> (raw)

tree:   https://github.com/ls-zhu/linux shared_irq_v4
head:   25e932e005734a4b8924e41bbedafa9dd394aead
commit: 25e932e005734a4b8924e41bbedafa9dd394aead [3/3] vDPA/ifcvf: implement device MSIX vector allocator
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220216/202202162136.H3NDPxQe-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0e628a783b935c70c80815db6c061ec84f884af5)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/ls-zhu/linux/commit/25e932e005734a4b8924e41bbedafa9dd394aead
        git remote add ls-zhu https://github.com/ls-zhu/linux
        git fetch --no-tags ls-zhu shared_irq_v4
        git checkout 25e932e005734a4b8924e41bbedafa9dd394aead
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/vdpa/ifcvf/

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

All warnings (new ones prefixed by >>):

>> drivers/vdpa/ifcvf/ifcvf_main.c:94:6: warning: variable 'max_intr' set but not used [-Wunused-but-set-variable]
           u16 max_intr;
               ^
   1 warning generated.


vim +/max_intr +94 drivers/vdpa/ifcvf/ifcvf_main.c

    88	
    89	static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
    90	{
    91		struct pci_dev *pdev = adapter->pdev;
    92		struct ifcvf_hw *vf = &adapter->vf;
    93		int vector, nvectors, i, ret, irq;
  > 94		u16 max_intr;
    95	
    96		nvectors = ifcvf_alloc_vectors(adapter);
    97		if (nvectors <=0)
    98			return nvectors;
    99	
   100		max_intr = vf->nr_vring + 1;
   101		snprintf(vf->config_msix_name, 256, "ifcvf[%s]-config\n",
   102			 pci_name(pdev));
   103		vector = 0;
   104		vf->config_irq = pci_irq_vector(pdev, vector);
   105		ret = devm_request_irq(&pdev->dev, vf->config_irq,
   106				       ifcvf_config_changed, 0,
   107				       vf->config_msix_name, vf);
   108		if (ret) {
   109			IFCVF_ERR(pdev, "Failed to request config irq\n");
   110			return ret;
   111		}
   112	
   113		for (i = 0; i < vf->nr_vring; i++) {
   114			snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n",
   115				 pci_name(pdev), i);
   116			vector = i + IFCVF_MSI_QUEUE_OFF;
   117			irq = pci_irq_vector(pdev, vector);
   118			ret = devm_request_irq(&pdev->dev, irq,
   119					       ifcvf_intr_handler, 0,
   120					       vf->vring[i].msix_name,
   121					       &vf->vring[i]);
   122			if (ret) {
   123				IFCVF_ERR(pdev,
   124					  "Failed to request irq for vq %d\n", i);
   125				ifcvf_free_irq(adapter, i);
   126	
   127				return ret;
   128			}
   129	
   130			vf->vring[i].irq = irq;
   131		}
   132	
   133		return 0;
   134	}
   135	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [ls-zhu:shared_irq_v4 3/3] drivers/vdpa/ifcvf/ifcvf_main.c:94:6: warning: variable 'max_intr' set but not used
Date: Wed, 16 Feb 2022 21:58:11 +0800	[thread overview]
Message-ID: <202202162136.H3NDPxQe-lkp@intel.com> (raw)

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

tree:   https://github.com/ls-zhu/linux shared_irq_v4
head:   25e932e005734a4b8924e41bbedafa9dd394aead
commit: 25e932e005734a4b8924e41bbedafa9dd394aead [3/3] vDPA/ifcvf: implement device MSIX vector allocator
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220216/202202162136.H3NDPxQe-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0e628a783b935c70c80815db6c061ec84f884af5)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/ls-zhu/linux/commit/25e932e005734a4b8924e41bbedafa9dd394aead
        git remote add ls-zhu https://github.com/ls-zhu/linux
        git fetch --no-tags ls-zhu shared_irq_v4
        git checkout 25e932e005734a4b8924e41bbedafa9dd394aead
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/vdpa/ifcvf/

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

All warnings (new ones prefixed by >>):

>> drivers/vdpa/ifcvf/ifcvf_main.c:94:6: warning: variable 'max_intr' set but not used [-Wunused-but-set-variable]
           u16 max_intr;
               ^
   1 warning generated.


vim +/max_intr +94 drivers/vdpa/ifcvf/ifcvf_main.c

    88	
    89	static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
    90	{
    91		struct pci_dev *pdev = adapter->pdev;
    92		struct ifcvf_hw *vf = &adapter->vf;
    93		int vector, nvectors, i, ret, irq;
  > 94		u16 max_intr;
    95	
    96		nvectors = ifcvf_alloc_vectors(adapter);
    97		if (nvectors <=0)
    98			return nvectors;
    99	
   100		max_intr = vf->nr_vring + 1;
   101		snprintf(vf->config_msix_name, 256, "ifcvf[%s]-config\n",
   102			 pci_name(pdev));
   103		vector = 0;
   104		vf->config_irq = pci_irq_vector(pdev, vector);
   105		ret = devm_request_irq(&pdev->dev, vf->config_irq,
   106				       ifcvf_config_changed, 0,
   107				       vf->config_msix_name, vf);
   108		if (ret) {
   109			IFCVF_ERR(pdev, "Failed to request config irq\n");
   110			return ret;
   111		}
   112	
   113		for (i = 0; i < vf->nr_vring; i++) {
   114			snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n",
   115				 pci_name(pdev), i);
   116			vector = i + IFCVF_MSI_QUEUE_OFF;
   117			irq = pci_irq_vector(pdev, vector);
   118			ret = devm_request_irq(&pdev->dev, irq,
   119					       ifcvf_intr_handler, 0,
   120					       vf->vring[i].msix_name,
   121					       &vf->vring[i]);
   122			if (ret) {
   123				IFCVF_ERR(pdev,
   124					  "Failed to request irq for vq %d\n", i);
   125				ifcvf_free_irq(adapter, i);
   126	
   127				return ret;
   128			}
   129	
   130			vf->vring[i].irq = irq;
   131		}
   132	
   133		return 0;
   134	}
   135	

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

             reply	other threads:[~2022-02-16 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16 13:58 kernel test robot [this message]
2022-02-16 13:58 ` [ls-zhu:shared_irq_v4 3/3] drivers/vdpa/ifcvf/ifcvf_main.c:94:6: warning: variable 'max_intr' set but not used kernel test robot

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=202202162136.H3NDPxQe-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=lingshan.zhu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@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 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.