oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [dhowells-fs:afs-testing 1/1] net/rxrpc/sendmsg.c:606:23: warning: format specifies type 'int' but the argument has type 'struct rxrpc_call *'
@ 2023-02-13 18:23 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-02-13 18:23 UTC (permalink / raw)
  To: David Howells; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git afs-testing
head:   fa7f69da4a2210209299c01a778b068dc638a0b0
commit: fa7f69da4a2210209299c01a778b068dc638a0b0 [1/1] rxrpc: Don't print kernel pointers in warning messages
config: hexagon-randconfig-r016-20230212 (https://download.01.org/0day-ci/archive/20230214/202302140231.MkZmcNiF-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project db0e6591612b53910a1b366863348bdb9d7d2fb1)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=fa7f69da4a2210209299c01a778b068dc638a0b0
        git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
        git fetch --no-tags dhowells-fs afs-testing
        git checkout fa7f69da4a2210209299c01a778b068dc638a0b0
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash net/rxrpc/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302140231.MkZmcNiF-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from net/rxrpc/sendmsg.c:12:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from net/rxrpc/sendmsg.c:12:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from net/rxrpc/sendmsg.c:12:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
>> net/rxrpc/sendmsg.c:606:23: warning: format specifies type 'int' but the argument has type 'struct rxrpc_call *' [-Wformat]
           _leave(" = %c=%x\n", call);
                      ~~        ^~~~
   net/rxrpc/ar-internal.h:1339:63: note: expanded from macro '_leave'
   #define _leave(FMT,...) no_printk("<== %s()"FMT"",__func__ ,##__VA_ARGS__)
                                               ~~~               ^~~~~~~~~~~
   include/linux/printk.h:131:17: note: expanded from macro 'no_printk'
                   printk(fmt, ##__VA_ARGS__);             \
                          ~~~    ^~~~~~~~~~~
   include/linux/printk.h:457:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
>> net/rxrpc/sendmsg.c:606:17: warning: more '%' conversions than data arguments [-Wformat-insufficient-args]
           _leave(" = %c=%x\n", call);
                         ~^
   net/rxrpc/ar-internal.h:1339:45: note: expanded from macro '_leave'
   #define _leave(FMT,...) no_printk("<== %s()"FMT"",__func__ ,##__VA_ARGS__)
                                               ^~~
   include/linux/printk.h:131:10: note: expanded from macro 'no_printk'
                   printk(fmt, ##__VA_ARGS__);             \
                          ^~~
   include/linux/printk.h:457:53: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ^~~
   include/linux/printk.h:429:11: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ^~~~
   8 warnings generated.


vim +606 net/rxrpc/sendmsg.c

   566	
   567	/*
   568	 * Create a new client call for sendmsg().
   569	 * - Called with the socket lock held, which it must release.
   570	 * - If it returns a call, the call's lock will need releasing by the caller.
   571	 */
   572	static struct rxrpc_call *
   573	rxrpc_new_client_call_for_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg,
   574					  struct rxrpc_send_params *p)
   575		__releases(&rx->sk.sk_lock.slock)
   576		__acquires(&call->user_mutex)
   577	{
   578		struct rxrpc_conn_parameters cp;
   579		struct rxrpc_call *call;
   580		struct key *key;
   581	
   582		DECLARE_SOCKADDR(struct sockaddr_rxrpc *, srx, msg->msg_name);
   583	
   584		_enter("");
   585	
   586		if (!msg->msg_name) {
   587			release_sock(&rx->sk);
   588			return ERR_PTR(-EDESTADDRREQ);
   589		}
   590	
   591		key = rx->key;
   592		if (key && !rx->key->payload.data[0])
   593			key = NULL;
   594	
   595		memset(&cp, 0, sizeof(cp));
   596		cp.local		= rx->local;
   597		cp.key			= rx->key;
   598		cp.security_level	= rx->min_sec_level;
   599		cp.exclusive		= rx->exclusive | p->exclusive;
   600		cp.upgrade		= p->upgrade;
   601		cp.service_id		= srx->srx_service;
   602		call = rxrpc_new_client_call(rx, &cp, srx, &p->call, GFP_KERNEL,
   603					     atomic_inc_return(&rxrpc_debug_id));
   604		/* The socket is now unlocked */
   605	
 > 606		_leave(" = %c=%x\n", call);
   607		return call;
   608	}
   609	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-13 18:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13 18:23 [dhowells-fs:afs-testing 1/1] net/rxrpc/sendmsg.c:606:23: warning: format specifies type 'int' but the argument has type 'struct rxrpc_call *' kernel test robot

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).