* [jlayton:kdevops 43/47] net/sunrpc/svcsock.c:1294:11: warning: format specifies type 'int' but the argument has type 'unsigned long'
@ 2025-08-09 13:18 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-08-09 13:18 UTC (permalink / raw)
To: Jeff Layton; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git kdevops
head: 78cea35b7fffda7d71482e5881bcd3e4a30b0acb
commit: 562305ff2066e7dd88d087577f23fab6b6a76b2d [43/47] sunrpc: fix pr_notice in svc_tcp_sendto() to show correct length
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250809/202508091526.CVVPmLwu-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250809/202508091526.CVVPmLwu-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/202508091526.CVVPmLwu-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/sunrpc/svcsock.c:1294:11: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
1291 | pr_notice("rpc-srv/tcp: %s: %s %d when sending %d bytes - shutting down socket\n",
| ~~
| %lu
1292 | xprt->xpt_server->sv_name,
1293 | (sent < 0) ? "got error" : "sent",
1294 | sent, xdr->len + sizeof(marker));
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:577:36: note: expanded from macro 'pr_notice'
577 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:514:60: note: expanded from macro 'printk'
514 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:486:19: note: expanded from macro 'printk_index_wrap'
486 | _p_func(_fmt, ##__VA_ARGS__); \
| ~~~~ ^~~~~~~~~~~
1 warning generated.
vim +1294 net/sunrpc/svcsock.c
1255
1256 /**
1257 * svc_tcp_sendto - Send out a reply on a TCP socket
1258 * @rqstp: completed svc_rqst
1259 *
1260 * xpt_mutex ensures @rqstp's whole message is written to the socket
1261 * without interruption.
1262 *
1263 * Returns the number of bytes sent, or a negative errno.
1264 */
1265 static int svc_tcp_sendto(struct svc_rqst *rqstp)
1266 {
1267 struct svc_xprt *xprt = rqstp->rq_xprt;
1268 struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt);
1269 struct xdr_buf *xdr = &rqstp->rq_res;
1270 rpc_fraghdr marker = cpu_to_be32(RPC_LAST_STREAM_FRAGMENT |
1271 (u32)xdr->len);
1272 int sent;
1273
1274 svc_tcp_release_ctxt(xprt, rqstp->rq_xprt_ctxt);
1275 rqstp->rq_xprt_ctxt = NULL;
1276
1277 mutex_lock(&xprt->xpt_mutex);
1278 if (svc_xprt_is_dead(xprt))
1279 goto out_notconn;
1280 sent = svc_tcp_sendmsg(svsk, rqstp, marker);
1281 trace_svcsock_tcp_send(xprt, sent);
1282 if (sent < 0 || sent != (xdr->len + sizeof(marker)))
1283 goto out_close;
1284 mutex_unlock(&xprt->xpt_mutex);
1285 return sent;
1286
1287 out_notconn:
1288 mutex_unlock(&xprt->xpt_mutex);
1289 return -ENOTCONN;
1290 out_close:
1291 pr_notice("rpc-srv/tcp: %s: %s %d when sending %d bytes - shutting down socket\n",
1292 xprt->xpt_server->sv_name,
1293 (sent < 0) ? "got error" : "sent",
> 1294 sent, xdr->len + sizeof(marker));
1295 svc_xprt_deferred_close(xprt);
1296 mutex_unlock(&xprt->xpt_mutex);
1297 return -EAGAIN;
1298 }
1299
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* [jlayton:kdevops 43/47] net/sunrpc/svcsock.c:1294:11: warning: format specifies type 'int' but the argument has type 'unsigned long'
@ 2025-08-09 16:53 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-08-09 16:53 UTC (permalink / raw)
To: Jeff Layton; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git kdevops
head: 78cea35b7fffda7d71482e5881bcd3e4a30b0acb
commit: 562305ff2066e7dd88d087577f23fab6b6a76b2d [43/47] sunrpc: fix pr_notice in svc_tcp_sendto() to show correct length
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250810/202508100051.Rvyh7vD8-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250810/202508100051.Rvyh7vD8-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/202508100051.Rvyh7vD8-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/sunrpc/svcsock.c:1294:11: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
1291 | pr_notice("rpc-srv/tcp: %s: %s %d when sending %d bytes - shutting down socket\n",
| ~~
| %lu
1292 | xprt->xpt_server->sv_name,
1293 | (sent < 0) ? "got error" : "sent",
1294 | sent, xdr->len + sizeof(marker));
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:577:36: note: expanded from macro 'pr_notice'
577 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:514:60: note: expanded from macro 'printk'
514 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:486:19: note: expanded from macro 'printk_index_wrap'
486 | _p_func(_fmt, ##__VA_ARGS__); \
| ~~~~ ^~~~~~~~~~~
1 warning generated.
vim +1294 net/sunrpc/svcsock.c
1255
1256 /**
1257 * svc_tcp_sendto - Send out a reply on a TCP socket
1258 * @rqstp: completed svc_rqst
1259 *
1260 * xpt_mutex ensures @rqstp's whole message is written to the socket
1261 * without interruption.
1262 *
1263 * Returns the number of bytes sent, or a negative errno.
1264 */
1265 static int svc_tcp_sendto(struct svc_rqst *rqstp)
1266 {
1267 struct svc_xprt *xprt = rqstp->rq_xprt;
1268 struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt);
1269 struct xdr_buf *xdr = &rqstp->rq_res;
1270 rpc_fraghdr marker = cpu_to_be32(RPC_LAST_STREAM_FRAGMENT |
1271 (u32)xdr->len);
1272 int sent;
1273
1274 svc_tcp_release_ctxt(xprt, rqstp->rq_xprt_ctxt);
1275 rqstp->rq_xprt_ctxt = NULL;
1276
1277 mutex_lock(&xprt->xpt_mutex);
1278 if (svc_xprt_is_dead(xprt))
1279 goto out_notconn;
1280 sent = svc_tcp_sendmsg(svsk, rqstp, marker);
1281 trace_svcsock_tcp_send(xprt, sent);
1282 if (sent < 0 || sent != (xdr->len + sizeof(marker)))
1283 goto out_close;
1284 mutex_unlock(&xprt->xpt_mutex);
1285 return sent;
1286
1287 out_notconn:
1288 mutex_unlock(&xprt->xpt_mutex);
1289 return -ENOTCONN;
1290 out_close:
1291 pr_notice("rpc-srv/tcp: %s: %s %d when sending %d bytes - shutting down socket\n",
1292 xprt->xpt_server->sv_name,
1293 (sent < 0) ? "got error" : "sent",
> 1294 sent, xdr->len + sizeof(marker));
1295 svc_xprt_deferred_close(xprt);
1296 mutex_unlock(&xprt->xpt_mutex);
1297 return -EAGAIN;
1298 }
1299
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-09 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-09 13:18 [jlayton:kdevops 43/47] net/sunrpc/svcsock.c:1294:11: warning: format specifies type 'int' but the argument has type 'unsigned long' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2025-08-09 16:53 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.