[hwmon:hwmon-next 2/21] drivers/hwmon/pmbus/xdpe12284.c:33:9: error: too many arguments to function 'pmbus_read_word_data'

[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:   7e331bfd1172b8ed13199b056f336c408394c0ce
commit: 47555027eae210de1c69210a24d130ce439fe0da [2/21] hwmon: (pmbus/xdpe12284) Add callback for vout limits conversion
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 47555027eae210de1c69210a24d130ce439fe0da
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=parisc 

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

Note: the hwmon/hwmon-next HEAD 7e331bfd1172b8ed13199b056f336c408394c0ce builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/hwmon/pmbus/xdpe12284.c: In function 'xdpe122_read_word_data':
>> drivers/hwmon/pmbus/xdpe12284.c:33:9: error: too many arguments to function 'pmbus_read_word_data'
      ret = pmbus_read_word_data(client, page, phase, reg);
            ^~~~~~~~~~~~~~~~~~~~
   In file included from drivers/hwmon/pmbus/xdpe12284.c:13:0:
   drivers/hwmon/pmbus/pmbus.h:458:5: note: declared here
    int pmbus_read_word_data(struct i2c_client *client, int page, u8 reg);
        ^~~~~~~~~~~~~~~~~~~~
   drivers/hwmon/pmbus/xdpe12284.c: At top level:
>> drivers/hwmon/pmbus/xdpe12284.c:127:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .read_word_data = xdpe122_read_word_data,
                       ^~~~~~~~~~~~~~~~~~~~~~
   drivers/hwmon/pmbus/xdpe12284.c:127:20: note: (near initialization for 'xdpe122_info.read_word_data')
   cc1: some warnings being treated as errors

vim +/pmbus_read_word_data +33 drivers/hwmon/pmbus/xdpe12284.c

    20	
    21	static int xdpe122_read_word_data(struct i2c_client *client, int page,
    22					  int phase, int reg)
    23	{
    24		const struct pmbus_driver_info *info = pmbus_get_driver_info(client);
    25		long val;
    26		s16 exponent;
    27		s32 mantissa;
    28		int ret;
    29	
    30		switch (reg) {
    31		case PMBUS_VOUT_OV_FAULT_LIMIT:
    32		case PMBUS_VOUT_UV_FAULT_LIMIT:
  > 33			ret = pmbus_read_word_data(client, page, phase, reg);
    34			if (ret < 0)
    35				return ret;
    36	
    37			/* Convert register value to LINEAR11 data. */
    38			exponent = ((s16)ret) >> 11;
    39			mantissa = ((s16)((ret & GENMASK(10, 0)) << 5)) >> 5;
    40			val = mantissa * 1000L;
    41			if (exponent >= 0)
    42				val <<= exponent;
    43			else
    44				val >>= -exponent;
    45	
    46			/* Convert data to VID register. */
    47			switch (info->vrm_version[page]) {
    48			case vr13:
    49				if (val >= 500)
    50					return 1 + DIV_ROUND_CLOSEST(val - 500, 10);
    51				return 0;
    52			case vr12:
    53				if (val >= 250)
    54					return 1 + DIV_ROUND_CLOSEST(val - 250, 5);
    55				return 0;
    56			case imvp9:
    57				if (val >= 200)
    58					return 1 + DIV_ROUND_CLOSEST(val - 200, 10);
    59				return 0;
    60			case amd625mv:
    61				if (val >= 200 && val <= 1550)
    62					return DIV_ROUND_CLOSEST((1550 - val) * 100,
    63								 625);
    64				return 0;
    65			default:
    66				return -EINVAL;
    67			}
    68		default:
    69			return -ENODATA;
    70		}
    71	
    72		return 0;
    73	}
    74	
    75	static int xdpe122_identify(struct i2c_client *client,
    76				    struct pmbus_driver_info *info)
    77	{
    78		u8 vout_params;
    79		int i, ret;
    80	
    81		for (i = 0; i < XDPE122_PAGE_NUM; i++) {
    82			/* Read the register with VOUT scaling value.*/
    83			ret = pmbus_read_byte_data(client, i, PMBUS_VOUT_MODE);
    84			if (ret < 0)
    85				return ret;
    86	
    87			vout_params = ret & GENMASK(4, 0);
    88	
    89			switch (vout_params) {
    90			case XDPE122_PROT_VR12_5_10MV:
    91				info->vrm_version[i] = vr13;
    92				break;
    93			case XDPE122_PROT_VR12_5MV:
    94				info->vrm_version[i] = vr12;
    95				break;
    96			case XDPE122_PROT_IMVP9_10MV:
    97				info->vrm_version[i] = imvp9;
    98				break;
    99			case XDPE122_AMD_625MV:
   100				info->vrm_version[i] = amd625mv;
   101				break;
   102			default:
   103				return -EINVAL;
   104			}
   105		}
   106	
   107		return 0;
   108	}
   109	
   110	static struct pmbus_driver_info xdpe122_info = {
   111		.pages = XDPE122_PAGE_NUM,
   112		.format[PSC_VOLTAGE_IN] = linear,
   113		.format[PSC_VOLTAGE_OUT] = vid,
   114		.format[PSC_TEMPERATURE] = linear,
   115		.format[PSC_CURRENT_IN] = linear,
   116		.format[PSC_CURRENT_OUT] = linear,
   117		.format[PSC_POWER] = linear,
   118		.func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
   119			PMBUS_HAVE_IIN | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
   120			PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP |
   121			PMBUS_HAVE_POUT | PMBUS_HAVE_PIN | PMBUS_HAVE_STATUS_INPUT,
   122		.func[1] = PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
   123			PMBUS_HAVE_IIN | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
   124			PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP |
   125			PMBUS_HAVE_POUT | PMBUS_HAVE_PIN | PMBUS_HAVE_STATUS_INPUT,
   126		.identify = xdpe122_identify,
 > 127		.read_word_data = xdpe122_read_word_data,
   128	};
   129	

---
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