[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202212081814.l3rQkXL9-lkp@intel.com>
Date: Thu, 8 Dec 2022 18:42:47 +0800
From: kernel test robot <lkp@...el.com>
To: Wang Xiaohua <wangxiaohua.1217@...edance.com>,
linux-kernel@...r.kernel.org, linux@...ck-us.net,
linux-hwmon@...r.kernel.org, jdelvare@...e.com,
openbmc@...ts.ozlabs.org, joel@....id.au
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev
Subject: Re: [PATCH linux dev-6.0] pmbus: Add mp2971/mp2973 support in mp2975
Hi Wang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
url: https://github.com/intel-lab-lkp/linux/commits/Wang-Xiaohua/pmbus-Add-mp2971-mp2973-support-in-mp2975/20221208-162418
patch link: https://lore.kernel.org/r/20221208082239.1062679-1-wangxiaohua.1217%40bytedance.com
patch subject: [PATCH linux dev-6.0] pmbus: Add mp2971/mp2973 support in mp2975
config: i386-randconfig-a004
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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://github.com/intel-lab-lkp/linux/commit/3a3a7dfb02eb88fa39a630b20fab03bc0ff4b89b
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Wang-Xiaohua/pmbus-Add-mp2971-mp2973-support-in-mp2975/20221208-162418
git checkout 3a3a7dfb02eb88fa39a630b20fab03bc0ff4b89b
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/hwmon/pmbus/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/hwmon/pmbus/mp2975.c:954:7: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
name = (int)i2c_match_id(mp2975_id, client)->name;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +954 drivers/hwmon/pmbus/mp2975.c
947
948 static int mp2975_probe(struct i2c_client *client)
949 {
950 struct pmbus_driver_info *info;
951 int ret;
952 char *name;
953
> 954 name = (int)i2c_match_id(mp2975_id, client)->name;
955 if (name == NULL)
956 return 0;
957 if (!strcmp(name, "mp2971") || !strcmp(name, "mp2973")) {
958 struct mp2971_data *data;
959 struct mp2971_device_info *device_info;
960
961 data = devm_kzalloc(&client->dev, sizeof(struct mp2971_data),
962 GFP_KERNEL);
963 if (!data)
964 return -ENOMEM;
965
966 device_info =
967 (struct mp2971_device_info *)i2c_match_id(mp2975_id, client)
968 ->driver_data;
969
970 memcpy(&data->info, &mp2971_info, sizeof(*info));
971 info = &data->info;
972
973 if (device_info) {
974 data->imvp9_en_r1_mask = device_info->imvp9_en_r1_mask;
975 data->imvp9_en_r2_mask = device_info->imvp9_en_r2_mask;
976 data->max_phase_rail1 = device_info->max_phase_rail1;
977 data->max_phase_rail2 = device_info->max_phase_rail2;
978 }
979
980 /* Identify multiphase configuration for rail 2. */
981 ret = mp2975_identify_multiphase_rail2(client);
982 if (ret < 0)
983 return ret;
984
985 if (ret) {
986 /* Two rails are connected. */
987 data->info.pages = MP2975_PAGE_NUM;
988 data->info.phases[1] = ret;
989 data->info.func[1] = MP2971_RAIL2_FUNC;
990 }
991
992 /* Identify multiphase configuration. */
993 ret = mp2971_identify_multiphase(client, data, info);
994 if (ret)
995 return ret;
996
997 /* Identify VID setting per rail. */
998 ret = mp2971_identify_rails_vid(client, data, info);
999 if (ret < 0)
1000 return ret;
1001
1002 /* Identify vout format. */
1003 ret = mp2971_identify_vout_format(client, data, info);
1004 if (ret < 0)
1005 return ret;
1006
1007 } else {
1008 struct mp2975_data *data;
1009
1010 data = devm_kzalloc(&client->dev, sizeof(struct mp2975_data),
1011 GFP_KERNEL);
1012 if (!data)
1013 return -ENOMEM;
1014
1015 memcpy(&data->info, &mp2975_info, sizeof(*info));
1016 info = &data->info;
1017
1018 /* Identify multiphase configuration for rail 2. */
1019 ret = mp2975_identify_multiphase_rail2(client);
1020 if (ret < 0)
1021 return ret;
1022
1023 if (ret) {
1024 /* Two rails are connected. */
1025 data->info.pages = MP2975_PAGE_NUM;
1026 data->info.phases[1] = ret;
1027 data->info.func[1] = MP2975_RAIL2_FUNC;
1028 }
1029
1030 /* Identify multiphase configuration. */
1031 ret = mp2975_identify_multiphase(client, data, info);
1032 if (ret)
1033 return ret;
1034
1035 /* Identify VID setting per rail. */
1036 ret = mp2975_identify_rails_vid(client, data, info);
1037 if (ret < 0)
1038 return ret;
1039
1040 /* Obtain current sense gain of power stage. */
1041 ret = mp2975_current_sense_gain_get(client, data);
1042 if (ret)
1043 return ret;
1044
1045 /* Obtain voltage reference values. */
1046 ret = mp2975_vref_get(client, data, info);
1047 if (ret)
1048 return ret;
1049
1050 /* Obtain vout over-voltage scales. */
1051 ret = mp2975_vout_ov_scale_get(client, data, info);
1052 if (ret < 0)
1053 return ret;
1054
1055 /* Obtain offsets, maximum and format for vout. */
1056 ret = mp2975_vout_per_rail_config_get(client, data, info);
1057 if (ret)
1058 return ret;
1059 }
1060
1061 return pmbus_do_probe(client, info);
1062 }
1063
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (130674 bytes)
Powered by blists - more mailing lists