tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 
master
head:   330348d94223346f855357fab2517f6c903001c7
commit: 942b3235bf77e5600a05d6e85f0415bdeb8068bb [20/24] sctp: improve debug 
message to also log curr pkt and new chunk size
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
        wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 942b3235bf77e5600a05d6e85f0415bdeb8068bb
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:289:0,
                    from include/linux/kernel.h:13,
                    from net/sctp/output.c:40:
   net/sctp/output.c: In function 'sctp_packet_transmit_chunk':
>> include/linux/dynamic_debug.h:64:16: warning: format '%lu' expects argument 
>> of type 'long unsigned int', but argument 5 has type 'size_t' [-Wformat=]
     static struct _ddebug  __aligned(8)   \
                   ^
   include/linux/dynamic_debug.h:76:2: note: in expansion of macro 
'DEFINE_DYNAMIC_DEBUG_METADATA'
     DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
     ^
   include/linux/printk.h:295:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^
>> net/sctp/output.c:185:2: note: in expansion of macro 'pr_debug'
     pr_debug("%s: packet:%p size:%lu chunk:%p size:%d\n", __func__,
     ^

vim +/pr_debug +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: .config.gz
Description: Binary data

Reply via email to