[groeck-staging:hwmon-next 35/35] drivers/hwmon/hs3001.c:196:13: warning: unused variable 'ret'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
head:   33faa6fcc93f78e6b0e9b5aaf986446ac3c34047
commit: 33faa6fcc93f78e6b0e9b5aaf986446ac3c34047 [35/35] hwmon: Add driver for Renesas HS3001
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20230726/202307261819.VMDuxZOM-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307261819.VMDuxZOM-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307261819.VMDuxZOM-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/hwmon/hs3001.c: In function 'hs3001_probe':
>> drivers/hwmon/hs3001.c:196:13: warning: unused variable 'ret' [-Wunused-variable]
     196 |         int ret;
         |             ^~~


vim +/ret +196 drivers/hwmon/hs3001.c

   190	
   191	static int hs3001_probe(struct i2c_client *client)
   192	{
   193		struct hs3001_data *data;
   194		struct device *hwmon_dev;
   195		struct device *dev = &client->dev;
 > 196		int ret;
   197	
   198		if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
   199			return -EOPNOTSUPP;
   200	
   201		data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
   202		if (!data)
   203			return -ENOMEM;
   204	
   205		data->client = client;
   206	
   207		/*
   208		 * Measurement time = wake-up time + measurement time temperature
   209		 * + measurement time humidity. This is currently static, because
   210		 * enabling programming mode is not supported, yet.
   211		 */
   212		data->wait_time = (HS3001_WAKEUP_TIME + HS3001_14BIT_RESOLUTION +
   213				   HS3001_14BIT_RESOLUTION);
   214	
   215		mutex_init(&data->i2c_lock);
   216	
   217		hwmon_dev = devm_hwmon_device_register_with_info(dev,
   218								 client->name,
   219								 data,
   220								 &hs3001_chip_info,
   221								 NULL);
   222	
   223		if (IS_ERR(hwmon_dev))
   224			return dev_err_probe(dev, PTR_ERR(hwmon_dev),
   225					     "Unable to register hwmon device.\n");
   226	
   227		return 0;
   228	}
   229	

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



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux