drivers/input/touchscreen/cyttsp4_core.c:2093:6-26: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Krzysztof Kozlowski <krzk(a)kernel.org>
CC: Julia Lawall <Julia.Lawall(a)inria.fr>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26291c54e111ff6ba87a164d85d4a4e134b7315c
commit: 5d2db9bb5f8a850d037983f0df72ad59cefa9e3d coccinelle: irqf_oneshot: reduce the severity due to false positives
date: 9 months ago
:::::: branch date: 32 hours ago
:::::: commit date: 9 months ago
config: x86_64-randconfig-c022-20220117 (https://download.01.org/0day-ci/archive/20220201/202202010548.Fq56IWo0-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> drivers/input/touchscreen/cyttsp4_core.c:2093:6-26: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/input/touchscreen/edt-ft5x06.c:1220:9-34: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/extcon/extcon-max8997.c:665:8-28: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/power/supply/max17042_battery.c:1116:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/regulator/pca9450-regulator.c:781:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/usb/phy/phy-generic.c:300:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/regulator/qcom-labibb-regulator.c:364:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/rtc/rtc-max8998.c:283:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/rtc/rtc-rk808.c:441:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/rtc/rtc-s5m.c:810:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/rtc/rtc-tps65910.c:414:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/usb/common/usb-conn-gpio.c:229:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
drivers/usb/common/usb-conn-gpio.c:246:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
--
>> drivers/mfd/wm8994-irq.c:232:8-28: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 months, 2 weeks
sound/soc/amd/vangogh/acp5x-mach.c:190 acp5x_cs35l41_hw_params() error: uninitialized symbol 'ret'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Vijendar Mukunda <Vijendar.Mukunda(a)amd.com>
CC: Mark Brown <broonie(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26291c54e111ff6ba87a164d85d4a4e134b7315c
commit: 96792fdd77cd19fcf2368e7c19bb8b78557ae425 ASoC: amd: enable vangogh platform machine driver build
date: 4 months ago
:::::: branch date: 31 hours ago
:::::: commit date: 4 months ago
config: x86_64-randconfig-m001-20220131 (https://download.01.org/0day-ci/archive/20220201/202202010421.VYOO1bXN-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
sound/soc/amd/vangogh/acp5x-mach.c:190 acp5x_cs35l41_hw_params() error: uninitialized symbol 'ret'.
vim +/ret +190 sound/soc/amd/vangogh/acp5x-mach.c
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 157
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 158 static int acp5x_cs35l41_hw_params(struct snd_pcm_substream *substream,
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 159 struct snd_pcm_hw_params *params)
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 160 {
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 161 struct snd_soc_pcm_runtime *rtd = substream->private_data;
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 162 struct snd_soc_card *card = rtd->card;
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 163 struct snd_soc_dai *codec_dai;
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 164 int ret, i;
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 165 unsigned int num_codecs = rtd->num_codecs;
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 166 unsigned int bclk_val;
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 167
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 168 for (i = 0; i < num_codecs; i++) {
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 169 codec_dai = asoc_rtd_to_codec(rtd, i);
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 170 if ((strcmp(codec_dai->name, "spi-VLV1776:00") == 0) ||
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 171 (strcmp(codec_dai->name, "spi-VLV1776:01") == 0)) {
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 172 switch (params_rate(params)) {
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 173 case 48000:
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 174 bclk_val = 1536000;
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 175 break;
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 176 default:
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 177 dev_err(card->dev, "Invalid Samplerate:0x%x\n",
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 178 params_rate(params));
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 179 return -EINVAL;
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 180 }
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 181 ret = snd_soc_component_set_sysclk(codec_dai->component,
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 182 0, 0, bclk_val, SND_SOC_CLOCK_IN);
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 183 if (ret < 0) {
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 184 dev_err(card->dev, "failed to set sysclk for CS35l41 dai\n");
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 185 return ret;
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 186 }
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 187 }
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 188 }
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 189
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 @190 return ret;
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 191 }
34a0094b9ff7b7 Vijendar Mukunda 2021-10-14 192
:::::: The code at line 190 was first introduced by commit
:::::: 34a0094b9ff7b7544591a6841f9b61747033f292 ASoC: amd: add vangogh machine driver
:::::: TO: Vijendar Mukunda <Vijendar.Mukunda(a)amd.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 months, 2 weeks
kernel/trace/trace_eprobe.c:777:4: warning: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov(a)gmail.com>
CC: "Steven Rostedt (VMware)" <rostedt(a)goodmis.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26291c54e111ff6ba87a164d85d4a4e134b7315c
commit: 7491e2c442781a1860181adb5ab472a52075f393 tracing: Add a probe that attaches to trace events
date: 5 months ago
:::::: branch date: 30 hours ago
:::::: commit date: 5 months ago
compiler: hppa-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> kernel/trace/trace_probe.c:887:22: warning: Pointer addition with NULL pointer. [nullPointerArithmetic]
pos += snprintf(buf + pos, LEN_OR_ZERO, ""%s", fmt);
^
kernel/trace/trace_probe.c:940:28: note: Calling function '__set_print_fmt', 2nd argument 'NULL' value is 0
len = __set_print_fmt(tp, NULL, 0, ptype);
^
kernel/trace/trace_probe.c:887:22: note: Null pointer addition
pos += snprintf(buf + pos, LEN_OR_ZERO, ""%s", fmt);
^
kernel/trace/trace_probe.c:904:22: warning: Pointer addition with NULL pointer. [nullPointerArithmetic]
pos += snprintf(buf + pos, LEN_OR_ZERO, "", %s", arg);
^
kernel/trace/trace_probe.c:940:28: note: Calling function '__set_print_fmt', 2nd argument 'NULL' value is 0
len = __set_print_fmt(tp, NULL, 0, ptype);
^
kernel/trace/trace_probe.c:904:22: note: Null pointer addition
pos += snprintf(buf + pos, LEN_OR_ZERO, "", %s", arg);
^
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> kernel/trace/trace_eprobe.c:777:4: warning: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
break;
^
kernel/trace/trace_eprobe.c:780:3: warning: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
break;
^
vim +777 kernel/trace/trace_eprobe.c
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 754)
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 755) static struct trace_event_call *
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 756) find_and_get_event(const char *system, const char *event_name)
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 757) {
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 758) struct trace_event_call *tp_event;
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 759) const char *name;
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 760)
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 761) list_for_each_entry(tp_event, &ftrace_events, list) {
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 762) /* Skip other probes and ftrace events */
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 763) if (tp_event->flags &
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 764) (TRACE_EVENT_FL_IGNORE_ENABLE |
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 765) TRACE_EVENT_FL_KPROBE |
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 766) TRACE_EVENT_FL_UPROBE |
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 767) TRACE_EVENT_FL_EPROBE))
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 768) continue;
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 769) if (!tp_event->class->system ||
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 770) strcmp(system, tp_event->class->system))
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 771) continue;
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 772) name = trace_event_name(tp_event);
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 773) if (!name || strcmp(event_name, name))
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 774) continue;
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 775) if (!trace_event_try_get_ref(tp_event)) {
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 776) return NULL;
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 @777) break;
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 778) }
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 779) return tp_event;
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 780) break;
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 781) }
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 782) return NULL;
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 783) }
7491e2c442781a Tzvetomir Stoyanov (VMware 2021-08-19 784)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 months, 2 weeks
drivers/soundwire/cadence_master.c:1379:0: warning: Same expression used in consecutive assignments of 'target_num' and 'source_num'. [duplicateAssignExpression]
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Pierre-Louis Bossart" <pierre-louis.bossart(a)linux.intel.com>
CC: Vinod Koul <vkoul(a)kernel.org>
CC: Rander Wang <rander.wang(a)intel.com>
CC: Bard Liao <yung-chuan.liao(a)linux.intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26291c54e111ff6ba87a164d85d4a4e134b7315c
commit: dd81e7c3f0bb4fbe48b770b389ab6ccb95058dab soundwire: cadence: override PDI configurations to create loopback
date: 6 months ago
:::::: branch date: 29 hours ago
:::::: commit date: 6 months ago
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/soundwire/cadence_master.c:1379:0: warning: Same expression used in consecutive assignments of 'target_num' and 'source_num'. [duplicateAssignExpression]
int target_num = p_params->num;
^
drivers/soundwire/cadence_master.c:1380:0: note: Same expression used in consecutive assignments of 'target_num' and 'source_num'.
int source_num = p_params->num;
^
drivers/soundwire/cadence_master.c:1379:0: note: Same expression used in consecutive assignments of 'target_num' and 'source_num'.
int target_num = p_params->num;
^
>> drivers/soundwire/cadence_master.c:1429:0: warning: Same expression used in consecutive assignments of 'source_num' and 'target_num'. [duplicateAssignExpression]
int source_num = t_params->port_num;
^
drivers/soundwire/cadence_master.c:1430:0: note: Same expression used in consecutive assignments of 'source_num' and 'target_num'.
int target_num = t_params->port_num;
^
drivers/soundwire/cadence_master.c:1429:0: note: Same expression used in consecutive assignments of 'source_num' and 'target_num'.
int source_num = t_params->port_num;
^
vim +1379 drivers/soundwire/cadence_master.c
07abeff1ef1ae8 Vinod Koul 2018-04-26 1372
07abeff1ef1ae8 Vinod Koul 2018-04-26 1373 static int cdns_port_params(struct sdw_bus *bus,
07abeff1ef1ae8 Vinod Koul 2018-04-26 1374 struct sdw_port_params *p_params, unsigned int bank)
07abeff1ef1ae8 Vinod Koul 2018-04-26 1375 {
07abeff1ef1ae8 Vinod Koul 2018-04-26 1376 struct sdw_cdns *cdns = bus_to_cdns(bus);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1377 int dpn_config_off_source;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1378 int dpn_config_off_target;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 @1379 int target_num = p_params->num;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1380 int source_num = p_params->num;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1381 bool override = false;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1382 int dpn_config;
07abeff1ef1ae8 Vinod Koul 2018-04-26 1383
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1384 if (target_num == cdns->pdi_loopback_target &&
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1385 cdns->pdi_loopback_source != -1) {
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1386 source_num = cdns->pdi_loopback_source;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1387 override = true;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1388 }
07abeff1ef1ae8 Vinod Koul 2018-04-26 1389
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1390 if (bank) {
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1391 dpn_config_off_source = CDNS_DPN_B1_CONFIG(source_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1392 dpn_config_off_target = CDNS_DPN_B1_CONFIG(target_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1393 } else {
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1394 dpn_config_off_source = CDNS_DPN_B0_CONFIG(source_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1395 dpn_config_off_target = CDNS_DPN_B0_CONFIG(target_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1396 }
07abeff1ef1ae8 Vinod Koul 2018-04-26 1397
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1398 dpn_config = cdns_readl(cdns, dpn_config_off_source);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1399
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1400 /* use port params if there is no loopback, otherwise use source as is */
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1401 if (!override) {
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1402 u32p_replace_bits(&dpn_config, p_params->bps - 1, CDNS_DPN_CONFIG_WL);
714db045cf30f7 Vinod Koul 2020-09-17 1403 u32p_replace_bits(&dpn_config, p_params->flow_mode, CDNS_DPN_CONFIG_PORT_FLOW);
714db045cf30f7 Vinod Koul 2020-09-17 1404 u32p_replace_bits(&dpn_config, p_params->data_mode, CDNS_DPN_CONFIG_PORT_DAT);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1405 }
07abeff1ef1ae8 Vinod Koul 2018-04-26 1406
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1407 cdns_writel(cdns, dpn_config_off_target, dpn_config);
07abeff1ef1ae8 Vinod Koul 2018-04-26 1408
07abeff1ef1ae8 Vinod Koul 2018-04-26 1409 return 0;
07abeff1ef1ae8 Vinod Koul 2018-04-26 1410 }
07abeff1ef1ae8 Vinod Koul 2018-04-26 1411
07abeff1ef1ae8 Vinod Koul 2018-04-26 1412 static int cdns_transport_params(struct sdw_bus *bus,
07abeff1ef1ae8 Vinod Koul 2018-04-26 1413 struct sdw_transport_params *t_params,
07abeff1ef1ae8 Vinod Koul 2018-04-26 1414 enum sdw_reg_bank bank)
07abeff1ef1ae8 Vinod Koul 2018-04-26 1415 {
07abeff1ef1ae8 Vinod Koul 2018-04-26 1416 struct sdw_cdns *cdns = bus_to_cdns(bus);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1417 int dpn_config;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1418 int dpn_config_off_source;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1419 int dpn_config_off_target;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1420 int dpn_hctrl;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1421 int dpn_hctrl_off_source;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1422 int dpn_hctrl_off_target;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1423 int dpn_offsetctrl;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1424 int dpn_offsetctrl_off_source;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1425 int dpn_offsetctrl_off_target;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1426 int dpn_samplectrl;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1427 int dpn_samplectrl_off_source;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1428 int dpn_samplectrl_off_target;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 @1429 int source_num = t_params->port_num;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1430 int target_num = t_params->port_num;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1431 bool override = false;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1432
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1433 if (target_num == cdns->pdi_loopback_target &&
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1434 cdns->pdi_loopback_source != -1) {
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1435 source_num = cdns->pdi_loopback_source;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1436 override = true;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1437 }
07abeff1ef1ae8 Vinod Koul 2018-04-26 1438
07abeff1ef1ae8 Vinod Koul 2018-04-26 1439 /*
07abeff1ef1ae8 Vinod Koul 2018-04-26 1440 * Note: Only full data port is supported on the Master side for
07abeff1ef1ae8 Vinod Koul 2018-04-26 1441 * both PCM and PDM ports.
07abeff1ef1ae8 Vinod Koul 2018-04-26 1442 */
07abeff1ef1ae8 Vinod Koul 2018-04-26 1443
07abeff1ef1ae8 Vinod Koul 2018-04-26 1444 if (bank) {
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1445 dpn_config_off_source = CDNS_DPN_B1_CONFIG(source_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1446 dpn_hctrl_off_source = CDNS_DPN_B1_HCTRL(source_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1447 dpn_offsetctrl_off_source = CDNS_DPN_B1_OFFSET_CTRL(source_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1448 dpn_samplectrl_off_source = CDNS_DPN_B1_SAMPLE_CTRL(source_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1449
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1450 dpn_config_off_target = CDNS_DPN_B1_CONFIG(target_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1451 dpn_hctrl_off_target = CDNS_DPN_B1_HCTRL(target_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1452 dpn_offsetctrl_off_target = CDNS_DPN_B1_OFFSET_CTRL(target_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1453 dpn_samplectrl_off_target = CDNS_DPN_B1_SAMPLE_CTRL(target_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1454
07abeff1ef1ae8 Vinod Koul 2018-04-26 1455 } else {
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1456 dpn_config_off_source = CDNS_DPN_B0_CONFIG(source_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1457 dpn_hctrl_off_source = CDNS_DPN_B0_HCTRL(source_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1458 dpn_offsetctrl_off_source = CDNS_DPN_B0_OFFSET_CTRL(source_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1459 dpn_samplectrl_off_source = CDNS_DPN_B0_SAMPLE_CTRL(source_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1460
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1461 dpn_config_off_target = CDNS_DPN_B0_CONFIG(target_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1462 dpn_hctrl_off_target = CDNS_DPN_B0_HCTRL(target_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1463 dpn_offsetctrl_off_target = CDNS_DPN_B0_OFFSET_CTRL(target_num);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1464 dpn_samplectrl_off_target = CDNS_DPN_B0_SAMPLE_CTRL(target_num);
07abeff1ef1ae8 Vinod Koul 2018-04-26 1465 }
07abeff1ef1ae8 Vinod Koul 2018-04-26 1466
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1467 dpn_config = cdns_readl(cdns, dpn_config_off_source);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1468 if (!override) {
714db045cf30f7 Vinod Koul 2020-09-17 1469 u32p_replace_bits(&dpn_config, t_params->blk_grp_ctrl, CDNS_DPN_CONFIG_BGC);
714db045cf30f7 Vinod Koul 2020-09-17 1470 u32p_replace_bits(&dpn_config, t_params->blk_pkg_mode, CDNS_DPN_CONFIG_BPM);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1471 }
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1472 cdns_writel(cdns, dpn_config_off_target, dpn_config);
07abeff1ef1ae8 Vinod Koul 2018-04-26 1473
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1474 if (!override) {
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1475 dpn_offsetctrl = 0;
714db045cf30f7 Vinod Koul 2020-09-17 1476 u32p_replace_bits(&dpn_offsetctrl, t_params->offset1, CDNS_DPN_OFFSET_CTRL_1);
714db045cf30f7 Vinod Koul 2020-09-17 1477 u32p_replace_bits(&dpn_offsetctrl, t_params->offset2, CDNS_DPN_OFFSET_CTRL_2);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1478 } else {
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1479 dpn_offsetctrl = cdns_readl(cdns, dpn_offsetctrl_off_source);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1480 }
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1481 cdns_writel(cdns, dpn_offsetctrl_off_target, dpn_offsetctrl);
07abeff1ef1ae8 Vinod Koul 2018-04-26 1482
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1483 if (!override) {
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1484 dpn_hctrl = 0;
714db045cf30f7 Vinod Koul 2020-09-17 1485 u32p_replace_bits(&dpn_hctrl, t_params->hstart, CDNS_DPN_HCTRL_HSTART);
714db045cf30f7 Vinod Koul 2020-09-17 1486 u32p_replace_bits(&dpn_hctrl, t_params->hstop, CDNS_DPN_HCTRL_HSTOP);
714db045cf30f7 Vinod Koul 2020-09-17 1487 u32p_replace_bits(&dpn_hctrl, t_params->lane_ctrl, CDNS_DPN_HCTRL_LCTRL);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1488 } else {
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1489 dpn_hctrl = cdns_readl(cdns, dpn_hctrl_off_source);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1490 }
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1491 cdns_writel(cdns, dpn_hctrl_off_target, dpn_hctrl);
07abeff1ef1ae8 Vinod Koul 2018-04-26 1492
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1493 if (!override)
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1494 dpn_samplectrl = t_params->sample_interval - 1;
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1495 else
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1496 dpn_samplectrl = cdns_readl(cdns, dpn_samplectrl_off_source);
dd81e7c3f0bb4f Pierre-Louis Bossart 2021-07-14 1497 cdns_writel(cdns, dpn_samplectrl_off_target, dpn_samplectrl);
07abeff1ef1ae8 Vinod Koul 2018-04-26 1498
07abeff1ef1ae8 Vinod Koul 2018-04-26 1499 return 0;
07abeff1ef1ae8 Vinod Koul 2018-04-26 1500 }
07abeff1ef1ae8 Vinod Koul 2018-04-26 1501
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 months, 2 weeks
Re: [PATCH net-next] net: hsr: use hlist_head instead of list_head for mac addresses
by kernel test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220131090307.2654-1-claudiajkang(a)gmail.com>
References: <20220131090307.2654-1-claudiajkang(a)gmail.com>
TO: Juhee Kang <claudiajkang(a)gmail.com>
TO: davem(a)davemloft.net
TO: kuba(a)kernel.org
TO: netdev(a)vger.kernel.org
TO: arvid.brodin(a)alten.se
Hi Juhee,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Juhee-Kang/net-hsr-use-hlist_hea...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git ff58831fa02deb42fd731f830d8d9ec545573c7c
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago
config: nios2-randconfig-m031-20220131 (https://download.01.org/0day-ci/archive/20220131/202201312206.zqLlgLLt-lk...)
compiler: nios2-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
net/hsr/hsr_framereg.c:603 hsr_get_next_node() warn: ignoring unreachable code.
Old smatch warnings:
arch/nios2/include/asm/thread_info.h:71 current_thread_info() error: uninitialized symbol 'sp'.
vim +603 net/hsr/hsr_framereg.c
f421436a591d34 Arvid Brodin 2013-10-30 584
70ebe4a47185db Arvid Brodin 2014-07-04 585 void *hsr_get_next_node(struct hsr_priv *hsr, void *_pos,
f421436a591d34 Arvid Brodin 2013-10-30 586 unsigned char addr[ETH_ALEN])
f421436a591d34 Arvid Brodin 2013-10-30 587 {
70ebe4a47185db Arvid Brodin 2014-07-04 588 struct hsr_node *node;
4610359df4a1f5 Juhee Kang 2022-01-31 589 u32 hash;
4610359df4a1f5 Juhee Kang 2022-01-31 590
4610359df4a1f5 Juhee Kang 2022-01-31 591 hash = hsr_mac_hash(hsr, addr);
f421436a591d34 Arvid Brodin 2013-10-30 592
f421436a591d34 Arvid Brodin 2013-10-30 593 if (!_pos) {
4610359df4a1f5 Juhee Kang 2022-01-31 594 node = hlist_empty(&hsr->node_db[hash]) ? NULL :
4610359df4a1f5 Juhee Kang 2022-01-31 595 hlist_entry(hlist_first_rcu(&hsr->node_db[hash]),
70ebe4a47185db Arvid Brodin 2014-07-04 596 struct hsr_node, mac_list);
f421436a591d34 Arvid Brodin 2013-10-30 597 if (node)
b1b4aa91408028 Murali Karicheri 2019-04-05 598 ether_addr_copy(addr, node->macaddress_A);
f421436a591d34 Arvid Brodin 2013-10-30 599 return node;
f421436a591d34 Arvid Brodin 2013-10-30 600 }
f421436a591d34 Arvid Brodin 2013-10-30 601
f421436a591d34 Arvid Brodin 2013-10-30 602 node = _pos;
4610359df4a1f5 Juhee Kang 2022-01-31 @603 hlist_for_each_entry_continue_rcu(node, mac_list) {
b1b4aa91408028 Murali Karicheri 2019-04-05 604 ether_addr_copy(addr, node->macaddress_A);
f421436a591d34 Arvid Brodin 2013-10-30 605 return node;
f421436a591d34 Arvid Brodin 2013-10-30 606 }
f421436a591d34 Arvid Brodin 2013-10-30 607
f421436a591d34 Arvid Brodin 2013-10-30 608 return NULL;
f421436a591d34 Arvid Brodin 2013-10-30 609 }
f421436a591d34 Arvid Brodin 2013-10-30 610
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 months, 2 weeks
drivers/gpu/drm/i915/i915_scatterlist.c:154 i915_rsgt_from_buddy_resource() warn: should 'res->num_pages << 12' be a 64 bit type?
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Thomas Hellström" <thomas.hellstrom(a)linux.intel.com>
CC: Matthew Auld <matthew.auld(a)intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26291c54e111ff6ba87a164d85d4a4e134b7315c
commit: cad7109a2b5e7d48466b77728aa16ce55415eea0 drm/i915: Introduce refcounted sg-tables
date: 3 months ago
:::::: branch date: 25 hours ago
:::::: commit date: 3 months ago
config: i386-randconfig-m021-20220131 (https://download.01.org/0day-ci/archive/20220131/202201312218.4lsfgfAM-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/gpu/drm/i915/i915_scatterlist.c:154 i915_rsgt_from_buddy_resource() warn: should 'res->num_pages << 12' be a 64 bit type?
vim +154 drivers/gpu/drm/i915/i915_scatterlist.c
d148738923fdb5 Thomas Hellström 2021-06-02 136
f701b16d4cc535 Matthew Auld 2021-06-16 137 /**
cad7109a2b5e7d Thomas Hellström 2021-11-01 138 * i915_rsgt_from_buddy_resource - Create a refcounted sg_table from a struct
f701b16d4cc535 Matthew Auld 2021-06-16 139 * i915_buddy_block list
f701b16d4cc535 Matthew Auld 2021-06-16 140 * @res: The struct i915_ttm_buddy_resource.
f701b16d4cc535 Matthew Auld 2021-06-16 141 * @region_start: An offset to add to the dma addresses of the sg list.
f701b16d4cc535 Matthew Auld 2021-06-16 142 *
f701b16d4cc535 Matthew Auld 2021-06-16 143 * Create a struct sg_table, initializing it from struct i915_buddy_block list,
f701b16d4cc535 Matthew Auld 2021-06-16 144 * taking a maximum segment length into account, splitting into segments
f701b16d4cc535 Matthew Auld 2021-06-16 145 * if necessary.
f701b16d4cc535 Matthew Auld 2021-06-16 146 *
cad7109a2b5e7d Thomas Hellström 2021-11-01 147 * Return: A pointer to a kmalloced struct i915_refct_sgts on success, negative
f701b16d4cc535 Matthew Auld 2021-06-16 148 * error code cast to an error pointer on failure.
f701b16d4cc535 Matthew Auld 2021-06-16 149 */
cad7109a2b5e7d Thomas Hellström 2021-11-01 150 struct i915_refct_sgt *i915_rsgt_from_buddy_resource(struct ttm_resource *res,
f701b16d4cc535 Matthew Auld 2021-06-16 151 u64 region_start)
f701b16d4cc535 Matthew Auld 2021-06-16 152 {
f701b16d4cc535 Matthew Auld 2021-06-16 153 struct i915_ttm_buddy_resource *bman_res = to_ttm_buddy_resource(res);
f701b16d4cc535 Matthew Auld 2021-06-16 @154 const u64 size = res->num_pages << PAGE_SHIFT;
f701b16d4cc535 Matthew Auld 2021-06-16 155 const u64 max_segment = rounddown(UINT_MAX, PAGE_SIZE);
f701b16d4cc535 Matthew Auld 2021-06-16 156 struct i915_buddy_mm *mm = bman_res->mm;
f701b16d4cc535 Matthew Auld 2021-06-16 157 struct list_head *blocks = &bman_res->blocks;
f701b16d4cc535 Matthew Auld 2021-06-16 158 struct i915_buddy_block *block;
cad7109a2b5e7d Thomas Hellström 2021-11-01 159 struct i915_refct_sgt *rsgt;
f701b16d4cc535 Matthew Auld 2021-06-16 160 struct scatterlist *sg;
f701b16d4cc535 Matthew Auld 2021-06-16 161 struct sg_table *st;
f701b16d4cc535 Matthew Auld 2021-06-16 162 resource_size_t prev_end;
f701b16d4cc535 Matthew Auld 2021-06-16 163
f701b16d4cc535 Matthew Auld 2021-06-16 164 GEM_BUG_ON(list_empty(blocks));
f701b16d4cc535 Matthew Auld 2021-06-16 165
cad7109a2b5e7d Thomas Hellström 2021-11-01 166 rsgt = kmalloc(sizeof(*rsgt), GFP_KERNEL);
cad7109a2b5e7d Thomas Hellström 2021-11-01 167 if (!rsgt)
f701b16d4cc535 Matthew Auld 2021-06-16 168 return ERR_PTR(-ENOMEM);
f701b16d4cc535 Matthew Auld 2021-06-16 169
cad7109a2b5e7d Thomas Hellström 2021-11-01 170 i915_refct_sgt_init(rsgt, size);
cad7109a2b5e7d Thomas Hellström 2021-11-01 171 st = &rsgt->table;
f701b16d4cc535 Matthew Auld 2021-06-16 172 if (sg_alloc_table(st, res->num_pages, GFP_KERNEL)) {
cad7109a2b5e7d Thomas Hellström 2021-11-01 173 i915_refct_sgt_put(rsgt);
f701b16d4cc535 Matthew Auld 2021-06-16 174 return ERR_PTR(-ENOMEM);
f701b16d4cc535 Matthew Auld 2021-06-16 175 }
f701b16d4cc535 Matthew Auld 2021-06-16 176
f701b16d4cc535 Matthew Auld 2021-06-16 177 sg = st->sgl;
f701b16d4cc535 Matthew Auld 2021-06-16 178 st->nents = 0;
f701b16d4cc535 Matthew Auld 2021-06-16 179 prev_end = (resource_size_t)-1;
f701b16d4cc535 Matthew Auld 2021-06-16 180
f701b16d4cc535 Matthew Auld 2021-06-16 181 list_for_each_entry(block, blocks, link) {
f701b16d4cc535 Matthew Auld 2021-06-16 182 u64 block_size, offset;
f701b16d4cc535 Matthew Auld 2021-06-16 183
f701b16d4cc535 Matthew Auld 2021-06-16 184 block_size = min_t(u64, size, i915_buddy_block_size(mm, block));
f701b16d4cc535 Matthew Auld 2021-06-16 185 offset = i915_buddy_block_offset(block);
f701b16d4cc535 Matthew Auld 2021-06-16 186
f701b16d4cc535 Matthew Auld 2021-06-16 187 while (block_size) {
f701b16d4cc535 Matthew Auld 2021-06-16 188 u64 len;
f701b16d4cc535 Matthew Auld 2021-06-16 189
f701b16d4cc535 Matthew Auld 2021-06-16 190 if (offset != prev_end || sg->length >= max_segment) {
f701b16d4cc535 Matthew Auld 2021-06-16 191 if (st->nents)
f701b16d4cc535 Matthew Auld 2021-06-16 192 sg = __sg_next(sg);
f701b16d4cc535 Matthew Auld 2021-06-16 193
f701b16d4cc535 Matthew Auld 2021-06-16 194 sg_dma_address(sg) = region_start + offset;
f701b16d4cc535 Matthew Auld 2021-06-16 195 sg_dma_len(sg) = 0;
f701b16d4cc535 Matthew Auld 2021-06-16 196 sg->length = 0;
f701b16d4cc535 Matthew Auld 2021-06-16 197 st->nents++;
f701b16d4cc535 Matthew Auld 2021-06-16 198 }
f701b16d4cc535 Matthew Auld 2021-06-16 199
f701b16d4cc535 Matthew Auld 2021-06-16 200 len = min(block_size, max_segment - sg->length);
f701b16d4cc535 Matthew Auld 2021-06-16 201 sg->length += len;
f701b16d4cc535 Matthew Auld 2021-06-16 202 sg_dma_len(sg) += len;
f701b16d4cc535 Matthew Auld 2021-06-16 203
f701b16d4cc535 Matthew Auld 2021-06-16 204 offset += len;
f701b16d4cc535 Matthew Auld 2021-06-16 205 block_size -= len;
f701b16d4cc535 Matthew Auld 2021-06-16 206
f701b16d4cc535 Matthew Auld 2021-06-16 207 prev_end = offset;
f701b16d4cc535 Matthew Auld 2021-06-16 208 }
f701b16d4cc535 Matthew Auld 2021-06-16 209 }
f701b16d4cc535 Matthew Auld 2021-06-16 210
f701b16d4cc535 Matthew Auld 2021-06-16 211 sg_mark_end(sg);
f701b16d4cc535 Matthew Auld 2021-06-16 212 i915_sg_trim(st);
f701b16d4cc535 Matthew Auld 2021-06-16 213
cad7109a2b5e7d Thomas Hellström 2021-11-01 214 return rsgt;
f701b16d4cc535 Matthew Auld 2021-06-16 215 }
f701b16d4cc535 Matthew Auld 2021-06-16 216
:::::: The code at line 154 was first introduced by commit
:::::: f701b16d4cc535d24facdfdd21dc97a3691e5576 drm/i915/ttm: add i915_sg_from_buddy_resource
:::::: TO: Matthew Auld <matthew.auld(a)intel.com>
:::::: CC: Matthew Auld <matthew.auld(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 months, 2 weeks
lib/bch.c:842:7-8: WARNING opportunity for swap()
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov(a)linux.com>
CC: Julia Lawall <Julia.Lawall(a)inria.fr>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26291c54e111ff6ba87a164d85d4a4e134b7315c
commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script
date: 9 months ago
:::::: branch date: 23 hours ago
:::::: commit date: 9 months ago
config: x86_64-randconfig-c022-20220117 (https://download.01.org/0day-ci/archive/20220131/202201312002.gljszrs9-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> lib/bch.c:842:7-8: WARNING opportunity for swap()
lib/bch.c:849:7-8: WARNING opportunity for swap()
lib/bch.c:518:22-23: WARNING opportunity for swap()
--
>> drivers/leds/leds-tca6507.c:246:14-15: WARNING opportunity for swap()
--
>> drivers/phy/cadence/phy-cadence-torrent.c:2127:18-19: WARNING opportunity for swap()
--
>> drivers/w1/slaves/w1_therm.c:1840:18-19: WARNING opportunity for swap()
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 months, 2 weeks
net/core/dev.c:7069:1: warning: Address of stack memory associated with local variable 'list' is still referred to by the global variable 'softnet_data' upon returning to the caller. This will be a dangling reference [clang-analyzer-core.StackAddressEsca...
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Alexander Lobakin <alobakin(a)pm.me>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26291c54e111ff6ba87a164d85d4a4e134b7315c
commit: fec6e49b63989657bc4076dad99fa51d5ece34da skbuff: remove __kfree_skb_flush()
date: 12 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 12 months ago
config: arm-randconfig-c002-20220121 (https://download.01.org/0day-ci/archive/20220131/202201311834.PxIRw6Dj-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d4baf3b1322b84816aa623d8e8cb45a49cb68b84)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout fec6e49b63989657bc4076dad99fa51d5ece34da
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^
include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
(cond) ? \
^
net/core/dev.c:5885:3: note: Taking false branch
if (skb_vlan_tag_present(p))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/core/dev.c:5887:12: note: Calling 'skb_metadata_dst_cmp'
diffs |= skb_metadata_dst_cmp(p, skb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/dst_metadata.h:66:6: note: Assuming the condition is false
if (!(skb_a->_skb_refdst | skb_b->_skb_refdst))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/net/dst_metadata.h:66:2: note: '?' condition is false
if (!(skb_a->_skb_refdst | skb_b->_skb_refdst))
^
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^
include/net/dst_metadata.h:66:2: note: '?' condition is false
if (!(skb_a->_skb_refdst | skb_b->_skb_refdst))
^
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^
include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
(cond) ? \
^
include/net/dst_metadata.h:66:2: note: Taking false branch
if (!(skb_a->_skb_refdst | skb_b->_skb_refdst))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
include/net/dst_metadata.h:69:2: note: Value assigned to 'a'
a = (const struct metadata_dst *) skb_dst(skb_a);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/dst_metadata.h:72:6: note: Assuming 'a' is null
if (!a != !b || a->type != b->type)
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/net/dst_metadata.h:72:12: note: Assuming 'b' is null
if (!a != !b || a->type != b->type)
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/net/dst_metadata.h:72:6: note: Left side of '||' is false
if (!a != !b || a->type != b->type)
^
include/net/dst_metadata.h:72:18: note: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'a')
if (!a != !b || a->type != b->type)
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
net/core/dev.c:1037:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(name, dev->name);
^~~~~~
net/core/dev.c:1037:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(name, dev->name);
^~~~~~
net/core/dev.c:3215:4: warning: Value stored to 'name' is never read [clang-analyzer-deadcode.DeadStores]
name = dev_driver_string(dev->dev.parent);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/dev.c:3215:4: note: Value stored to 'name' is never read
name = dev_driver_string(dev->dev.parent);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/dev.c:3217:4: warning: Value stored to 'name' is never read [clang-analyzer-deadcode.DeadStores]
name = netdev_name(dev);
^ ~~~~~~~~~~~~~~~~
net/core/dev.c:3217:4: note: Value stored to 'name' is never read
name = netdev_name(dev);
^ ~~~~~~~~~~~~~~~~
>> net/core/dev.c:7069:1: warning: Address of stack memory associated with local variable 'list' is still referred to by the global variable 'softnet_data' upon returning to the caller. This will be a dangling reference [clang-analyzer-core.StackAddressEscape]
}
^
net/core/dev.c:7026:28: note: Loop condition is false. Exiting loop
struct softnet_data *sd = this_cpu_ptr(&softnet_data);
^
include/linux/percpu-defs.h:265:27: note: expanded from macro 'this_cpu_ptr'
#define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
^
include/linux/percpu-defs.h:264:26: note: expanded from macro 'raw_cpu_ptr'
#define raw_cpu_ptr(ptr) per_cpu_ptr(ptr, 0)
^
include/linux/percpu-defs.h:263:47: note: expanded from macro 'per_cpu_ptr'
#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
^
include/linux/percpu-defs.h:259:2: note: expanded from macro 'VERIFY_PERCPU_PTR'
__verify_pcpu_ptr(__p); \
^
include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr'
#define __verify_pcpu_ptr(ptr) \
^
net/core/dev.c:7033:2: note: Loop condition is false. Exiting loop
local_irq_disable();
^
include/linux/irqflags.h:224:29: note: expanded from macro 'local_irq_disable'
#define local_irq_disable() do { raw_local_irq_disable(); } while (0)
^
net/core/dev.c:7035:2: note: Loop condition is false. Exiting loop
local_irq_enable();
^
include/linux/irqflags.h:223:28: note: expanded from macro 'local_irq_enable'
#define local_irq_enable() do { raw_local_irq_enable(); } while (0)
^
net/core/dev.c:7037:2: note: Loop condition is true. Entering loop body
for (;;) {
^
net/core/dev.c:7040:3: note: Assuming the condition is false
if (list_empty(&list)) {
^
include/linux/compiler.h:56:45: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
net/core/dev.c:7040:3: note: '?' condition is false
if (list_empty(&list)) {
^
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^
net/core/dev.c:7040:3: note: Assuming the condition is false
if (list_empty(&list)) {
^
include/linux/compiler.h:56:45: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
~~~~~~~~~~~~~~~~~^~~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
net/core/dev.c:7040:3: note: '?' condition is true
if (list_empty(&list)) {
^
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^
include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
(cond) ? \
^
net/core/dev.c:7040:3: note: Taking true branch
if (list_empty(&list)) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/core/dev.c:7041:8: note: Left side of '&&' is true
if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
^
net/core/dev.c:7041:4: note: Assuming the condition is false
if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
^
include/linux/compiler.h:56:45: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
net/core/dev.c:7041:4: note: '?' condition is false
if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
^
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^
net/core/dev.c:7041:8: note: Left side of '&&' is true
if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
^
net/core/dev.c:7041:4: note: Assuming the condition is true
if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
^
include/linux/compiler.h:56:45: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
~~~~~~~~~~~~~~~~~^~~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
net/core/dev.c:7041:4: note: '?' condition is false
if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
^
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^
include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
(cond) ? \
^
net/core/dev.c:7041:4: note: Taking false branch
if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/core/dev.c:7043:4: note: Execution continues on line 7060
break;
^
net/core/dev.c:7060:2: note: Loop condition is false. Exiting loop
local_irq_disable();
^
include/linux/irqflags.h:224:29: note: expanded from macro 'local_irq_disable'
#define local_irq_disable() do { raw_local_irq_disable(); } while (0)
^
net/core/dev.c:7065:6: note: Assuming the condition is false
if (!list_empty(&sd->poll_list))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
net/core/dev.c:7065:2: note: '?' condition is false
if (!list_empty(&sd->poll_list))
^
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^
net/core/dev.c:7065:6: note: Assuming the condition is false
if (!list_empty(&sd->poll_list))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
net/core/dev.c:7065:2: note: '?' condition is false
if (!list_empty(&sd->poll_list))
^
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^
include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
(cond) ? \
^
net/core/dev.c:7065:2: note: Taking false branch
if (!list_empty(&sd->poll_list))
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/core/dev.c:7069:1: note: Address of stack memory associated with local variable 'list' is still referred to by the global variable 'softnet_data' upon returning to the caller. This will be a dangling reference
}
^
>> net/core/dev.c:7069:1: warning: Address of stack memory associated with local variable 'repoll' is still referred to by the global variable 'softnet_data' upon returning to the caller. This will be a dangling reference [clang-analyzer-core.StackAddressEscape]
}
^
net/core/dev.c:7026:28: note: Loop condition is false. Exiting loop
struct softnet_data *sd = this_cpu_ptr(&softnet_data);
^
include/linux/percpu-defs.h:265:27: note: expanded from macro 'this_cpu_ptr'
#define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
^
include/linux/percpu-defs.h:264:26: note: expanded from macro 'raw_cpu_ptr'
#define raw_cpu_ptr(ptr) per_cpu_ptr(ptr, 0)
^
include/linux/percpu-defs.h:263:47: note: expanded from macro 'per_cpu_ptr'
#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
^
include/linux/percpu-defs.h:259:2: note: expanded from macro 'VERIFY_PERCPU_PTR'
__verify_pcpu_ptr(__p); \
^
include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr'
#define __verify_pcpu_ptr(ptr) \
^
net/core/dev.c:7033:2: note: Loop condition is false. Exiting loop
local_irq_disable();
^
include/linux/irqflags.h:224:29: note: expanded from macro 'local_irq_disable'
#define local_irq_disable() do { raw_local_irq_disable(); } while (0)
^
net/core/dev.c:7035:2: note: Loop condition is false. Exiting loop
local_irq_enable();
^
include/linux/irqflags.h:223:28: note: expanded from macro 'local_irq_enable'
#define local_irq_enable() do { raw_local_irq_enable(); } while (0)
^
net/core/dev.c:7037:2: note: Loop condition is true. Entering loop body
for (;;) {
^
net/core/dev.c:7040:3: note: Assuming the condition is false
if (list_empty(&list)) {
^
include/linux/compiler.h:56:45: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
net/core/dev.c:7040:3: note: '?' condition is false
if (list_empty(&list)) {
^
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^
net/core/dev.c:7040:3: note: Assuming the condition is false
if (list_empty(&list)) {
^
include/linux/compiler.h:56:45: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
~~~~~~~~~~~~~~~~~^~~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
net/core/dev.c:7040:3: note: '?' condition is true
if (list_empty(&list)) {
^
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^
include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
(cond) ? \
^
net/core/dev.c:7040:3: note: Taking true branch
if (list_empty(&list)) {
^
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
net/core/dev.c:7041:8: note: Left side of '&&' is true
if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
^
net/core/dev.c:7041:4: note: Assuming the condition is false
if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
^
include/linux/compiler.h:56:45: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
net/core/dev.c:7041:4: note: '?' condition is false
if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
^
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
vim +7069 net/core/dev.c
29863d41bb6e1d Wei Wang 2021-02-08 7023
0766f788eb727e Emese Revfy 2016-06-20 7024 static __latent_entropy void net_rx_action(struct softirq_action *h)
726ce70e9e4050 Herbert Xu 2014-12-21 7025 {
726ce70e9e4050 Herbert Xu 2014-12-21 7026 struct softnet_data *sd = this_cpu_ptr(&softnet_data);
7acf8a1e8a28b3 Matthew Whitehead 2017-04-19 7027 unsigned long time_limit = jiffies +
7acf8a1e8a28b3 Matthew Whitehead 2017-04-19 7028 usecs_to_jiffies(netdev_budget_usecs);
726ce70e9e4050 Herbert Xu 2014-12-21 7029 int budget = netdev_budget;
726ce70e9e4050 Herbert Xu 2014-12-21 7030 LIST_HEAD(list);
726ce70e9e4050 Herbert Xu 2014-12-21 7031 LIST_HEAD(repoll);
726ce70e9e4050 Herbert Xu 2014-12-21 7032
726ce70e9e4050 Herbert Xu 2014-12-21 7033 local_irq_disable();
726ce70e9e4050 Herbert Xu 2014-12-21 7034 list_splice_init(&sd->poll_list, &list);
726ce70e9e4050 Herbert Xu 2014-12-21 7035 local_irq_enable();
726ce70e9e4050 Herbert Xu 2014-12-21 7036
ceb8d5bf17d366 Herbert Xu 2014-12-21 7037 for (;;) {
726ce70e9e4050 Herbert Xu 2014-12-21 7038 struct napi_struct *n;
726ce70e9e4050 Herbert Xu 2014-12-21 7039
ceb8d5bf17d366 Herbert Xu 2014-12-21 7040 if (list_empty(&list)) {
ceb8d5bf17d366 Herbert Xu 2014-12-21 7041 if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
fec6e49b639896 Alexander Lobakin 2021-02-13 7042 return;
ceb8d5bf17d366 Herbert Xu 2014-12-21 7043 break;
ceb8d5bf17d366 Herbert Xu 2014-12-21 7044 }
ceb8d5bf17d366 Herbert Xu 2014-12-21 7045
6bd373ebbac4b1 Herbert Xu 2014-12-21 7046 n = list_first_entry(&list, struct napi_struct, poll_list);
6bd373ebbac4b1 Herbert Xu 2014-12-21 7047 budget -= napi_poll(n, &repoll);
6bd373ebbac4b1 Herbert Xu 2014-12-21 7048
726ce70e9e4050 Herbert Xu 2014-12-21 7049 /* If softirq window is exhausted then punt.
726ce70e9e4050 Herbert Xu 2014-12-21 7050 * Allow this to run for 2 jiffies since which will allow
726ce70e9e4050 Herbert Xu 2014-12-21 7051 * an average latency of 1.5/HZ.
726ce70e9e4050 Herbert Xu 2014-12-21 7052 */
ceb8d5bf17d366 Herbert Xu 2014-12-21 7053 if (unlikely(budget <= 0 ||
ceb8d5bf17d366 Herbert Xu 2014-12-21 7054 time_after_eq(jiffies, time_limit))) {
ceb8d5bf17d366 Herbert Xu 2014-12-21 7055 sd->time_squeeze++;
ceb8d5bf17d366 Herbert Xu 2014-12-21 7056 break;
ceb8d5bf17d366 Herbert Xu 2014-12-21 7057 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 7058 }
d75b1ade567ffa Eric Dumazet 2014-11-02 7059
d75b1ade567ffa Eric Dumazet 2014-11-02 7060 local_irq_disable();
d75b1ade567ffa Eric Dumazet 2014-11-02 7061
d75b1ade567ffa Eric Dumazet 2014-11-02 7062 list_splice_tail_init(&sd->poll_list, &list);
d75b1ade567ffa Eric Dumazet 2014-11-02 7063 list_splice_tail(&repoll, &list);
d75b1ade567ffa Eric Dumazet 2014-11-02 7064 list_splice(&list, &sd->poll_list);
d75b1ade567ffa Eric Dumazet 2014-11-02 @7065 if (!list_empty(&sd->poll_list))
d75b1ade567ffa Eric Dumazet 2014-11-02 7066 __raise_softirq_irqoff(NET_RX_SOFTIRQ);
d75b1ade567ffa Eric Dumazet 2014-11-02 7067
e326bed2f47d03 Eric Dumazet 2010-04-22 7068 net_rps_action_and_irq_enable(sd);
^1da177e4c3f41 Linus Torvalds 2005-04-16 @7069 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 7070
:::::: The code at line 7069 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 months, 2 weeks
drivers/infiniband/core/uverbs_ioctl.c:765 _uverbs_get_const_signed() warn: passing a valid pointer to 'PTR_ERR'
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Yishai Hadas <yishaih(a)nvidia.com>
CC: Jason Gunthorpe <jgg(a)nvidia.com>
CC: Leon Romanovsky <leonro(a)nvidia.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26291c54e111ff6ba87a164d85d4a4e134b7315c
commit: 2904bb37b35d07be7bfa3fb4a0fc1a3daa6678b3 IB/core: Split uverbs_get_const/default to consider target type
date: 11 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 11 months ago
config: i386-randconfig-m021-20220131 (https://download.01.org/0day-ci/archive/20220131/202201311721.7IgTUarj-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/infiniband/core/uverbs_ioctl.c:765 _uverbs_get_const_signed() warn: passing a valid pointer to 'PTR_ERR'
drivers/infiniband/core/uverbs_ioctl.c:788 _uverbs_get_const_unsigned() warn: passing a valid pointer to 'PTR_ERR'
Old smatch warnings:
drivers/infiniband/core/uverbs_ioctl.c:730 uverbs_copy_to() warn: passing a valid pointer to 'PTR_ERR'
drivers/infiniband/core/uverbs_ioctl.c:750 uverbs_output_written() warn: passing a valid pointer to 'PTR_ERR'
drivers/infiniband/core/uverbs_ioctl.c:808 uverbs_copy_to_struct_or_zero() warn: passing a valid pointer to 'PTR_ERR'
vim +/PTR_ERR +765 drivers/infiniband/core/uverbs_ioctl.c
d6f4a21f309dfe Jason Gunthorpe 2019-01-11 754
2904bb37b35d07 Yishai Hadas 2021-03-04 755 int _uverbs_get_const_signed(s64 *to,
2904bb37b35d07 Yishai Hadas 2021-03-04 756 const struct uverbs_attr_bundle *attrs_bundle,
0953fffec9ba02 Mark Bloch 2018-08-28 757 size_t idx, s64 lower_bound, u64 upper_bound,
0953fffec9ba02 Mark Bloch 2018-08-28 758 s64 *def_val)
0953fffec9ba02 Mark Bloch 2018-08-28 759 {
0953fffec9ba02 Mark Bloch 2018-08-28 760 const struct uverbs_attr *attr;
0953fffec9ba02 Mark Bloch 2018-08-28 761
0953fffec9ba02 Mark Bloch 2018-08-28 762 attr = uverbs_attr_get(attrs_bundle, idx);
0953fffec9ba02 Mark Bloch 2018-08-28 763 if (IS_ERR(attr)) {
0953fffec9ba02 Mark Bloch 2018-08-28 764 if ((PTR_ERR(attr) != -ENOENT) || !def_val)
0953fffec9ba02 Mark Bloch 2018-08-28 @765 return PTR_ERR(attr);
0953fffec9ba02 Mark Bloch 2018-08-28 766
0953fffec9ba02 Mark Bloch 2018-08-28 767 *to = *def_val;
0953fffec9ba02 Mark Bloch 2018-08-28 768 } else {
0953fffec9ba02 Mark Bloch 2018-08-28 769 *to = attr->ptr_attr.data;
0953fffec9ba02 Mark Bloch 2018-08-28 770 }
0953fffec9ba02 Mark Bloch 2018-08-28 771
0953fffec9ba02 Mark Bloch 2018-08-28 772 if (*to < lower_bound || (*to > 0 && (u64)*to > upper_bound))
0953fffec9ba02 Mark Bloch 2018-08-28 773 return -EINVAL;
0953fffec9ba02 Mark Bloch 2018-08-28 774
0953fffec9ba02 Mark Bloch 2018-08-28 775 return 0;
0953fffec9ba02 Mark Bloch 2018-08-28 776 }
2904bb37b35d07 Yishai Hadas 2021-03-04 777 EXPORT_SYMBOL(_uverbs_get_const_signed);
2904bb37b35d07 Yishai Hadas 2021-03-04 778
2904bb37b35d07 Yishai Hadas 2021-03-04 779 int _uverbs_get_const_unsigned(u64 *to,
2904bb37b35d07 Yishai Hadas 2021-03-04 780 const struct uverbs_attr_bundle *attrs_bundle,
2904bb37b35d07 Yishai Hadas 2021-03-04 781 size_t idx, u64 upper_bound, u64 *def_val)
2904bb37b35d07 Yishai Hadas 2021-03-04 782 {
2904bb37b35d07 Yishai Hadas 2021-03-04 783 const struct uverbs_attr *attr;
2904bb37b35d07 Yishai Hadas 2021-03-04 784
2904bb37b35d07 Yishai Hadas 2021-03-04 785 attr = uverbs_attr_get(attrs_bundle, idx);
2904bb37b35d07 Yishai Hadas 2021-03-04 786 if (IS_ERR(attr)) {
2904bb37b35d07 Yishai Hadas 2021-03-04 787 if ((PTR_ERR(attr) != -ENOENT) || !def_val)
2904bb37b35d07 Yishai Hadas 2021-03-04 @788 return PTR_ERR(attr);
2904bb37b35d07 Yishai Hadas 2021-03-04 789
2904bb37b35d07 Yishai Hadas 2021-03-04 790 *to = *def_val;
2904bb37b35d07 Yishai Hadas 2021-03-04 791 } else {
2904bb37b35d07 Yishai Hadas 2021-03-04 792 *to = attr->ptr_attr.data;
2904bb37b35d07 Yishai Hadas 2021-03-04 793 }
2904bb37b35d07 Yishai Hadas 2021-03-04 794
2904bb37b35d07 Yishai Hadas 2021-03-04 795 if (*to > upper_bound)
2904bb37b35d07 Yishai Hadas 2021-03-04 796 return -EINVAL;
2904bb37b35d07 Yishai Hadas 2021-03-04 797
2904bb37b35d07 Yishai Hadas 2021-03-04 798 return 0;
2904bb37b35d07 Yishai Hadas 2021-03-04 799 }
2904bb37b35d07 Yishai Hadas 2021-03-04 800 EXPORT_SYMBOL(_uverbs_get_const_unsigned);
2e8039c656224b Michael Guralnik 2018-12-09 801
:::::: The code at line 765 was first introduced by commit
:::::: 0953fffec9ba022f63bfe01e86427530d8320d5c RDMA/uverbs: Add UVERBS_ATTR_CONST_IN to the specs language
:::::: TO: Mark Bloch <markb(a)mellanox.com>
:::::: CC: Jason Gunthorpe <jgg(a)mellanox.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
3 months, 2 weeks