tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   00e4db51259a5f936fec1424b884f029479d3981
commit: ca7ce5a2710ad2a57bf7d0c4c712590bb69a5e1c coccinelle: platform_get_irq: 
Fix parse error
date:   11 months ago
config: i386-randconfig-c004-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

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


coccinelle warnings: (new ones prefixed by >>)

>> drivers/thermal/da9062-thermal.c:258:2-9: line 258 is redundant because 
>> platform_get_irq() already prints an error

vim +258 drivers/thermal/da9062-thermal.c

608567aac3206a Steve Twiss 2017-03-28  199  
608567aac3206a Steve Twiss 2017-03-28  200  static int 
da9062_thermal_probe(struct platform_device *pdev)
608567aac3206a Steve Twiss 2017-03-28  201  {
608567aac3206a Steve Twiss 2017-03-28  202      struct da9062 *chip = 
dev_get_drvdata(pdev->dev.parent);
608567aac3206a Steve Twiss 2017-03-28  203      struct da9062_thermal *thermal;
608567aac3206a Steve Twiss 2017-03-28  204      unsigned int pp_tmp = 
DA9062_DEFAULT_POLLING_MS_PERIOD;
608567aac3206a Steve Twiss 2017-03-28  205      const struct of_device_id 
*match;
608567aac3206a Steve Twiss 2017-03-28  206      int ret = 0;
608567aac3206a Steve Twiss 2017-03-28  207  
608567aac3206a Steve Twiss 2017-03-28  208      match = 
of_match_node(da9062_compatible_reg_id_table,
608567aac3206a Steve Twiss 2017-03-28  209                            
pdev->dev.of_node);
608567aac3206a Steve Twiss 2017-03-28  210      if (!match)
608567aac3206a Steve Twiss 2017-03-28  211              return -ENXIO;
608567aac3206a Steve Twiss 2017-03-28  212  
608567aac3206a Steve Twiss 2017-03-28  213      if (pdev->dev.of_node) {
608567aac3206a Steve Twiss 2017-03-28  214              if 
(!of_property_read_u32(pdev->dev.of_node,
608567aac3206a Steve Twiss 2017-03-28  215                                      
  "polling-delay-passive",
608567aac3206a Steve Twiss 2017-03-28  216                                      
  &pp_tmp)) {
608567aac3206a Steve Twiss 2017-03-28  217                      if (pp_tmp < 
DA9062_MIN_POLLING_MS_PERIOD ||
608567aac3206a Steve Twiss 2017-03-28  218                          pp_tmp > 
DA9062_MAX_POLLING_MS_PERIOD) {
608567aac3206a Steve Twiss 2017-03-28  219                              
dev_warn(&pdev->dev,
608567aac3206a Steve Twiss 2017-03-28  220                                      
 "Out-of-range polling period %d ms\n",
608567aac3206a Steve Twiss 2017-03-28  221                                      
 pp_tmp);
608567aac3206a Steve Twiss 2017-03-28  222                              pp_tmp 
= DA9062_DEFAULT_POLLING_MS_PERIOD;
608567aac3206a Steve Twiss 2017-03-28  223                      }
608567aac3206a Steve Twiss 2017-03-28  224              }
608567aac3206a Steve Twiss 2017-03-28  225      }
608567aac3206a Steve Twiss 2017-03-28  226  
608567aac3206a Steve Twiss 2017-03-28  227      thermal = 
devm_kzalloc(&pdev->dev, sizeof(struct da9062_thermal),
608567aac3206a Steve Twiss 2017-03-28  228                             
GFP_KERNEL);
608567aac3206a Steve Twiss 2017-03-28  229      if (!thermal) {
608567aac3206a Steve Twiss 2017-03-28  230              ret = -ENOMEM;
608567aac3206a Steve Twiss 2017-03-28  231              goto err;
608567aac3206a Steve Twiss 2017-03-28  232      }
608567aac3206a Steve Twiss 2017-03-28  233  
608567aac3206a Steve Twiss 2017-03-28  234      thermal->config = match->data;
608567aac3206a Steve Twiss 2017-03-28  235      thermal->hw = chip;
608567aac3206a Steve Twiss 2017-03-28  236      thermal->mode = 
THERMAL_DEVICE_ENABLED;
608567aac3206a Steve Twiss 2017-03-28  237      thermal->dev = &pdev->dev;
608567aac3206a Steve Twiss 2017-03-28  238  
608567aac3206a Steve Twiss 2017-03-28  239      
INIT_DELAYED_WORK(&thermal->work, da9062_thermal_poll_on);
608567aac3206a Steve Twiss 2017-03-28  240      mutex_init(&thermal->lock);
608567aac3206a Steve Twiss 2017-03-28  241  
608567aac3206a Steve Twiss 2017-03-28  242      thermal->zone = 
thermal_zone_device_register(thermal->config->name,
608567aac3206a Steve Twiss 2017-03-28  243                                      
1, 0, thermal,
608567aac3206a Steve Twiss 2017-03-28  244                                      
&da9062_thermal_ops, NULL, pp_tmp,
608567aac3206a Steve Twiss 2017-03-28  245                                      
0);
608567aac3206a Steve Twiss 2017-03-28  246      if (IS_ERR(thermal->zone)) {
608567aac3206a Steve Twiss 2017-03-28  247              dev_err(&pdev->dev, 
"Cannot register thermal zone device\n");
608567aac3206a Steve Twiss 2017-03-28  248              ret = 
PTR_ERR(thermal->zone);
608567aac3206a Steve Twiss 2017-03-28  249              goto err;
608567aac3206a Steve Twiss 2017-03-28  250      }
608567aac3206a Steve Twiss 2017-03-28  251  
608567aac3206a Steve Twiss 2017-03-28  252      dev_dbg(&pdev->dev,
608567aac3206a Steve Twiss 2017-03-28  253              "TJUNC temperature 
polling period set at %d ms\n",
608567aac3206a Steve Twiss 2017-03-28  254              
thermal->zone->passive_delay);
608567aac3206a Steve Twiss 2017-03-28  255  
608567aac3206a Steve Twiss 2017-03-28  256      ret = 
platform_get_irq_byname(pdev, "THERMAL");
608567aac3206a Steve Twiss 2017-03-28  257      if (ret < 0) {
608567aac3206a Steve Twiss 2017-03-28 @258              dev_err(&pdev->dev, 
"Failed to get platform IRQ.\n");
608567aac3206a Steve Twiss 2017-03-28  259              goto err_zone;
608567aac3206a Steve Twiss 2017-03-28  260      }
608567aac3206a Steve Twiss 2017-03-28  261      thermal->irq = ret;
608567aac3206a Steve Twiss 2017-03-28  262  
608567aac3206a Steve Twiss 2017-03-28  263      ret = 
request_threaded_irq(thermal->irq, NULL,
608567aac3206a Steve Twiss 2017-03-28  264                                 
da9062_thermal_irq_handler,
608567aac3206a Steve Twiss 2017-03-28  265                                 
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
608567aac3206a Steve Twiss 2017-03-28  266                                 
"THERMAL", thermal);
608567aac3206a Steve Twiss 2017-03-28  267      if (ret) {
608567aac3206a Steve Twiss 2017-03-28  268              dev_err(&pdev->dev,
608567aac3206a Steve Twiss 2017-03-28  269                      "Failed to 
request thermal device IRQ.\n");
608567aac3206a Steve Twiss 2017-03-28  270              goto err_zone;
608567aac3206a Steve Twiss 2017-03-28  271      }
608567aac3206a Steve Twiss 2017-03-28  272  
608567aac3206a Steve Twiss 2017-03-28  273      platform_set_drvdata(pdev, 
thermal);
608567aac3206a Steve Twiss 2017-03-28  274      return 0;
608567aac3206a Steve Twiss 2017-03-28  275  
608567aac3206a Steve Twiss 2017-03-28  276  err_zone:
608567aac3206a Steve Twiss 2017-03-28  277      
thermal_zone_device_unregister(thermal->zone);
608567aac3206a Steve Twiss 2017-03-28  278  err:
608567aac3206a Steve Twiss 2017-03-28  279      return ret;
608567aac3206a Steve Twiss 2017-03-28  280  }
608567aac3206a Steve Twiss 2017-03-28  281  

:::::: The code at line 258 was first introduced by commit
:::::: 608567aac3206ae886c79688fbb8a62c473b55ef thermal: da9062/61: Thermal 
junction temperature monitoring driver

:::::: TO: Steve Twiss <stwiss.opensou...@diasemi.com>
:::::: CC: Eduardo Valentin <edubez...@gmail.com>

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

Attachment: .config.gz
Description: application/gzip

Reply via email to