lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 5 Nov 2017 05:27:45 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Lei YU <mine260309@...il.com>
Cc:     kbuild-all@...org, Jean Delvare <jdelvare@...e.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Lei YU <mine260309@...il.com>, linux-kernel@...r.kernel.org,
        linux-hwmon@...r.kernel.org, Joel Stanley <joel@....id.au>,
        Andrew Jeffery <andrew@...id.au>
Subject: Re: [PATCH 1/2] drivers: hwmon: Add W83773G driver

Hi Lei,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on hwmon/hwmon-next]
[also build test WARNING on v4.14-rc7 next-20171103]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Lei-YU/Add-W83773G-hwmon-sensor-driver-and-doc/20171105-015016
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All warnings (new ones prefixed by >>):

   drivers//hwmon/w83773g.c: In function 'w83773_probe':
>> drivers//hwmon/w83773g.c:233:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      data->channels = (int)of_device_get_match_data(&client->dev);
                       ^

vim +233 drivers//hwmon/w83773g.c

   218	
   219	static int w83773_probe(struct i2c_client *client,
   220				const struct i2c_device_id *id)
   221	{
   222		struct device *dev = &client->dev;
   223		struct device *hwmon_dev;
   224		struct w83773_data *data;
   225		int i, err;
   226	
   227		data = devm_kzalloc(dev, sizeof(struct w83773_data), GFP_KERNEL);
   228		if (!data)
   229			return -ENOMEM;
   230	
   231		mutex_init(&data->update_lock);
   232		if (client->dev.of_node)
 > 233			data->channels = (int)of_device_get_match_data(&client->dev);
   234		else
   235			data->channels = id->driver_data;
   236		data->client = client;
   237	
   238		err = w83773_init_client(client);
   239		if (err)
   240			return err;
   241	
   242		for (i = 0; i < data->channels; i++)
   243			data->temp_config[i] = HWMON_T_INPUT | HWMON_T_FAULT;
   244	
   245		data->chip.ops = &w83773_ops;
   246		data->chip.info = data->info;
   247	
   248		data->info[0] = &data->temp_info;
   249	
   250		data->temp_info.type = hwmon_temp;
   251		data->temp_info.config = data->temp_config;
   252	
   253		hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name,
   254								 data,
   255								 &data->chip,
   256								 NULL);
   257		return PTR_ERR_OR_ZERO(hwmon_dev);
   258	}
   259	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (48806 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ