[hwmon:hwmon-next 25/25] drivers/hwmon/pmbus/max31785.c:361:56: warning: format specifies type 'unsigned int' but the argument has type 's64' (aka 'long long')

[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:   c52533beaf2853858ac4bc0db8d5aba04b5ab99f
commit: c52533beaf2853858ac4bc0db8d5aba04b5ab99f [25/25] hwmon: (pmbus/max31785) Support revision "B"
config: x86_64-randconfig-a013-20210201 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 275c6af7d7f1ed63a03d05b4484413e447133269)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?id=c52533beaf2853858ac4bc0db8d5aba04b5ab99f
        git remote add hwmon https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
        git fetch --no-tags hwmon hwmon-next
        git checkout c52533beaf2853858ac4bc0db8d5aba04b5ab99f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> drivers/hwmon/pmbus/max31785.c:361:56: warning: format specifies type 'unsigned int' but the argument has type 's64' (aka 'long long') [-Wformat]
                   dev_err(dev, "Unrecognized MAX31785 revision: %x\n", ret);
                                                                 ~~     ^~~
                                                                 %llx
   include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
           _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
                                 ~~~     ^~~~~~~~~~~
   1 warning generated.


vim +361 drivers/hwmon/pmbus/max31785.c

   327	
   328	static int max31785_probe(struct i2c_client *client)
   329	{
   330		struct device *dev = &client->dev;
   331		struct pmbus_driver_info *info;
   332		bool dual_tach = false;
   333		s64 ret;
   334	
   335		if (!i2c_check_functionality(client->adapter,
   336					     I2C_FUNC_SMBUS_BYTE_DATA |
   337					     I2C_FUNC_SMBUS_WORD_DATA))
   338			return -ENODEV;
   339	
   340		info = devm_kzalloc(dev, sizeof(struct pmbus_driver_info), GFP_KERNEL);
   341		if (!info)
   342			return -ENOMEM;
   343	
   344		*info = max31785_info;
   345	
   346		ret = i2c_smbus_write_byte_data(client, PMBUS_PAGE, 255);
   347		if (ret < 0)
   348			return ret;
   349	
   350		ret = i2c_smbus_read_word_data(client, MFR_REVISION);
   351		if (ret < 0)
   352			return ret;
   353	
   354		if (ret == MAX31785A || ret == MAX31785B) {
   355			dual_tach = true;
   356		} else if (ret == MAX31785) {
   357			if (!strcmp("max31785a", client->name) ||
   358			    !strcmp("max31785b", client->name))
   359				dev_warn(dev, "Expected max31785a/b, found max31785: cannot provide secondary tachometer readings\n");
   360		} else {
 > 361			dev_err(dev, "Unrecognized MAX31785 revision: %x\n", ret);
   362			return -ENODEV;
   363		}
   364	
   365		if (dual_tach) {
   366			ret = max31785_configure_dual_tach(client, info);
   367			if (ret < 0)
   368				return ret;
   369		}
   370	
   371		return pmbus_do_probe(client, info);
   372	}
   373	

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

Attachment: .config.gz
Description: application/gzip


[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