public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Naresh Solanki <naresh.solanki@9elements.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Naresh Solanki <naresh.solanki@9elements.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] regulator: event: Add regulator netlink event support
Date: Tue, 21 Nov 2023 12:30:38 +0800	[thread overview]
Message-ID: <202311211259.fKjbHG1i-lkp@intel.com> (raw)
In-Reply-To: <20231120194311.3581036-1-naresh.solanki@9elements.com>

Hi Naresh,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 753e4d5c433da57da75dd4c3e1aececc8e874a62]

url:    https://github.com/intel-lab-lkp/linux/commits/Naresh-Solanki/regulator-event-Add-regulator-netlink-event-support/20231121-034604
base:   753e4d5c433da57da75dd4c3e1aececc8e874a62
patch link:    https://lore.kernel.org/r/20231120194311.3581036-1-naresh.solanki%409elements.com
patch subject: [PATCH v1] regulator: event: Add regulator netlink event support
config: arm-randconfig-003-20231121 (https://download.01.org/0day-ci/archive/20231121/202311211259.fKjbHG1i-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231121/202311211259.fKjbHG1i-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/202311211259.fKjbHG1i-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:31,
                    from include/linux/skbuff.h:13,
                    from include/linux/netlink.h:7,
                    from include/net/netlink.h:6,
                    from drivers/regulator/event.c:3:
   drivers/regulator/event.c: In function 'reg_generate_netlink_event':
>> drivers/regulator/event.c:92:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u64' {aka 'long long unsigned int'} [-Wformat=]
      92 |         pr_debug("%s -> %lx , ret: %x %x", reg_name, event, size);
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:345:21: note: in definition of macro 'pr_fmt'
     345 | #define pr_fmt(fmt) fmt
         |                     ^~~
   include/linux/dynamic_debug.h:248:9: note: in expansion of macro '__dynamic_func_call_cls'
     248 |         __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:250:9: note: in expansion of macro '_dynamic_func_call_cls'
     250 |         _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:269:9: note: in expansion of macro '_dynamic_func_call'
     269 |         _dynamic_func_call(fmt, __dynamic_pr_debug,             \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:579:9: note: in expansion of macro 'dynamic_pr_debug'
     579 |         dynamic_pr_debug(fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~
   drivers/regulator/event.c:92:9: note: in expansion of macro 'pr_debug'
      92 |         pr_debug("%s -> %lx , ret: %x %x", reg_name, event, size);
         |         ^~~~~~~~
   drivers/regulator/event.c:92:27: note: format string is defined here
      92 |         pr_debug("%s -> %lx , ret: %x %x", reg_name, event, size);
         |                         ~~^
         |                           |
         |                           long unsigned int
         |                         %llx
>> drivers/regulator/event.c:92:18: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=]
      92 |         pr_debug("%s -> %lx , ret: %x %x", reg_name, event, size);
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:345:21: note: in definition of macro 'pr_fmt'
     345 | #define pr_fmt(fmt) fmt
         |                     ^~~
   include/linux/dynamic_debug.h:248:9: note: in expansion of macro '__dynamic_func_call_cls'
     248 |         __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:250:9: note: in expansion of macro '_dynamic_func_call_cls'
     250 |         _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:269:9: note: in expansion of macro '_dynamic_func_call'
     269 |         _dynamic_func_call(fmt, __dynamic_pr_debug,             \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/printk.h:579:9: note: in expansion of macro 'dynamic_pr_debug'
     579 |         dynamic_pr_debug(fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~
   drivers/regulator/event.c:92:9: note: in expansion of macro 'pr_debug'
      92 |         pr_debug("%s -> %lx , ret: %x %x", reg_name, event, size);
         |         ^~~~~~~~
   drivers/regulator/event.c:92:40: note: format string is defined here
      92 |         pr_debug("%s -> %lx , ret: %x %x", reg_name, event, size);
         |                                       ~^
         |                                        |
         |                                        unsigned int


vim +92 drivers/regulator/event.c

    49	
    50	int reg_generate_netlink_event(const char *reg_name, u64 event)
    51	{
    52		struct sk_buff *skb;
    53		struct nlattr *attr;
    54		struct reg_genl_event *edata;
    55		void *msg_header;
    56		int size;
    57	
    58		/* allocate memory */
    59		size = nla_total_size(sizeof(struct reg_genl_event)) +
    60		    nla_total_size(0);
    61	
    62		skb = genlmsg_new(size, GFP_ATOMIC);
    63		if (!skb)
    64			return -ENOMEM;
    65	
    66		/* add the genetlink message header */
    67		msg_header = genlmsg_put(skb, 0, reg_event_seqnum++,
    68					 &reg_event_genl_family, 0,
    69					 REG_GENL_CMD_EVENT);
    70		if (!msg_header) {
    71			nlmsg_free(skb);
    72			return -ENOMEM;
    73		}
    74	
    75		/* fill the data */
    76		attr = nla_reserve(skb, REG_GENL_ATTR_EVENT, sizeof(struct reg_genl_event));
    77		if (!attr) {
    78			nlmsg_free(skb);
    79			return -EINVAL;
    80		}
    81	
    82		edata = nla_data(attr);
    83		memset(edata, 0, sizeof(struct reg_genl_event));
    84	
    85		strscpy(edata->reg_name, reg_name, sizeof(edata->reg_name));
    86		edata->event = event;
    87	
    88		/* send multicast genetlink message */
    89		genlmsg_end(skb, msg_header);
    90		size = genlmsg_multicast(&reg_event_genl_family, skb, 0, 0, GFP_ATOMIC);
    91	
  > 92		pr_debug("%s -> %lx , ret: %x %x", reg_name, event, size);
    93		if (size == -ESRCH)
    94			pr_debug("multicast message sent, but nobody was listening...\n");
    95		else if (size)
    96			pr_debug("failed to send multicast genl message\n");
    97		else
    98			pr_debug("multicast message sent %d\n", reg_event_seqnum);
    99	
   100		return 0;
   101	}
   102	EXPORT_SYMBOL(reg_generate_netlink_event);
   103	

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

  reply	other threads:[~2023-11-21  4:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 19:43 [PATCH v1] regulator: event: Add regulator netlink event support Naresh Solanki
2023-11-21  4:30 ` kernel test robot [this message]
2023-11-21  5:50 ` kernel test robot
2023-11-21  8:45 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202311211259.fKjbHG1i-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naresh.solanki@9elements.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox