[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204220003.YOX3kXiD-lkp@intel.com>
Date: Fri, 22 Apr 2022 00:23:59 +0800
From: kernel test robot <lkp@...el.com>
To: David Howells <dhowells@...hat.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [dhowells-fs:rxrpc-ringless 15/21] net/rxrpc/call_event.c:168:54:
warning: variable 'ack_id' is uninitialized when used here
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-ringless
head: c388a8388ad238ffbe0cd204c3eacaf200055751
commit: db7ccd62278b9fd5744316e50db696ea69b9dcbc [15/21] rxrpc: Use txbufs for acks
config: i386-randconfig-a006 (https://download.01.org/0day-ci/archive/20220422/202204220003.YOX3kXiD-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project bac6cd5bf85669e3376610cfc4c4f9ca015e7b9b)
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=db7ccd62278b9fd5744316e50db696ea69b9dcbc
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs rxrpc-ringless
git checkout db7ccd62278b9fd5744316e50db696ea69b9dcbc
# 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=i386 SHELL=/bin/bash net/rxrpc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> net/rxrpc/call_event.c:168:54: warning: variable 'ack_id' is uninitialized when used here [-Wuninitialized]
trace_rxrpc_send_ack(call, why, ack_reason, serial, ack_id);
^~~~~~
net/rxrpc/call_event.c:130:21: note: initialize the variable 'ack_id' to silence this warning
unsigned int ack_id;
^
= 0
1 warning generated.
vim +/ack_id +168 net/rxrpc/call_event.c
17926a79320afa net/rxrpc/ar-ack.c David Howells 2007-04-26 121
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 122 /*
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 123 * Queue an ACK for immediate transmission.
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 124 */
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 125 void rxrpc_send_ACK(struct rxrpc_call *call, u8 ack_reason,
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 126 rxrpc_serial_t serial, enum rxrpc_propose_ack_trace why)
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 127 {
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 128 struct rxrpc_local *local = call->conn->params.local;
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 129 struct rxrpc_txbuf *txb;
5ea8a2c868a42d net/rxrpc/call_event.c David Howells 2020-01-30 130 unsigned int ack_id;
5ea8a2c868a42d net/rxrpc/call_event.c David Howells 2020-01-30 131 int c;
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 132
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 133 if (test_bit(RXRPC_CALL_DISCONNECTED, &call->flags))
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 134 return;
e93f9769293b67 net/rxrpc/call_event.c David Howells 2020-01-30 135 if (ack_reason == RXRPC_ACK_DELAY &&
e93f9769293b67 net/rxrpc/call_event.c David Howells 2020-01-30 136 test_and_set_bit(RXRPC_CALL_DELAY_ACK_PENDING, &call->flags)) {
e93f9769293b67 net/rxrpc/call_event.c David Howells 2020-01-30 137 trace_rxrpc_drop_ack(call, why, ack_reason, serial, false);
e93f9769293b67 net/rxrpc/call_event.c David Howells 2020-01-30 138 return;
e93f9769293b67 net/rxrpc/call_event.c David Howells 2020-01-30 139 }
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 140
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 141 txb = rxrpc_alloc_txbuf(call, in_softirq() ? GFP_ATOMIC | __GFP_NOWARN : GFP_NOFS);
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 142 if (!txb) {
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 143 kleave(" = -ENOMEM");
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 144 return;
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 145 }
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 146
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 147 txb->ack_why = why;
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 148 txb->wire.seq = 0;
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 149 txb->wire.type = RXRPC_PACKET_TYPE_ACK;
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 150 txb->wire.flags |= RXRPC_SLOW_START_OK;
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 151 txb->ack.bufferSpace = htons(8);
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 152 txb->ack.maxSkew = 0;
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 153 txb->ack.firstPacket = 0;
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 154 txb->ack.previousPacket = 0;
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 155 txb->ack.serial = htonl(serial);
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 156 txb->ack.reason = ack_reason;
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 157 txb->ack.nAcks = 0;
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 158
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 159 rxrpc_get_call(call, rxrpc_call_got);
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 160
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 161 spin_lock_bh(&local->ack_tx_lock);
db7ccd62278b9f net/rxrpc/call_event.c David Howells 2022-04-05 162 list_add_tail(&txb->tx_link, &local->ack_tx_queue);
5ea8a2c868a42d net/rxrpc/call_event.c David Howells 2020-01-30 163 c = atomic_inc_return(&local->ack_tx_count);
5ea8a2c868a42d net/rxrpc/call_event.c David Howells 2020-01-30 164 if (c > local->ack_tx_max)
5ea8a2c868a42d net/rxrpc/call_event.c David Howells 2020-01-30 165 local->ack_tx_max = c;
5ea8a2c868a42d net/rxrpc/call_event.c David Howells 2020-01-30 166 local->ack_tx_send++;
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 167 spin_unlock_bh(&local->ack_tx_lock);
5ea8a2c868a42d net/rxrpc/call_event.c David Howells 2020-01-30 @168 trace_rxrpc_send_ack(call, why, ack_reason, serial, ack_id);
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 169 rxrpc_wake_up_transmitter(local);
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 170 }
78ffd18fe8b510 net/rxrpc/call_event.c David Howells 2020-01-30 171
:::::: The code at line 168 was first introduced by commit
:::::: 5ea8a2c868a42d3f906c25ce905583b4b4576f74 put ack count in proc
:::::: TO: David Howells <dhowells@...hat.com>
:::::: CC: David Howells <dhowells@...hat.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists