* [remoteproc:rpmsg-next 6/6] samples/rpmsg/rpmsg_client_sample.c:68:59: warning: format specifies type 'long' but the argument has type 'ssize_t' (aka 'int')
@ 2026-09-07 13:11 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-07 13:11 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: i386-randconfig-063-20260907 (https://download.01.org/0day-ci/archive/20260907/202609072042.wraEH9fu-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260907/202609072042.wraEH9fu-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/202609072042.wraEH9fu-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> samples/rpmsg/rpmsg_client_sample.c:68:59: warning: format specifies type 'long' but the argument has type 'ssize_t' (aka 'int') [-Wformat]
68 | dev_warn(&rpdev->dev, "invalid rpmsg MTU size = %ld\n", mtu);
| ~~~ ^~~
| %zd
include/linux/dev_printk.h:156:70: note: expanded from macro 'dev_warn'
156 | dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
samples/rpmsg/rpmsg_client_sample.c:72:50: warning: format specifies type 'long' but the argument has type 'ssize_t' (aka 'int') [-Wformat]
72 | dev_info(&rpdev->dev, "rpmsg MTU size = %ld\n", mtu);
| ~~~ ^~~
| %zd
include/linux/dev_printk.h:160:67: note: expanded from macro 'dev_info'
160 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
samples/rpmsg/rpmsg_client_sample.c:79:17: warning: format specifies type 'long' but the argument has type 'ssize_t' (aka 'int') [-Wformat]
78 | "message size %zu exceeds rpmsg MTU size %ld\n",
| ~~~
| %zd
79 | strlen(MSG), mtu);
| ^~~
include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
3 warnings generated.
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 13:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 13:11 [remoteproc:rpmsg-next 6/6] samples/rpmsg/rpmsg_client_sample.c:68:59: warning: format specifies type 'long' but the argument 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.