[mmotm:master 192/212] drivers/thermal/qcom/tsens.c:144:31: error: 's' undeclared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   7393732bae530daa27567988b91d16ecfeef6c62
commit: b1a8bfbadbcb79644ccdd5f9cd370caa63cb1fa7 [192/212] linux-next-git-rejects
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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 b1a8bfbadbcb79644ccdd5f9cd370caa63cb1fa7
        # save the attached .config to linux build tree
        make.cross ARCH=sh 

All errors (new ones prefixed by >>):

   drivers/thermal/qcom/tsens.c: In function 'tsens_probe':
>> drivers/thermal/qcom/tsens.c:144:31: error: 's' undeclared (first use in this function)
            num_sensors * sizeof(*s), GFP_KERNEL);
                                  ^
   drivers/thermal/qcom/tsens.c:144:31: note: each undeclared identifier is reported only once for each function it appears in

vim +/s +144 drivers/thermal/qcom/tsens.c

9066073c Rajendra Nayak 2016-05-05  109  
9066073c Rajendra Nayak 2016-05-05  110  static int tsens_probe(struct platform_device *pdev)
9066073c Rajendra Nayak 2016-05-05  111  {
9066073c Rajendra Nayak 2016-05-05  112  	int ret, i;
9066073c Rajendra Nayak 2016-05-05  113  	struct device *dev;
9066073c Rajendra Nayak 2016-05-05  114  	struct device_node *np;
9066073c Rajendra Nayak 2016-05-05  115  	struct tsens_device *tmdev;
9066073c Rajendra Nayak 2016-05-05  116  	const struct tsens_data *data;
9066073c Rajendra Nayak 2016-05-05  117  	const struct of_device_id *id;
0d2c548d Andrew Morton  2018-06-08  118  	u32 num_sensors;
9066073c Rajendra Nayak 2016-05-05  119  
9066073c Rajendra Nayak 2016-05-05  120  	if (pdev->dev.of_node)
9066073c Rajendra Nayak 2016-05-05  121  		dev = &pdev->dev;
9066073c Rajendra Nayak 2016-05-05  122  	else
9066073c Rajendra Nayak 2016-05-05  123  		dev = pdev->dev.parent;
9066073c Rajendra Nayak 2016-05-05  124  
9066073c Rajendra Nayak 2016-05-05  125  	np = dev->of_node;
9066073c Rajendra Nayak 2016-05-05  126  
9066073c Rajendra Nayak 2016-05-05  127  	id = of_match_node(tsens_table, np);
20d4fd84 Rajendra Nayak 2016-05-05  128  	if (id)
9066073c Rajendra Nayak 2016-05-05  129  		data = id->data;
20d4fd84 Rajendra Nayak 2016-05-05  130  	else
20d4fd84 Rajendra Nayak 2016-05-05  131  		data = &data_8960;
9066073c Rajendra Nayak 2016-05-05  132  
0d2c548d Andrew Morton  2018-06-08  133  	num_sensors = data->num_sensors;
0d2c548d Andrew Morton  2018-06-08  134  
0d2c548d Andrew Morton  2018-06-08  135  	if (np)
0d2c548d Andrew Morton  2018-06-08  136  		of_property_read_u32(np, "#qcom,sensors", &num_sensors);
0d2c548d Andrew Morton  2018-06-08  137  
0d2c548d Andrew Morton  2018-06-08  138  	if (num_sensors <= 0) {
9066073c Rajendra Nayak 2016-05-05  139  		dev_err(dev, "invalid number of sensors\n");
9066073c Rajendra Nayak 2016-05-05  140  		return -EINVAL;
9066073c Rajendra Nayak 2016-05-05  141  	}
9066073c Rajendra Nayak 2016-05-05  142  
0d2c548d Andrew Morton  2018-06-08  143  	tmdev = devm_kzalloc(dev, sizeof(*tmdev) +
0d2c548d Andrew Morton  2018-06-08 @144  			     num_sensors * sizeof(*s), GFP_KERNEL);
9066073c Rajendra Nayak 2016-05-05  145  	if (!tmdev)
9066073c Rajendra Nayak 2016-05-05  146  		return -ENOMEM;
9066073c Rajendra Nayak 2016-05-05  147  
9066073c Rajendra Nayak 2016-05-05  148  	tmdev->dev = dev;
0d2c548d Andrew Morton  2018-06-08  149  	tmdev->num_sensors = num_sensors;
9066073c Rajendra Nayak 2016-05-05  150  	tmdev->ops = data->ops;
9066073c Rajendra Nayak 2016-05-05  151  	for (i = 0;  i < tmdev->num_sensors; i++) {
9066073c Rajendra Nayak 2016-05-05  152  		if (data->hw_ids)
9066073c Rajendra Nayak 2016-05-05  153  			tmdev->sensor[i].hw_id = data->hw_ids[i];
9066073c Rajendra Nayak 2016-05-05  154  		else
9066073c Rajendra Nayak 2016-05-05  155  			tmdev->sensor[i].hw_id = i;
9066073c Rajendra Nayak 2016-05-05  156  	}
9066073c Rajendra Nayak 2016-05-05  157  
9066073c Rajendra Nayak 2016-05-05  158  	if (!tmdev->ops || !tmdev->ops->init || !tmdev->ops->get_temp)
9066073c Rajendra Nayak 2016-05-05  159  		return -EINVAL;
9066073c Rajendra Nayak 2016-05-05  160  
9066073c Rajendra Nayak 2016-05-05  161  	ret = tmdev->ops->init(tmdev);
9066073c Rajendra Nayak 2016-05-05  162  	if (ret < 0) {
9066073c Rajendra Nayak 2016-05-05  163  		dev_err(dev, "tsens init failed\n");
9066073c Rajendra Nayak 2016-05-05  164  		return ret;
9066073c Rajendra Nayak 2016-05-05  165  	}
9066073c Rajendra Nayak 2016-05-05  166  
9066073c Rajendra Nayak 2016-05-05  167  	if (tmdev->ops->calibrate) {
9066073c Rajendra Nayak 2016-05-05  168  		ret = tmdev->ops->calibrate(tmdev);
9066073c Rajendra Nayak 2016-05-05  169  		if (ret < 0) {
9066073c Rajendra Nayak 2016-05-05  170  			dev_err(dev, "tsens calibration failed\n");
9066073c Rajendra Nayak 2016-05-05  171  			return ret;
9066073c Rajendra Nayak 2016-05-05  172  		}
9066073c Rajendra Nayak 2016-05-05  173  	}
9066073c Rajendra Nayak 2016-05-05  174  
9066073c Rajendra Nayak 2016-05-05  175  	ret = tsens_register(tmdev);
9066073c Rajendra Nayak 2016-05-05  176  
9066073c Rajendra Nayak 2016-05-05  177  	platform_set_drvdata(pdev, tmdev);
9066073c Rajendra Nayak 2016-05-05  178  
9066073c Rajendra Nayak 2016-05-05  179  	return ret;
9066073c Rajendra Nayak 2016-05-05  180  }
9066073c Rajendra Nayak 2016-05-05  181  

:::::: The code at line 144 was first introduced by commit
:::::: 0d2c548d8ade80ee22447fd8607cd81e30e5adc1 linux-next

:::::: TO: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
:::::: CC: Johannes Weiner <hannes@xxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux