All of lore.kernel.org
 help / color / mirror / Atom feed
* [remoteproc:rpmsg-next 6/6] samples/rpmsg/rpmsg_client_sample.c:68:39: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t' {aka 'int'}
@ 2026-09-07 11:33 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-07 11:33 UTC (permalink / raw)
  To: Tanmay Shah; +Cc: oe-kbuild-all, Mathieu Poirier

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git rpmsg-next
head:   1029c89bafc714c1b987f29e3bc124a7b63d28d5
commit: 1029c89bafc714c1b987f29e3bc124a7b63d28d5 [6/6] samples: rpmsg: Add MTU size info
config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20260907/202609071911.i1HFaseq-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260907/202609071911.i1HFaseq-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/202609071911.i1HFaseq-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/rpmsg.h:14,
                    from samples/rpmsg/rpmsg_client_sample.c:14:
   samples/rpmsg/rpmsg_client_sample.c: In function 'rpmsg_sample_probe':
>> samples/rpmsg/rpmsg_client_sample.c:68:39: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t' {aka 'int'} [-Wformat=]
      68 |                 dev_warn(&rpdev->dev, "invalid rpmsg MTU size = %ld\n", mtu);
         |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:156:61: note: in expansion of macro 'dev_fmt'
     156 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                             ^~~~~~~
   samples/rpmsg/rpmsg_client_sample.c:68:17: note: in expansion of macro 'dev_warn'
      68 |                 dev_warn(&rpdev->dev, "invalid rpmsg MTU size = %ld\n", mtu);
         |                 ^~~~~~~~
   samples/rpmsg/rpmsg_client_sample.c:68:67: note: format string is defined here
      68 |                 dev_warn(&rpdev->dev, "invalid rpmsg MTU size = %ld\n", mtu);
         |                                                                 ~~^
         |                                                                   |
         |                                                                   long int
         |                                                                 %d
   samples/rpmsg/rpmsg_client_sample.c:72:31: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t' {aka 'int'} [-Wformat=]
      72 |         dev_info(&rpdev->dev, "rpmsg MTU size = %ld\n", mtu);
         |                               ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:160:58: note: in expansion of macro 'dev_fmt'
     160 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                          ^~~~~~~
   samples/rpmsg/rpmsg_client_sample.c:72:9: note: in expansion of macro 'dev_info'
      72 |         dev_info(&rpdev->dev, "rpmsg MTU size = %ld\n", mtu);
         |         ^~~~~~~~
   samples/rpmsg/rpmsg_client_sample.c:72:51: note: format string is defined here
      72 |         dev_info(&rpdev->dev, "rpmsg MTU size = %ld\n", mtu);
         |                                                 ~~^
         |                                                   |
         |                                                   long int
         |                                                 %d
   samples/rpmsg/rpmsg_client_sample.c:78:25: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'ssize_t' {aka 'int'} [-Wformat=]
      78 |                         "message size %zu exceeds rpmsg MTU size %ld\n",
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:154:56: note: in expansion of macro 'dev_fmt'
     154 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~~~~~
   samples/rpmsg/rpmsg_client_sample.c:77:17: note: in expansion of macro 'dev_err'
      77 |                 dev_err(&rpdev->dev,
         |                 ^~~~~~~
   samples/rpmsg/rpmsg_client_sample.c:78:68: note: format string is defined here
      78 |                         "message size %zu exceeds rpmsg MTU size %ld\n",
         |                                                                  ~~^
         |                                                                    |
         |                                                                    long int
         |                                                                  %d


vim +68 samples/rpmsg/rpmsg_client_sample.c

    50	
    51	static int rpmsg_sample_probe(struct rpmsg_device *rpdev)
    52	{
    53		int ret;
    54		struct instance_data *idata;
    55		ssize_t mtu, msg_len;
    56	
    57		dev_info(&rpdev->dev, "new channel: 0x%x -> 0x%x!\n",
    58						rpdev->src, rpdev->dst);
    59	
    60		idata = devm_kzalloc(&rpdev->dev, sizeof(*idata), GFP_KERNEL);
    61		if (!idata)
    62			return -ENOMEM;
    63	
    64		dev_set_drvdata(&rpdev->dev, idata);
    65	
    66		mtu = rpmsg_get_mtu(rpdev->ept);
    67		if (mtu < 0) {
  > 68			dev_warn(&rpdev->dev, "invalid rpmsg MTU size = %ld\n", mtu);
    69			return mtu;
    70		}
    71	
    72		dev_info(&rpdev->dev, "rpmsg MTU size = %ld\n", mtu);
    73	
    74		msg_len = strlen(MSG);
    75		/* make sure our message fits in a single rpmsg buffer */
    76		if (msg_len > mtu) {
    77			dev_err(&rpdev->dev,
    78				"message size %zu exceeds rpmsg MTU size %ld\n",
    79				strlen(MSG), mtu);
    80			return -EMSGSIZE;
    81		}
    82	
    83		/* send a message to our remote processor */
    84		ret = rpmsg_send(rpdev->ept, MSG, msg_len);
    85		if (ret) {
    86			dev_err(&rpdev->dev, "rpmsg_send failed: %d\n", ret);
    87			return ret;
    88		}
    89	
    90		return 0;
    91	}
    92	

--
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-07 11:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 11:33 [remoteproc:rpmsg-next 6/6] samples/rpmsg/rpmsg_client_sample.c:68:39: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t' {aka 'int'} 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.