public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [rmk:for-next 35/36] drivers/clk/clkdev.c:195:9: error: incompatible pointer types assigning to 'va_list *' (aka '__builtin_va_list *') from '__va_list_tag **' (aka 'struct __va_list_tag **')
@ 2024-05-05  4:05 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-05  4:05 UTC (permalink / raw)
  To: Russell King (Oracle); +Cc: llvm, oe-kbuild-all, Stephen Boyd

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux.git for-next
head:   15b7967c1ef112c0f4179ed4e9a537e84388210b
commit: 5d998425e37b10e05393941e7a8fbefd3d1d4101 [35/36] clkdev: report over-sized strings when creating clkdev entries
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20240505/202405051144.MvurG5wM-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 37ae4ad0eef338776c7e2cffb3896153d43dcd90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240505/202405051144.MvurG5wM-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/202405051144.MvurG5wM-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/clk/clkdev.c:195:9: error: incompatible pointer types assigning to 'va_list *' (aka '__builtin_va_list *') from '__va_list_tag **' (aka 'struct __va_list_tag **') [-Werror,-Wincompatible-pointer-types]
     195 |         fmt.va = &ap;
         |                ^ ~~~
   1 error generated.


vim +195 drivers/clk/clkdev.c

   155	
   156	static struct clk_lookup * __ref
   157	vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt,
   158		va_list ap)
   159	{
   160		struct clk_lookup_alloc *cla;
   161		struct va_format fmt;
   162		const char *failure;
   163		size_t max_size;
   164		ssize_t res;
   165	
   166		cla = kzalloc(sizeof(*cla), GFP_KERNEL);
   167		if (!cla)
   168			return NULL;
   169	
   170		cla->cl.clk_hw = hw;
   171		if (con_id) {
   172			res = strscpy(cla->con_id, con_id, sizeof(cla->con_id));
   173			if (res < 0) {
   174				max_size = sizeof(cla->con_id);
   175				failure = "connection";
   176				goto fail;
   177			}
   178			cla->cl.con_id = cla->con_id;
   179		}
   180	
   181		if (dev_fmt) {
   182			res = vsnprintf(cla->dev_id, sizeof(cla->dev_id), dev_fmt, ap);
   183			if (res >= sizeof(cla->dev_id)) {
   184				max_size = sizeof(cla->dev_id);
   185				failure = "device";
   186				goto fail;
   187			}
   188			cla->cl.dev_id = cla->dev_id;
   189		}
   190	
   191		return &cla->cl;
   192	
   193	fail:
   194		fmt.fmt = dev_fmt;
 > 195		fmt.va = &ap;
   196		pr_err("%pV:%s: %s ID is greater than %zu\n",
   197		       &fmt, con_id, failure, max_size);
   198		kfree(cla);
   199		return NULL;
   200	}
   201	

-- 
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:[~2024-05-05  4:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-05  4:05 [rmk:for-next 35/36] drivers/clk/clkdev.c:195:9: error: incompatible pointer types assigning to 'va_list *' (aka '__builtin_va_list *') from '__va_list_tag **' (aka 'struct __va_list_tag **') kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox