lkml.org 
[lkml]   [2020]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 4/4] SFH: Create HID report to Enable support of AMD sensor fusion Hub (SFH)
Hi Sandeep,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.8 next-20200807]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Sandeep-Singh/SFH-Add-Support-for-AMD-Sensor-Fusion-Hub/20200809-182729
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 06a81c1c7db9bd5de0bd38cd5acc44bb22b99150
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv

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

All warnings (new ones prefixed by >>):

drivers/hid/amd-sfh-hid/amdsfh_hid_client.c: In function 'amd_sfh_hid_client_init':
>> drivers/hid/amd-sfh-hid/amdsfh_hid_client.c:140:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
140 | int rc, i;
| ^~

vim +/rc +140 drivers/hid/amd-sfh-hid/amdsfh_hid_client.c

6d2f42dac8a703 Sandeep Singh 2020-08-09 131
6d2f42dac8a703 Sandeep Singh 2020-08-09 132 int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata)
6d2f42dac8a703 Sandeep Singh 2020-08-09 133 {
6d2f42dac8a703 Sandeep Singh 2020-08-09 134 struct amdtp_cl_data *cl_data = privdata->cl_data;
6d2f42dac8a703 Sandeep Singh 2020-08-09 135 struct amd_mp2_sensor_info info;
6d2f42dac8a703 Sandeep Singh 2020-08-09 136 struct device *dev;
6d2f42dac8a703 Sandeep Singh 2020-08-09 137 u32 feature_report_size;
6d2f42dac8a703 Sandeep Singh 2020-08-09 138 u32 input_report_size;
6d2f42dac8a703 Sandeep Singh 2020-08-09 139 u8 cl_idx;
6d2f42dac8a703 Sandeep Singh 2020-08-09 @140 int rc, i;
6d2f42dac8a703 Sandeep Singh 2020-08-09 141
6d2f42dac8a703 Sandeep Singh 2020-08-09 142 dev = &privdata->pdev->dev;
6d2f42dac8a703 Sandeep Singh 2020-08-09 143 cl_data = kzalloc(sizeof(*cl_data), GFP_KERNEL);
6d2f42dac8a703 Sandeep Singh 2020-08-09 144 if (!cl_data)
6d2f42dac8a703 Sandeep Singh 2020-08-09 145 return -ENOMEM;
6d2f42dac8a703 Sandeep Singh 2020-08-09 146
6d2f42dac8a703 Sandeep Singh 2020-08-09 147 cl_data->num_hid_devices = amd_mp2_get_sensor_num(privdata, &cl_data->sensor_idx[0]);
6d2f42dac8a703 Sandeep Singh 2020-08-09 148
6d2f42dac8a703 Sandeep Singh 2020-08-09 149 INIT_DELAYED_WORK(&cl_data->work, amd_sfh_work);
6d2f42dac8a703 Sandeep Singh 2020-08-09 150 INIT_DELAYED_WORK(&cl_data->work_buffer, amd_sfh_work_buffer);
6d2f42dac8a703 Sandeep Singh 2020-08-09 151 INIT_LIST_HEAD(&req_list.list);
6d2f42dac8a703 Sandeep Singh 2020-08-09 152
6d2f42dac8a703 Sandeep Singh 2020-08-09 153 for (i = 0; i < cl_data->num_hid_devices; i++) {
6d2f42dac8a703 Sandeep Singh 2020-08-09 154 cl_data->sensor_virt_addr[i] = dma_alloc_coherent(dev, sizeof(int) * 8,
6d2f42dac8a703 Sandeep Singh 2020-08-09 155 &cl_data->sensor_phys_addr[i],
6d2f42dac8a703 Sandeep Singh 2020-08-09 156 GFP_KERNEL);
6d2f42dac8a703 Sandeep Singh 2020-08-09 157 cl_data->sensor_sts[i] = 0;
6d2f42dac8a703 Sandeep Singh 2020-08-09 158 cl_data->sensor_requested_cnt[i] = 0;
6d2f42dac8a703 Sandeep Singh 2020-08-09 159 cl_data->cur_hid_dev = i;
6d2f42dac8a703 Sandeep Singh 2020-08-09 160 cl_idx = cl_data->sensor_idx[i];
6d2f42dac8a703 Sandeep Singh 2020-08-09 161 cl_data->report_descr_sz[i] = get_descr_sz(cl_idx, descr_size);
6d2f42dac8a703 Sandeep Singh 2020-08-09 162 if (!cl_data->report_descr_sz[i])
6d2f42dac8a703 Sandeep Singh 2020-08-09 163 return -EINVAL;
6d2f42dac8a703 Sandeep Singh 2020-08-09 164
6d2f42dac8a703 Sandeep Singh 2020-08-09 165 feature_report_size = get_descr_sz(cl_idx, feature_size);
6d2f42dac8a703 Sandeep Singh 2020-08-09 166 if (!feature_report_size)
6d2f42dac8a703 Sandeep Singh 2020-08-09 167 return -EINVAL;
6d2f42dac8a703 Sandeep Singh 2020-08-09 168
6d2f42dac8a703 Sandeep Singh 2020-08-09 169 input_report_size = get_descr_sz(cl_idx, input_size);
6d2f42dac8a703 Sandeep Singh 2020-08-09 170 if (!input_report_size)
6d2f42dac8a703 Sandeep Singh 2020-08-09 171 return -EINVAL;
6d2f42dac8a703 Sandeep Singh 2020-08-09 172
6d2f42dac8a703 Sandeep Singh 2020-08-09 173 cl_data->feature_report[i] = kzalloc(feature_report_size, GFP_KERNEL);
6d2f42dac8a703 Sandeep Singh 2020-08-09 174 if (!cl_data->feature_report[i])
6d2f42dac8a703 Sandeep Singh 2020-08-09 175 return -ENOMEM;
6d2f42dac8a703 Sandeep Singh 2020-08-09 176
6d2f42dac8a703 Sandeep Singh 2020-08-09 177 cl_data->input_report[i] = kzalloc(input_report_size, GFP_KERNEL);
6d2f42dac8a703 Sandeep Singh 2020-08-09 178 if (!cl_data->input_report[i])
6d2f42dac8a703 Sandeep Singh 2020-08-09 179 return -ENOMEM;
6d2f42dac8a703 Sandeep Singh 2020-08-09 180
6d2f42dac8a703 Sandeep Singh 2020-08-09 181 info.period = PERIOD;
6d2f42dac8a703 Sandeep Singh 2020-08-09 182 info.sensor_idx = cl_idx;
6d2f42dac8a703 Sandeep Singh 2020-08-09 183 info.phys_address = cl_data->sensor_phys_addr[i];
6d2f42dac8a703 Sandeep Singh 2020-08-09 184
6d2f42dac8a703 Sandeep Singh 2020-08-09 185 cl_data->report_descr[i] = kzalloc(cl_data->report_descr_sz[i], GFP_KERNEL);
6d2f42dac8a703 Sandeep Singh 2020-08-09 186 if (!cl_data->report_descr[i])
6d2f42dac8a703 Sandeep Singh 2020-08-09 187 return -ENOMEM;
6d2f42dac8a703 Sandeep Singh 2020-08-09 188
6d2f42dac8a703 Sandeep Singh 2020-08-09 189 rc = get_report_descriptor(cl_idx, cl_data->report_descr[i]);
6d2f42dac8a703 Sandeep Singh 2020-08-09 190 rc = amdtp_hid_probe(cl_data->cur_hid_dev, cl_data);
6d2f42dac8a703 Sandeep Singh 2020-08-09 191 amd_start_sensor(privdata, info);
6d2f42dac8a703 Sandeep Singh 2020-08-09 192 cl_data->sensor_sts[i] = 1;
6d2f42dac8a703 Sandeep Singh 2020-08-09 193 }
6d2f42dac8a703 Sandeep Singh 2020-08-09 194 privdata->cl_data = cl_data;
6d2f42dac8a703 Sandeep Singh 2020-08-09 195 schedule_delayed_work(&cl_data->work_buffer, PERIOD);
6d2f42dac8a703 Sandeep Singh 2020-08-09 196 return 0;
6d2f42dac8a703 Sandeep Singh 2020-08-09 197 }
6d2f42dac8a703 Sandeep Singh 2020-08-09 198

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-08-09 14:38    [W:0.064 / U:3.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site