* [net-next:master 20/29] net/sctp/output.c:185:21: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}'
@ 2016-06-04 2:32 kbuild test robot
2016-06-04 5:53 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2016-06-04 2:32 UTC (permalink / raw)
Cc: kbuild-all, netdev, Marcelo Ricardo Leitner
[-- Attachment #1: Type: text/plain, Size: 2213 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 03c7f70beee4c5d34881e5d3dd2b6f3e848047ef
commit: 942b3235bf77e5600a05d6e85f0415bdeb8068bb [20/29] sctp: improve debug message to also log curr pkt and new chunk size
config: i386-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
git checkout 942b3235bf77e5600a05d6e85f0415bdeb8068bb
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
net/sctp/output.c: In function 'sctp_packet_transmit_chunk':
>> net/sctp/output.c:185:21: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=]
pr_debug("%s: packet:%p size:%lu chunk:%p size:%d\n", __func__,
^~~~~~
vim +185 net/sctp/output.c
169 }
170
171 /* This routine tries to append the chunk to the offered packet. If adding
172 * the chunk causes the packet to exceed the path MTU and COOKIE_ECHO chunk
173 * is not present in the packet, it transmits the input packet.
174 * Data can be bundled with a packet containing a COOKIE_ECHO chunk as long
175 * as it can fit in the packet, but any more data that does not fit in this
176 * packet can be sent only after receiving the COOKIE_ACK.
177 */
178 sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *packet,
179 struct sctp_chunk *chunk,
180 int one_packet, gfp_t gfp)
181 {
182 sctp_xmit_t retval;
183 int error = 0;
184
> 185 pr_debug("%s: packet:%p size:%lu chunk:%p size:%d\n", __func__,
186 packet, packet->size, chunk, chunk->skb ? chunk->skb->len : -1);
187
188 switch ((retval = (sctp_packet_append_chunk(packet, chunk)))) {
189 case SCTP_XMIT_PMTU_FULL:
190 if (!packet->has_cookie_echo) {
191 error = sctp_packet_transmit(packet, gfp);
192 if (error < 0)
193 chunk->skb->sk->sk_err = -error;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 54406 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [net-next:master 20/29] net/sctp/output.c:185:21: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}'
2016-06-04 2:32 [net-next:master 20/29] net/sctp/output.c:185:21: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' kbuild test robot
@ 2016-06-04 5:53 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-06-04 5:53 UTC (permalink / raw)
To: fengguang.wu; +Cc: kbuild-all, netdev, marcelo.leitner
I fixed this as follows:
====================
[PATCH] sctp: Fix warning in sctp_packet_transmit_chunk()
size_t objects should be printed with %Z printf format.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/sctp/output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 90d2e12..1541a91 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -182,7 +182,7 @@ sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *packet,
sctp_xmit_t retval;
int error = 0;
- pr_debug("%s: packet:%p size:%lu chunk:%p size:%d\n", __func__,
+ pr_debug("%s: packet:%p size:%Zu chunk:%p size:%d\n", __func__,
packet, packet->size, chunk, chunk->skb ? chunk->skb->len : -1);
switch ((retval = (sctp_packet_append_chunk(packet, chunk)))) {
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-04 5:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-04 2:32 [net-next:master 20/29] net/sctp/output.c:185:21: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' kbuild test robot
2016-06-04 5:53 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).