public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [dhowells-fs:rxrpc-iothread 16/16] net/rxrpc/input.c:915:3: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first
@ 2024-04-16 18:27 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-16 18:27 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 rxrpc-iothread
head:   0a6ac49e304f1644db056801640e1976a83a484f
commit: 0a6ac49e304f1644db056801640e1976a83a484f [16/16] rxrpc: Use the new rxrpc_tx_queue struct to more efficiently process ACKs
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240417/202404170203.w9aBba2c-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 7089c359a3845323f6f30c44a47dd901f2edfe63)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240417/202404170203.w9aBba2c-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/202404170203.w9aBba2c-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from net/rxrpc/input.c:10:
   In file included from net/rxrpc/ar-internal.h:11:
   In file included from include/net/net_namespace.h:43:
   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:10:
   In file included from include/linux/mm.h:2208:
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from net/rxrpc/input.c:10:
   In file included from net/rxrpc/ar-internal.h:11:
   In file included from include/net/net_namespace.h:43:
   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:328:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     547 |         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]
     560 |         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'
      37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
         |                                                   ^
   In file included from net/rxrpc/input.c:10:
   In file included from net/rxrpc/ar-internal.h:11:
   In file included from include/net/net_namespace.h:43:
   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:328:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     573 |         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'
      35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
         |                                                   ^
   In file included from net/rxrpc/input.c:10:
   In file included from net/rxrpc/ar-internal.h:11:
   In file included from include/net/net_namespace.h:43:
   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:328:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     584 |         __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]
     594 |         __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]
     604 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
>> net/rxrpc/input.c:915:3: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first [-Wshift-op-parentheses]
     915 |                 shiftr_adv_rotr(acks, extracted);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/rxrpc/input.c:814:53: note: expanded from macro 'shiftr_adv_rotr'
     814 |                         rotate_into |= __bit0 << sizeof(rotate_into) * 8 - 1; \
         |                                               ~~ ~~~~~~~~~~~~~~~~~~~~~~~~^~~
   net/rxrpc/input.c:915:3: note: place parentheses around the '-' expression to silence this warning
     915 |                 shiftr_adv_rotr(acks, extracted);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/rxrpc/input.c:814:53: note: expanded from macro 'shiftr_adv_rotr'
     814 |                         rotate_into |= __bit0 << sizeof(rotate_into) * 8 - 1; \
         |                                                  ~~~~~~~~~~~~~~~~~~~~~~~~^~~
   8 warnings generated.


vim +915 net/rxrpc/input.c

   886	
   887	/*
   888	 * Process individual soft ACKs.
   889	 *
   890	 * Each ACK in the array corresponds to one packet and can be either an ACK or
   891	 * a NAK.  If we get find an explicitly NAK'd packet we resend immediately;
   892	 * packets that lie beyond the end of the ACK list are scheduled for resend by
   893	 * the timer on the basis that the peer might just not have processed them at
   894	 * the time the ACK was sent.
   895	 */
   896	static void rxrpc_input_soft_acks(struct rxrpc_call *call,
   897					  struct rxrpc_ack_summary *summary,
   898					  struct sk_buff *skb,
   899					  rxrpc_seq_t first)
   900	{
   901		struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
   902		struct rxrpc_txqueue *tq = call->tx_queue;
   903		unsigned long extracted = ~0UL;
   904		unsigned int nr = 0;
   905		rxrpc_seq_t seq = first, lowest_nak = first + sp->ack.nr_acks;
   906		u8 *acks = skb->data + sizeof(struct rxrpc_wire_header) + sizeof(struct rxrpc_ackpacket);
   907	
   908		_enter("%x,%x,%u", tq->qbase, first, sp->ack.nr_acks);
   909	
   910		while (after(seq, tq->qbase + RXRPC_NR_TXQUEUE - 1))
   911			tq = tq->next;
   912	
   913		for (unsigned int i = 0; i < sp->ack.nr_acks; i++) {
   914			/* Decant ACKs until we hit a txqueue boundary. */
 > 915			shiftr_adv_rotr(acks, extracted);
   916			if (i == 256) {
   917				acks -= i;
   918				i = 0;
   919			}
   920			seq++;
   921			nr++;
   922			if ((seq & RXRPC_TXQ_MASK) != 0)
   923				continue;
   924	
   925			_debug("bound %16lx %u", extracted, nr);
   926	
   927			rxrpc_input_soft_ack_tq(call, summary, tq, extracted, RXRPC_NR_TXQUEUE,
   928						seq - RXRPC_NR_TXQUEUE, &lowest_nak);
   929			extracted = ~0UL;
   930			nr = 0;
   931			tq = tq->next;
   932		}
   933	
   934		if (nr) {
   935			unsigned int nr_reported = seq & RXRPC_TXQ_MASK;
   936	
   937			extracted >>= RXRPC_NR_TXQUEUE - nr_reported;
   938			_debug("tail  %16lx %u", extracted, nr_reported);
   939			rxrpc_input_soft_ack_tq(call, summary, tq, extracted, nr_reported,
   940						seq & ~RXRPC_TXQ_MASK, &lowest_nak);
   941		}
   942	
   943		/* We *can* have more nacks than we did - the peer is permitted to drop
   944		 * packets it has soft-acked and re-request them.  Further, it is
   945		 * possible for the nack distribution to change whilst the number of
   946		 * nacks stays the same or goes down.
   947		 */
   948		if (lowest_nak != call->acks_lowest_nak) {
   949			call->acks_lowest_nak = lowest_nak;
   950			summary->new_low_nack = true;
   951		}
   952	
   953		_debug("summary A=%d+%d N=%d+%d",
   954		       summary->nr_acks, summary->nr_new_acks,
   955		       summary->nr_nacks, summary->nr_new_nacks);
   956	}
   957	

-- 
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:[~2024-04-16 18:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-16 18:27 [dhowells-fs:rxrpc-iothread 16/16] net/rxrpc/input.c:915:3: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first 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