mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Michael Shych <michaelsh@nvidia.com>
Cc: kbuild-all@lists.01.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Hans de Goede <hdegoede@redhat.com>,
	linux-kernel@vger.kernel.org, Vadim Pasternak <vadimp@nvidia.com>
Subject: [pdx86-platform-drivers-x86:review-hans 40/59] drivers/platform/mellanox/nvsw-sn2201.c:942:16: warning: variable 'j' set but not used
Date: Thu, 12 May 2022 02:50:40 +0800	[thread overview]
Message-ID: <202205120232.oCAO8rb3-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-hans
head:   57709a27d9744f5af4bbeec3ba3105c6aa1075eb
commit: 9e267f050444fa018c9a06b0cc07effac084b920 [40/59] platform/mellanox: Add support for new SN2201 system
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220512/202205120232.oCAO8rb3-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.3.0
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://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?id=9e267f050444fa018c9a06b0cc07effac084b920
        git remote add pdx86-platform-drivers-x86 https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
        git fetch --no-tags pdx86-platform-drivers-x86 review-hans
        git checkout 9e267f050444fa018c9a06b0cc07effac084b920
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/platform/mellanox/

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/platform/mellanox/nvsw-sn2201.c: In function 'nvsw_sn2201_config_post_init':
>> drivers/platform/mellanox/nvsw-sn2201.c:942:16: warning: variable 'j' set but not used [-Wunused-but-set-variable]
     942 |         int i, j, err;
         |                ^


vim +/j +942 drivers/platform/mellanox/nvsw-sn2201.c

   936	
   937	static int nvsw_sn2201_config_post_init(struct nvsw_sn2201 *nvsw_sn2201)
   938	{
   939		struct mlxreg_hotplug_device *sn2201_dev;
   940		struct i2c_adapter *adap;
   941		struct device *dev;
 > 942		int i, j, err;
   943	
   944		dev = nvsw_sn2201->dev;
   945		adap = i2c_get_adapter(nvsw_sn2201->main_mux_deferred_nr);
   946		if (!adap) {
   947			dev_err(dev, "Failed to get adapter for bus %d\n",
   948				nvsw_sn2201->main_mux_deferred_nr);
   949			return -ENODEV;
   950		}
   951		i2c_put_adapter(adap);
   952	
   953		/* Update board info. */
   954		sn2201_dev = nvsw_sn2201->sn2201_devs;
   955		for (i = 0, j = 0; i < nvsw_sn2201->sn2201_devs_num; i++, sn2201_dev++) {
   956			sn2201_dev->adapter = i2c_get_adapter(sn2201_dev->nr);
   957			if (!sn2201_dev->adapter)
   958				return -ENODEV;
   959			i2c_put_adapter(sn2201_dev->adapter);
   960		}
   961	
   962		err = nvsw_sn2201_create_static_devices(nvsw_sn2201, nvsw_sn2201->sn2201_devs,
   963							nvsw_sn2201->sn2201_devs_num);
   964		if (err)
   965			dev_err(dev, "Failed to create static devices\n");
   966	
   967		return err;
   968	}
   969	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-05-11 18:51 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=202205120232.oCAO8rb3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michaelsh@nvidia.com \
    --cc=vadimp@nvidia.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

all inboxes | Powered by JetHome®