Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [jlayton:uek-localio 1944/2262] net/rds/send.c:1380:18: warning: variable 'rns' set but not used
@ 2025-05-24  9:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-24  9:13 UTC (permalink / raw)
  To: Greg Jumper; +Cc: llvm, oe-kbuild-all, LUCI Bot, Alan Maguire

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git uek-localio
head:   65b0dc6bb1f5c18e63d8ee9ea1cca997456a81a9
commit: 09b27477265df03926c91a3c5294bc2b582f2472 [1944/2262] Revert "Revert "net/rds: Track "rds" module statistics per network namespace""
config: arm-randconfig-003-20250524 (https://download.01.org/0day-ci/archive/20250524/202505241704.Id3nau5v-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250524/202505241704.Id3nau5v-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/202505241704.Id3nau5v-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from net/rds/send.c:38:
   net/rds/rds.h:1030:22: error: no member named 'net' in 'possible_net_t'
    1030 |                         return sk->sk_net.net->ns.inum;
         |                                ~~~~~~~~~~ ^
>> net/rds/send.c:1380:18: warning: variable 'rns' set but not used [-Wunused-but-set-variable]
    1380 |         struct rds_net *rns;
         |                         ^
   1 warning and 1 error generated.


vim +/rns +1380 net/rds/send.c

  1360	
  1361	int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
  1362	{
  1363		struct sock *sk = sock->sk;
  1364		struct rds_sock *rs = rds_sk_to_rs(sk);
  1365	#if IS_ENABLED(CONFIG_IPV6)
  1366		struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)msg->msg_name;
  1367	#endif
  1368		struct sockaddr_in *usin = (struct sockaddr_in *)msg->msg_name;
  1369		__be16 dport;
  1370		struct rds_message *rm = NULL;
  1371		struct rds_connection *conn = NULL;
  1372		char *reason = NULL;
  1373		int ret = 0;
  1374		int queued = 0;
  1375		int nonblock = msg->msg_flags & MSG_DONTWAIT;
  1376		long timeo = sock_sndtimeo(sk, nonblock);
  1377		size_t total_payload_len = payload_len, rdma_payload_len = 0;
  1378		struct rds_conn_path *cpath = NULL;
  1379		struct rs_buf_info *bufi;
> 1380		struct rds_net *rns;
  1381		struct in6_addr daddr;
  1382		__u32 scope_id = 0;
  1383		int namelen;
  1384		bool no_space;
  1385		unsigned long flags;
  1386		struct rds_iov_vector_arr iov_arr = {};
  1387		struct rds_iov_vector *iov;
  1388		int i;
  1389	
  1390		/* expect 1 RDMA CMSG per rds_sendmsg. can still grow if more needed. */
  1391		iov_arr.iva_incr = 1;
  1392	
  1393		/* Mirror Linux UDP mirror of BSD error message compatibility */
  1394		/* XXX: Perhaps MSG_MORE someday */
  1395		if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_CMSG_COMPAT | MSG_NOSIGNAL)) {
  1396			pr_debug_ratelimited("%s: msg_flags 0x%08X\n", __func__, msg->msg_flags);
  1397			ret = -EOPNOTSUPP;
  1398			reason = "invalid msg_flags";
  1399			goto out;
  1400		}
  1401		namelen = msg->msg_namelen;
  1402		if (namelen != 0) {
  1403			if (namelen < sizeof(*usin)) {
  1404				reason = "invalid IPv4 namelen";
  1405				ret = -EINVAL;
  1406				goto out;
  1407			}
  1408			switch (usin->sin_family) {
  1409			case AF_INET:
  1410				if (usin->sin_addr.s_addr == htonl(INADDR_ANY) ||
  1411				    usin->sin_addr.s_addr == htonl(INADDR_BROADCAST) ||
  1412				    IN_MULTICAST(ntohl(usin->sin_addr.s_addr))) {
  1413					reason = "invalid IPv4 addr";
  1414					ret = -EINVAL;
  1415					goto out;
  1416				}
  1417				ipv6_addr_set_v4mapped(usin->sin_addr.s_addr, &daddr);
  1418				dport = usin->sin_port;
  1419				break;
  1420	

-- 
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:[~2025-05-24  9:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-24  9:13 [jlayton:uek-localio 1944/2262] net/rds/send.c:1380:18: warning: variable 'rns' set but not used 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