All of lore.kernel.org
 help / color / mirror / Atom feed
* [arnd-playground:randconfig-7.3-next 245/673] arch/arc/kernel/setup.c:588:9: warning: format not a string literal and no format arguments
@ 2026-09-25 10:25 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-25 10:25 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git randconfig-7.3-next
head:   0a1affa74ef2f2c5c5ee74fc604e47a1aefdd286
commit: e05b65be2284afdfc5b431631b5b86878c530488 [245/673] treewide: address -Wformat-security warnings
config: arc-allnoconfig (https://download.01.org/0day-ci/archive/20260925/202609251833.SPhnmXte-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260925/202609251833.SPhnmXte-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609251833.SPhnmXte-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/arc/kernel/setup.c: In function 'show_cpuinfo':
>> arch/arc/kernel/setup.c:588:9: warning: format not a string literal and no format arguments [-Wformat-security]
     588 |         seq_printf(m, arc_cpu_mumbojumbo(cpu_id, &info, str, PAGE_SIZE));
         |         ^~~~~~~~~~
   arch/arc/kernel/setup.c:606:9: warning: format not a string literal and no format arguments [-Wformat-security]
     606 |         seq_printf(m, arc_platform_smp_cpuinfo());
         |         ^~~~~~~~~~


vim +588 arch/arc/kernel/setup.c

c121c5063c0674f Vineet Gupta   2013-01-18  569  
c121c5063c0674f Vineet Gupta   2013-01-18  570  static int show_cpuinfo(struct seq_file *m, void *v)
c121c5063c0674f Vineet Gupta   2013-01-18  571  {
c121c5063c0674f Vineet Gupta   2013-01-18  572  	char *str;
c121c5063c0674f Vineet Gupta   2013-01-18  573  	int cpu_id = ptr_to_cpu(v);
7f35144cea21910 Vlad Zakharov  2017-03-03  574  	struct device *cpu_dev = get_cpu_device(cpu_id);
fad84e39f116035 Vineet Gupta   2020-06-11  575  	struct cpuinfo_arc info;
7f35144cea21910 Vlad Zakharov  2017-03-03  576  	struct clk *cpu_clk;
7f35144cea21910 Vlad Zakharov  2017-03-03  577  	unsigned long freq = 0;
c121c5063c0674f Vineet Gupta   2013-01-18  578  
4c86231c14a8a1e Vineet Gupta   2014-12-12  579  	if (!cpu_online(cpu_id)) {
4c86231c14a8a1e Vineet Gupta   2014-12-12  580  		seq_printf(m, "processor [%d]\t: Offline\n", cpu_id);
4c86231c14a8a1e Vineet Gupta   2014-12-12  581  		goto done;
4c86231c14a8a1e Vineet Gupta   2014-12-12  582  	}
4c86231c14a8a1e Vineet Gupta   2014-12-12  583  
0ee931c4e31a5ef Michal Hocko   2017-09-13  584  	str = (char *)__get_free_page(GFP_KERNEL);
c121c5063c0674f Vineet Gupta   2013-01-18  585  	if (!str)
c121c5063c0674f Vineet Gupta   2013-01-18  586  		goto done;
c121c5063c0674f Vineet Gupta   2013-01-18  587  
fad84e39f116035 Vineet Gupta   2020-06-11 @588  	seq_printf(m, arc_cpu_mumbojumbo(cpu_id, &info, str, PAGE_SIZE));
c121c5063c0674f Vineet Gupta   2013-01-18  589  
7f35144cea21910 Vlad Zakharov  2017-03-03  590  	cpu_clk = clk_get(cpu_dev, NULL);
7f35144cea21910 Vlad Zakharov  2017-03-03  591  	if (IS_ERR(cpu_clk)) {
7f35144cea21910 Vlad Zakharov  2017-03-03  592  		seq_printf(m, "CPU speed \t: Cannot get clock for processor [%d]\n",
7f35144cea21910 Vlad Zakharov  2017-03-03  593  			   cpu_id);
7f35144cea21910 Vlad Zakharov  2017-03-03  594  	} else {
7f35144cea21910 Vlad Zakharov  2017-03-03  595  		freq = clk_get_rate(cpu_clk);
d12c6a6f0c8fd5b blaze          2026-09-09  596  		clk_put(cpu_clk);
7f35144cea21910 Vlad Zakharov  2017-03-03  597  	}
20c7dbbdbe12db7 Alexey Brodkin 2016-02-01  598  	if (freq)
7f35144cea21910 Vlad Zakharov  2017-03-03  599  		seq_printf(m, "CPU speed\t: %lu.%02lu Mhz\n",
20c7dbbdbe12db7 Alexey Brodkin 2016-02-01  600  			   freq / 1000000, (freq / 10000) % 100);
20c7dbbdbe12db7 Alexey Brodkin 2016-02-01  601  
56372082533afb8 Vineet Gupta   2014-09-25  602  	seq_printf(m, "Bogo MIPS\t: %lu.%02lu\n",
c121c5063c0674f Vineet Gupta   2013-01-18  603  		   loops_per_jiffy / (500000 / HZ),
c121c5063c0674f Vineet Gupta   2013-01-18  604  		   (loops_per_jiffy / (5000 / HZ)) % 100);
c121c5063c0674f Vineet Gupta   2013-01-18  605  
af61742813aa9dd Vineet Gupta   2013-01-18  606  	seq_printf(m, arc_platform_smp_cpuinfo());
af61742813aa9dd Vineet Gupta   2013-01-18  607  
c121c5063c0674f Vineet Gupta   2013-01-18  608  	free_page((unsigned long)str);
c121c5063c0674f Vineet Gupta   2013-01-18  609  done:
4c86231c14a8a1e Vineet Gupta   2014-12-12  610  	seq_printf(m, "\n");
c121c5063c0674f Vineet Gupta   2013-01-18  611  
c121c5063c0674f Vineet Gupta   2013-01-18  612  	return 0;
c121c5063c0674f Vineet Gupta   2013-01-18  613  }
c121c5063c0674f Vineet Gupta   2013-01-18  614  

:::::: The code at line 588 was first introduced by commit
:::::: fad84e39f116035ae8d550c6020107b8ac113b45 ARC: boot log: eliminate struct cpuinfo_arc #4: boot log per ISA

:::::: TO: Vineet Gupta <vgupta@kernel.org>
:::::: CC: Vineet Gupta <vgupta@kernel.org>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-25 10:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-25 10:25 [arnd-playground:randconfig-7.3-next 245/673] arch/arc/kernel/setup.c:588:9: warning: format not a string literal and no format arguments kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.