Re: [PATCH] serial: stm32: optimize spin lock usage
by kernel test robot
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on stm32/stm32-next]
[also build test WARNING on usb/usb-testing v5.12-rc7]
[cannot apply to tty/tty-testing next-20210409]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/dillon-minfei-gmail-com/serial-s...
base: https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32.git stm32-next
config: riscv-randconfig-r034-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/a0e81ae10c46f768437d61cd3a3dfd4d1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review dillon-minfei-gmail-com/serial-stm32-optimize-spin-lock-usage/20210412-123607
git checkout a0e81ae10c46f768437d61cd3a3dfd4d1250b375
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/tty/serial/stm32-usart.c:280:39: warning: variable 'flags' is uninitialized when used here [-Wuninitialized]
spin_unlock_irqrestore(&port->lock, flags);
^~~~~
drivers/tty/serial/stm32-usart.c:217:24: note: initialize the variable 'flags' to silence this warning
unsigned long c, flags;
^
= 0
1 warning generated.
vim +/flags +280 drivers/tty/serial/stm32-usart.c
211
212 static void stm32_usart_receive_chars(struct uart_port *port, bool threaded)
213 {
214 struct tty_port *tport = &port->state->port;
215 struct stm32_port *stm32_port = to_stm32_port(port);
216 const struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
217 unsigned long c, flags;
218 u32 sr;
219 char flag;
220
221 if (irqd_is_wakeup_set(irq_get_irq_data(port->irq)))
222 pm_wakeup_event(tport->tty->dev, 0);
223
224 while (stm32_usart_pending_rx(port, &sr, &stm32_port->last_res,
225 threaded)) {
226 sr |= USART_SR_DUMMY_RX;
227 flag = TTY_NORMAL;
228
229 /*
230 * Status bits has to be cleared before reading the RDR:
231 * In FIFO mode, reading the RDR will pop the next data
232 * (if any) along with its status bits into the SR.
233 * Not doing so leads to misalignement between RDR and SR,
234 * and clear status bits of the next rx data.
235 *
236 * Clear errors flags for stm32f7 and stm32h7 compatible
237 * devices. On stm32f4 compatible devices, the error bit is
238 * cleared by the sequence [read SR - read DR].
239 */
240 if ((sr & USART_SR_ERR_MASK) && ofs->icr != UNDEF_REG)
241 writel_relaxed(sr & USART_SR_ERR_MASK,
242 port->membase + ofs->icr);
243
244 c = stm32_usart_get_char(port, &sr, &stm32_port->last_res);
245 port->icount.rx++;
246 if (sr & USART_SR_ERR_MASK) {
247 if (sr & USART_SR_ORE) {
248 port->icount.overrun++;
249 } else if (sr & USART_SR_PE) {
250 port->icount.parity++;
251 } else if (sr & USART_SR_FE) {
252 /* Break detection if character is null */
253 if (!c) {
254 port->icount.brk++;
255 if (uart_handle_break(port))
256 continue;
257 } else {
258 port->icount.frame++;
259 }
260 }
261
262 sr &= port->read_status_mask;
263
264 if (sr & USART_SR_PE) {
265 flag = TTY_PARITY;
266 } else if (sr & USART_SR_FE) {
267 if (!c)
268 flag = TTY_BREAK;
269 else
270 flag = TTY_FRAME;
271 }
272 }
273
274 if (uart_handle_sysrq_char(port, c))
275 continue;
276 uart_insert_char(port, sr, USART_SR_ORE, c, flag);
277 }
278
279 if (threaded)
> 280 spin_unlock_irqrestore(&port->lock, flags);
281 else
282 spin_unlock(&port->lock);
283
284 tty_flip_buffer_push(tport);
285
286 if (threaded)
287 spin_lock_irqsave(&port->lock, flags);
288 else
289 spin_lock(&port->lock);
290 }
291
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v6 1/3] bio: limit bio max size
by kernel test robot
Hi Changheun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on scsi/for-next linus/master v5.12-rc7]
[cannot apply to block/for-next next-20210409]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Changheun-Lee/bio-limit-bio-max-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: nios2-defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
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://github.com/0day-ci/linux/commit/5d00aa42f58575968c4a7a4b374addaf4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Changheun-Lee/bio-limit-bio-max-size/20210412-115922
git checkout 5d00aa42f58575968c4a7a4b374addaf4f9a5624
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/blkdev.h:19,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from block/bio.c:6:
include/linux/bio.h: In function 'bio_full':
include/linux/bio.h:122:29: error: implicit declaration of function 'bio_max_size'; did you mean 'bio_max_segs'? [-Werror=implicit-function-declaration]
122 | if (bio->bi_iter.bi_size > bio_max_size(bio) - len)
| ^~~~~~~~~~~~
| bio_max_segs
block/bio.c: At top level:
>> block/bio.c:258:14: warning: no previous prototype for 'bio_max_size' [-Wmissing-prototypes]
258 | unsigned int bio_max_size(struct bio *bio)
| ^~~~~~~~~~~~
>> block/bio.c:258:14: error: conflicting types for 'bio_max_size'
In file included from include/linux/blkdev.h:19,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from block/bio.c:6:
include/linux/bio.h:122:29: note: previous implicit declaration of 'bio_max_size' was here
122 | if (bio->bi_iter.bi_size > bio_max_size(bio) - len)
| ^~~~~~~~~~~~
block/bio.c: In function 'bio_max_size':
>> block/bio.c:260:31: error: 'struct bio' has no member named 'bi_disk'
260 | struct request_queue *q = bio->bi_disk->queue;
| ^~
cc1: some warnings being treated as errors
vim +/bio_max_size +258 block/bio.c
257
> 258 unsigned int bio_max_size(struct bio *bio)
259 {
> 260 struct request_queue *q = bio->bi_disk->queue;
261
262 if (blk_queue_limit_bio_size(q))
263 return blk_queue_get_max_sectors(q, bio_op(bio))
264 << SECTOR_SHIFT;
265
266 return UINT_MAX;
267 }
268
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v6 1/3] bio: limit bio max size
by kernel test robot
Hi Changheun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on scsi/for-next linus/master v5.12-rc7]
[cannot apply to block/for-next next-20210409]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Changheun-Lee/bio-limit-bio-max-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-tinyconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/5d00aa42f58575968c4a7a4b374addaf4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Changheun-Lee/bio-limit-bio-max-size/20210412-115922
git checkout 5d00aa42f58575968c4a7a4b374addaf4f9a5624
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/blkdev.h:19,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/bio.h: In function 'bio_full':
>> include/linux/bio.h:122:29: error: implicit declaration of function 'bio_max_size'; did you mean 'bio_max_segs'? [-Werror=implicit-function-declaration]
122 | if (bio->bi_iter.bi_size > bio_max_size(bio) - len)
| ^~~~~~~~~~~~
| bio_max_segs
cc1: some warnings being treated as errors
--
In file included from include/linux/blkdev.h:19,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/bio.h: In function 'bio_full':
>> include/linux/bio.h:122:29: error: implicit declaration of function 'bio_max_size'; did you mean 'bio_max_segs'? [-Werror=implicit-function-declaration]
122 | if (bio->bi_iter.bi_size > bio_max_size(bio) - len)
| ^~~~~~~~~~~~
| bio_max_segs
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:116: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1233: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +122 include/linux/bio.h
108
109 /**
110 * bio_full - check if the bio is full
111 * @bio: bio to check
112 * @len: length of one segment to be added
113 *
114 * Return true if @bio is full and one segment with @len bytes can't be
115 * added to the bio, otherwise return false
116 */
117 static inline bool bio_full(struct bio *bio, unsigned len)
118 {
119 if (bio->bi_vcnt >= bio->bi_max_vecs)
120 return true;
121
> 122 if (bio->bi_iter.bi_size > bio_max_size(bio) - len)
123 return true;
124
125 return false;
126 }
127
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[sashal-linux-stable:queue-4.9 27/27] drivers/infiniband/core/addr.c:80:4: error: 'const struct nla_policy' has no member named 'validation_type'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.9
head: 86939dc341d2ca7dcb02f5eb6dafe4c36cb5ec5a
commit: 86939dc341d2ca7dcb02f5eb6dafe4c36cb5ec5a [27/27] RDMA/addr: Be strict with gid size
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.5.0
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/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.9
git checkout 86939dc341d2ca7dcb02f5eb6dafe4c36cb5ec5a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/i2c/busses/i2c-designware-core.c: In function 'i2c_dw_init':
>> drivers/i2c/busses/i2c-designware-core.c:409:4: error: 't' undeclared (first use in this function); did you mean 'tm'?
t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ;
^
tm
drivers/i2c/busses/i2c-designware-core.c:409:4: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/i2c/busses/i2c-designware-core.c:409:21: error: 'I2C_MAX_FAST_MODE_FREQ' undeclared (first use in this function)
t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ;
^~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/thread_info.h:10,
from arch/xtensa/include/asm/current.h:16,
from include/linux/mutex.h:13,
from drivers/infiniband/core/addr.c:36:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/xtensa/include/asm/page.h:185:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
^
include/linux/compiler.h:184:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/scatterlist.h:140:2: note: in expansion of macro 'BUG_ON'
BUG_ON(!virt_addr_valid(buf));
^~~~~~
arch/xtensa/include/asm/page.h:193:32: note: in expansion of macro 'pfn_valid'
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
^~~~~~~~~
include/linux/scatterlist.h:140:10: note: in expansion of macro 'virt_addr_valid'
BUG_ON(!virt_addr_valid(buf));
^~~~~~~~~~~~~~~
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/xtensa/include/asm/page.h:185:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
^
include/linux/compiler.h:184:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/dma-mapping.h:284:2: note: in expansion of macro 'BUG_ON'
BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
^~~~~~
include/linux/dma-mapping.h:284:9: note: in expansion of macro 'pfn_valid'
BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
^~~~~~~~~
drivers/infiniband/core/addr.c: At top level:
>> drivers/infiniband/core/addr.c:80:4: error: 'const struct nla_policy' has no member named 'validation_type'
.validation_type = NLA_VALIDATE_MIN,
^~~~~~~~~~~~~~~
>> drivers/infiniband/core/addr.c:80:22: error: 'NLA_VALIDATE_MIN' undeclared here (not in a function); did you mean 'MACSEC_VALIDATE_MAX'?
.validation_type = NLA_VALIDATE_MIN,
^~~~~~~~~~~~~~~~
MACSEC_VALIDATE_MAX
>> drivers/infiniband/core/addr.c:80:22: warning: excess elements in struct initializer
drivers/infiniband/core/addr.c:80:22: note: (near initialization for 'ib_nl_addr_policy[4]')
>> drivers/infiniband/core/addr.c:81:4: error: 'const struct nla_policy' has no member named 'min'
.min = sizeof(struct rdma_nla_ls_gid)},
^~~
drivers/infiniband/core/addr.c:81:10: warning: excess elements in struct initializer
.min = sizeof(struct rdma_nla_ls_gid)},
^~~~~~
drivers/infiniband/core/addr.c:81:10: note: (near initialization for 'ib_nl_addr_policy[4]')
vim +80 drivers/infiniband/core/addr.c
76
77 static const struct nla_policy ib_nl_addr_policy[LS_NLA_TYPE_MAX] = {
78 [LS_NLA_TYPE_DGID] = {.type = NLA_BINARY,
79 .len = sizeof(struct rdma_nla_ls_gid),
> 80 .validation_type = NLA_VALIDATE_MIN,
> 81 .min = sizeof(struct rdma_nla_ls_gid)},
82 };
83
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[linux-stable-rc:linux-4.9.y 1640/2200] net/tipc/link.c:896:23: warning: variable 'hdr' is uninitialized when used here
by kernel test robot
Hi Hoang,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
head: b76c99cf586bd7e2078de72e6ca5195be58b0dbf
commit: 310014f572a59b311c175321265a08c9adfced0c [1640/2200] tipc: fix NULL deref in tipc_link_xmit()
config: powerpc64-randconfig-r033-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gi...
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.9.y
git checkout 310014f572a59b311c175321265a08c9adfced0c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
net/tipc/link.c:299:5: warning: no previous prototype for function 'tipc_link_is_active' [-Wmissing-prototypes]
int tipc_link_is_active(struct tipc_link *l)
^
net/tipc/link.c:299:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tipc_link_is_active(struct tipc_link *l)
^
static
net/tipc/link.c:375:5: warning: no previous prototype for function 'link_bc_rcv_gap' [-Wmissing-prototypes]
u16 link_bc_rcv_gap(struct tipc_link *l)
^
net/tipc/link.c:375:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u16 link_bc_rcv_gap(struct tipc_link *l)
^
static
net/tipc/link.c:819:6: warning: no previous prototype for function 'link_prepare_wakeup' [-Wmissing-prototypes]
void link_prepare_wakeup(struct tipc_link *l)
^
net/tipc/link.c:819:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void link_prepare_wakeup(struct tipc_link *l)
^
static
>> net/tipc/link.c:896:23: warning: variable 'hdr' is uninitialized when used here [-Wuninitialized]
imp = msg_importance(hdr);
^~~
net/tipc/link.c:890:22: note: initialize the variable 'hdr' to silence this warning
struct tipc_msg *hdr;
^
= NULL
net/tipc/link.c:959:6: warning: no previous prototype for function 'tipc_link_advance_backlog' [-Wmissing-prototypes]
void tipc_link_advance_backlog(struct tipc_link *l, struct sk_buff_head *xmitq)
^
net/tipc/link.c:959:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tipc_link_advance_backlog(struct tipc_link *l, struct sk_buff_head *xmitq)
^
static
net/tipc/link.c:1002:5: warning: no previous prototype for function 'tipc_link_retrans' [-Wmissing-prototypes]
int tipc_link_retrans(struct tipc_link *l, u16 from, u16 to,
^
net/tipc/link.c:1002:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tipc_link_retrans(struct tipc_link *l, u16 from, u16 to,
^
static
6 warnings generated.
vim +/hdr +896 net/tipc/link.c
865
866 /**
867 * tipc_link_xmit(): enqueue buffer list according to queue situation
868 * @link: link to use
869 * @list: chain of buffers containing message
870 * @xmitq: returned list of packets to be sent by caller
871 *
872 * Consumes the buffer chain, except when returning -ELINKCONG,
873 * since the caller then may want to make more send attempts.
874 * Returns 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS
875 * Messages at TIPC_SYSTEM_IMPORTANCE are always accepted
876 */
877 int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
878 struct sk_buff_head *xmitq)
879 {
880 unsigned int maxwin = l->window;
881 unsigned int i;
882 unsigned int mtu = l->mtu;
883 u16 ack = l->rcv_nxt - 1;
884 u16 seqno = l->snd_nxt;
885 u16 bc_ack = l->bc_rcvlink->rcv_nxt - 1;
886 struct sk_buff_head *transmq = &l->transmq;
887 struct sk_buff_head *backlogq = &l->backlogq;
888 struct sk_buff *skb, *_skb, *bskb;
889 int pkt_cnt = skb_queue_len(list);
890 struct tipc_msg *hdr;
891 int imp;
892
893 if (pkt_cnt <= 0)
894 return 0;
895
> 896 imp = msg_importance(hdr);
897 /* Match msg importance against this and all higher backlog limits: */
898 if (!skb_queue_empty(backlogq)) {
899 for (i = imp; i <= TIPC_SYSTEM_IMPORTANCE; i++) {
900 if (unlikely(l->backlog[i].len >= l->backlog[i].limit))
901 return link_schedule_user(l, list);
902 }
903 }
904
905 hdr = buf_msg(skb_peek(list));
906 if (unlikely(msg_size(hdr) > mtu)) {
907 skb_queue_purge(list);
908 return -EMSGSIZE;
909 }
910
911 if (pkt_cnt > 1) {
912 l->stats.sent_fragmented++;
913 l->stats.sent_fragments += pkt_cnt;
914 }
915
916 /* Prepare each packet for sending, and add to relevant queue: */
917 while (skb_queue_len(list)) {
918 skb = skb_peek(list);
919 hdr = buf_msg(skb);
920 msg_set_seqno(hdr, seqno);
921 msg_set_ack(hdr, ack);
922 msg_set_bcast_ack(hdr, bc_ack);
923
924 if (likely(skb_queue_len(transmq) < maxwin)) {
925 _skb = skb_clone(skb, GFP_ATOMIC);
926 if (!_skb) {
927 skb_queue_purge(list);
928 return -ENOBUFS;
929 }
930 __skb_dequeue(list);
931 __skb_queue_tail(transmq, skb);
932 __skb_queue_tail(xmitq, _skb);
933 TIPC_SKB_CB(skb)->ackers = l->ackers;
934 l->rcv_unacked = 0;
935 l->stats.sent_pkts++;
936 seqno++;
937 continue;
938 }
939 if (tipc_msg_bundle(skb_peek_tail(backlogq), hdr, mtu)) {
940 kfree_skb(__skb_dequeue(list));
941 l->stats.sent_bundled++;
942 continue;
943 }
944 if (tipc_msg_make_bundle(&bskb, hdr, mtu, l->addr)) {
945 kfree_skb(__skb_dequeue(list));
946 __skb_queue_tail(backlogq, bskb);
947 l->backlog[msg_importance(buf_msg(bskb))].len++;
948 l->stats.sent_bundled++;
949 l->stats.sent_bundles++;
950 continue;
951 }
952 l->backlog[imp].len += skb_queue_len(list);
953 skb_queue_splice_tail_init(list, backlogq);
954 }
955 l->snd_nxt = seqno;
956 return 0;
957 }
958
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[sashal-linux-stable:queue-5.4 89/95] drivers/i2c/busses/i2c-designware-master.c:115:21: error: use of undeclared identifier 'I2C_MAX_FAST_MODE_FREQ'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: b84a107dec4aa6399034076be0ce458238b783a6
commit: 66fe450f41911c42744942e0556ba774c3c28989 [89/95] i2c: designware: Adjust bus_freq_hz when refuse high speed mode set
config: x86_64-randconfig-r035-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 66fe450f41911c42744942e0556ba774c3c28989
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/i2c/busses/i2c-designware-master.c:115:21: error: use of undeclared identifier 'I2C_MAX_FAST_MODE_FREQ'
t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ;
^
1 error generated.
vim +/I2C_MAX_FAST_MODE_FREQ +115 drivers/i2c/busses/i2c-designware-master.c
34
35 static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev)
36 {
37 const char *mode_str, *fp_str = "";
38 u32 comp_param1;
39 u32 sda_falling_time, scl_falling_time;
40 struct i2c_timings *t = &dev->timings;
41 u32 ic_clk;
42 int ret;
43
44 ret = i2c_dw_acquire_lock(dev);
45 if (ret)
46 return ret;
47 comp_param1 = dw_readl(dev, DW_IC_COMP_PARAM_1);
48 i2c_dw_release_lock(dev);
49
50 /* Set standard and fast speed dividers for high/low periods */
51 sda_falling_time = t->sda_fall_ns ?: 300; /* ns */
52 scl_falling_time = t->scl_fall_ns ?: 300; /* ns */
53
54 /* Calculate SCL timing parameters for standard mode if not set */
55 if (!dev->ss_hcnt || !dev->ss_lcnt) {
56 ic_clk = i2c_dw_clk_rate(dev);
57 dev->ss_hcnt =
58 i2c_dw_scl_hcnt(ic_clk,
59 4000, /* tHD;STA = tHIGH = 4.0 us */
60 sda_falling_time,
61 0, /* 0: DW default, 1: Ideal */
62 0); /* No offset */
63 dev->ss_lcnt =
64 i2c_dw_scl_lcnt(ic_clk,
65 4700, /* tLOW = 4.7 us */
66 scl_falling_time,
67 0); /* No offset */
68 }
69 dev_dbg(dev->dev, "Standard Mode HCNT:LCNT = %d:%d\n",
70 dev->ss_hcnt, dev->ss_lcnt);
71
72 /*
73 * Set SCL timing parameters for fast mode or fast mode plus. Only
74 * difference is the timing parameter values since the registers are
75 * the same.
76 */
77 if (t->bus_freq_hz == 1000000) {
78 /*
79 * Check are fast mode plus parameters available and use
80 * fast mode if not.
81 */
82 if (dev->fp_hcnt && dev->fp_lcnt) {
83 dev->fs_hcnt = dev->fp_hcnt;
84 dev->fs_lcnt = dev->fp_lcnt;
85 fp_str = " Plus";
86 }
87 }
88 /*
89 * Calculate SCL timing parameters for fast mode if not set. They are
90 * needed also in high speed mode.
91 */
92 if (!dev->fs_hcnt || !dev->fs_lcnt) {
93 ic_clk = i2c_dw_clk_rate(dev);
94 dev->fs_hcnt =
95 i2c_dw_scl_hcnt(ic_clk,
96 600, /* tHD;STA = tHIGH = 0.6 us */
97 sda_falling_time,
98 0, /* 0: DW default, 1: Ideal */
99 0); /* No offset */
100 dev->fs_lcnt =
101 i2c_dw_scl_lcnt(ic_clk,
102 1300, /* tLOW = 1.3 us */
103 scl_falling_time,
104 0); /* No offset */
105 }
106 dev_dbg(dev->dev, "Fast Mode%s HCNT:LCNT = %d:%d\n",
107 fp_str, dev->fs_hcnt, dev->fs_lcnt);
108
109 /* Check is high speed possible and fall back to fast mode if not */
110 if ((dev->master_cfg & DW_IC_CON_SPEED_MASK) ==
111 DW_IC_CON_SPEED_HIGH) {
112 if ((comp_param1 & DW_IC_COMP_PARAM_1_SPEED_MODE_MASK)
113 != DW_IC_COMP_PARAM_1_SPEED_MODE_HIGH) {
114 dev_err(dev->dev, "High Speed not supported!\n");
> 115 t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ;
116 dev->master_cfg &= ~DW_IC_CON_SPEED_MASK;
117 dev->master_cfg |= DW_IC_CON_SPEED_FAST;
118 dev->hs_hcnt = 0;
119 dev->hs_lcnt = 0;
120 } else if (dev->hs_hcnt && dev->hs_lcnt) {
121 dev_dbg(dev->dev, "High Speed Mode HCNT:LCNT = %d:%d\n",
122 dev->hs_hcnt, dev->hs_lcnt);
123 }
124 }
125
126 ret = i2c_dw_set_sda_hold(dev);
127 if (ret)
128 goto out;
129
130 switch (dev->master_cfg & DW_IC_CON_SPEED_MASK) {
131 case DW_IC_CON_SPEED_STD:
132 mode_str = "Standard Mode";
133 break;
134 case DW_IC_CON_SPEED_HIGH:
135 mode_str = "High Speed Mode";
136 break;
137 default:
138 mode_str = "Fast Mode";
139 }
140 dev_dbg(dev->dev, "Bus speed: %s%s\n", mode_str, fp_str);
141
142 out:
143 return ret;
144 }
145
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[sashal-linux-stable:queue-5.4 89/95] drivers/i2c/busses/i2c-designware-master.c:115:21: error: 'I2C_MAX_FAST_MODE_FREQ' undeclared
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: b84a107dec4aa6399034076be0ce458238b783a6
commit: 66fe450f41911c42744942e0556ba774c3c28989 [89/95] i2c: designware: Adjust bus_freq_hz when refuse high speed mode set
config: sparc64-randconfig-r034-20210412 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
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/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 66fe450f41911c42744942e0556ba774c3c28989
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/i2c/busses/i2c-designware-master.c: In function 'i2c_dw_set_timings_master':
>> drivers/i2c/busses/i2c-designware-master.c:115:21: error: 'I2C_MAX_FAST_MODE_FREQ' undeclared (first use in this function)
115 | t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ;
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-designware-master.c:115:21: note: each undeclared identifier is reported only once for each function it appears in
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS || MCOUNT
Selected by
- LOCKDEP && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86
vim +/I2C_MAX_FAST_MODE_FREQ +115 drivers/i2c/busses/i2c-designware-master.c
34
35 static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev)
36 {
37 const char *mode_str, *fp_str = "";
38 u32 comp_param1;
39 u32 sda_falling_time, scl_falling_time;
40 struct i2c_timings *t = &dev->timings;
41 u32 ic_clk;
42 int ret;
43
44 ret = i2c_dw_acquire_lock(dev);
45 if (ret)
46 return ret;
47 comp_param1 = dw_readl(dev, DW_IC_COMP_PARAM_1);
48 i2c_dw_release_lock(dev);
49
50 /* Set standard and fast speed dividers for high/low periods */
51 sda_falling_time = t->sda_fall_ns ?: 300; /* ns */
52 scl_falling_time = t->scl_fall_ns ?: 300; /* ns */
53
54 /* Calculate SCL timing parameters for standard mode if not set */
55 if (!dev->ss_hcnt || !dev->ss_lcnt) {
56 ic_clk = i2c_dw_clk_rate(dev);
57 dev->ss_hcnt =
58 i2c_dw_scl_hcnt(ic_clk,
59 4000, /* tHD;STA = tHIGH = 4.0 us */
60 sda_falling_time,
61 0, /* 0: DW default, 1: Ideal */
62 0); /* No offset */
63 dev->ss_lcnt =
64 i2c_dw_scl_lcnt(ic_clk,
65 4700, /* tLOW = 4.7 us */
66 scl_falling_time,
67 0); /* No offset */
68 }
69 dev_dbg(dev->dev, "Standard Mode HCNT:LCNT = %d:%d\n",
70 dev->ss_hcnt, dev->ss_lcnt);
71
72 /*
73 * Set SCL timing parameters for fast mode or fast mode plus. Only
74 * difference is the timing parameter values since the registers are
75 * the same.
76 */
77 if (t->bus_freq_hz == 1000000) {
78 /*
79 * Check are fast mode plus parameters available and use
80 * fast mode if not.
81 */
82 if (dev->fp_hcnt && dev->fp_lcnt) {
83 dev->fs_hcnt = dev->fp_hcnt;
84 dev->fs_lcnt = dev->fp_lcnt;
85 fp_str = " Plus";
86 }
87 }
88 /*
89 * Calculate SCL timing parameters for fast mode if not set. They are
90 * needed also in high speed mode.
91 */
92 if (!dev->fs_hcnt || !dev->fs_lcnt) {
93 ic_clk = i2c_dw_clk_rate(dev);
94 dev->fs_hcnt =
95 i2c_dw_scl_hcnt(ic_clk,
96 600, /* tHD;STA = tHIGH = 0.6 us */
97 sda_falling_time,
98 0, /* 0: DW default, 1: Ideal */
99 0); /* No offset */
100 dev->fs_lcnt =
101 i2c_dw_scl_lcnt(ic_clk,
102 1300, /* tLOW = 1.3 us */
103 scl_falling_time,
104 0); /* No offset */
105 }
106 dev_dbg(dev->dev, "Fast Mode%s HCNT:LCNT = %d:%d\n",
107 fp_str, dev->fs_hcnt, dev->fs_lcnt);
108
109 /* Check is high speed possible and fall back to fast mode if not */
110 if ((dev->master_cfg & DW_IC_CON_SPEED_MASK) ==
111 DW_IC_CON_SPEED_HIGH) {
112 if ((comp_param1 & DW_IC_COMP_PARAM_1_SPEED_MODE_MASK)
113 != DW_IC_COMP_PARAM_1_SPEED_MODE_HIGH) {
114 dev_err(dev->dev, "High Speed not supported!\n");
> 115 t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ;
116 dev->master_cfg &= ~DW_IC_CON_SPEED_MASK;
117 dev->master_cfg |= DW_IC_CON_SPEED_FAST;
118 dev->hs_hcnt = 0;
119 dev->hs_lcnt = 0;
120 } else if (dev->hs_hcnt && dev->hs_lcnt) {
121 dev_dbg(dev->dev, "High Speed Mode HCNT:LCNT = %d:%d\n",
122 dev->hs_hcnt, dev->hs_lcnt);
123 }
124 }
125
126 ret = i2c_dw_set_sda_hold(dev);
127 if (ret)
128 goto out;
129
130 switch (dev->master_cfg & DW_IC_CON_SPEED_MASK) {
131 case DW_IC_CON_SPEED_STD:
132 mode_str = "Standard Mode";
133 break;
134 case DW_IC_CON_SPEED_HIGH:
135 mode_str = "High Speed Mode";
136 break;
137 default:
138 mode_str = "Fast Mode";
139 }
140 dev_dbg(dev->dev, "Bus speed: %s%s\n", mode_str, fp_str);
141
142 out:
143 return ret;
144 }
145
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[intel-linux-intel-lts:4.19/android_r 18603/22631] drivers/usb/host/xhci-dbgraw.c:144:7: error: implicit declaration of function 'copy_to_user'; did you mean 'sg_copy_to_buffer'?
by kernel test robot
Hi Abhilash,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 4.19/android_r
head: 072f407465e8e25a3c2c22590e1ab72ccf335151
commit: 570daed7a2103fdef146a86d30df849a01ea01a9 [18603/22631] usb: xhci: dbc: Add a dbc raw driver to provide a raw interface on DbC
config: alpha-allmodconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
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://github.com/intel/linux-intel-lts/commit/570daed7a2103fdef146a86d3...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 4.19/android_r
git checkout 570daed7a2103fdef146a86d30df849a01ea01a9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/usb/host/xhci-dbgraw.c:48:21: warning: no previous prototype for 'xhci_dbc_alloc_requests' [-Wmissing-prototypes]
48 | struct dbc_request *xhci_dbc_alloc_requests(struct dbc_ep *dep,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-dbgraw.c: In function 'dbc_read':
>> drivers/usb/host/xhci-dbgraw.c:144:7: error: implicit declaration of function 'copy_to_user'; did you mean 'sg_copy_to_buffer'? [-Werror=implicit-function-declaration]
144 | r = copy_to_user(buf, req->buf, xfer);
| ^~~~~~~~~~~~
| sg_copy_to_buffer
drivers/usb/host/xhci-dbgraw.c: In function 'dbc_write':
>> drivers/usb/host/xhci-dbgraw.c:185:8: error: implicit declaration of function 'copy_from_user'; did you mean 'kfifo_from_user'? [-Werror=implicit-function-declaration]
185 | ret = copy_from_user(req->buf, buf, xfer);
| ^~~~~~~~~~~~~~
| kfifo_from_user
In file included from drivers/usb/host/xhci-dbgraw.c:13:
drivers/usb/host/xhci-dbgraw.c: At top level:
include/linux/module.h:133:6: warning: 'init_module' specifies less restrictive attribute than its target 'xhci_dbc_raw_init': 'cold' [-Wmissing-attributes]
133 | int init_module(void) __attribute__((alias(#initfn)));
| ^~~~~~~~~~~
include/linux/module.h:123:28: note: in expansion of macro 'module_init'
123 | #define late_initcall(fn) module_init(fn)
| ^~~~~~~~~~~
drivers/usb/host/xhci-dbgraw.c:360:1: note: in expansion of macro 'late_initcall'
360 | late_initcall(xhci_dbc_raw_init);
| ^~~~~~~~~~~~~
drivers/usb/host/xhci-dbgraw.c:350:19: note: 'init_module' target declared here
350 | static int __init xhci_dbc_raw_init(void)
| ^~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-dbgraw.c:13:
include/linux/module.h:139:7: warning: 'cleanup_module' specifies less restrictive attribute than its target 'xhci_dbc_raw_fini': 'cold' [-Wmissing-attributes]
139 | void cleanup_module(void) __attribute__((alias(#exitfn)));
| ^~~~~~~~~~~~~~
drivers/usb/host/xhci-dbgraw.c:361:1: note: in expansion of macro 'module_exit'
361 | module_exit(xhci_dbc_raw_fini);
| ^~~~~~~~~~~
drivers/usb/host/xhci-dbgraw.c:355:20: note: 'cleanup_module' target declared here
355 | static void __exit xhci_dbc_raw_fini(void)
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +144 drivers/usb/host/xhci-dbgraw.c
47
> 48 struct dbc_request *xhci_dbc_alloc_requests(struct dbc_ep *dep,
49 void (*fn)(struct xhci_hcd *, struct dbc_request *))
50 {
51 struct dbc_request *req;
52
53 req = dbc_alloc_request(dep, GFP_KERNEL);
54 if (!req)
55 return req;
56
57 req->length = DBC_RAW_BULK_BUFFER_SIZE;
58 req->buf = kmalloc(req->length, GFP_KERNEL);
59 if (!req->buf)
60 xhci_dbc_free_req(dep, req);
61
62 req->complete = fn;
63
64 return req;
65 }
66
67 static void dbc_complete_in(struct xhci_hcd *xhci,
68 struct dbc_request *req)
69 {
70 struct xhci_dbc *dbc = (struct xhci_dbc *) xhci->dbc;
71 struct dbc_dev *dev = (struct dbc_dev *) dbc->func_priv;
72
73 if (req->status)
74 dev->error = req->status;
75
76 wake_up(&dev->write_wq);
77 }
78
79 static void dbc_complete_out(struct xhci_hcd *xhci,
80 struct dbc_request *req)
81 {
82 struct xhci_dbc *dbc = (struct xhci_dbc *) xhci->dbc;
83 struct dbc_dev *dev = (struct dbc_dev *) dbc->func_priv;
84
85 if (req->status)
86 dev->error = req->status;
87
88 wake_up(&dev->read_wq);
89 }
90
91 static ssize_t dbc_read(struct file *fp, char __user *buf,
92 size_t count, loff_t *pos)
93 {
94 int status = 0;
95 struct dbc_dev *dev = (struct dbc_dev *) fp->private_data;
96 struct xhci_dbc *dbc = dev->dbc;
97 struct dbc_request *req;
98 struct dbc_port *port = &dbc->port;
99 int r = count, xfer;
100 int ret;
101
102 if (dbc->state != DS_CONFIGURED)
103 return -EAGAIN;
104
105 port->in = get_in_ep(dbc->xhci);
106
107 mutex_lock(&dev->read_excl);
108
109 req = xhci_dbc_alloc_requests(port->in, dbc_complete_out);
110 if (!req) {
111 r = -ENOMEM;
112 goto alloc_fail;
113 }
114
115 req->actual = 0;
116
117 xfer = min_t(size_t, count, DBC_RAW_BULK_BUFFER_SIZE);
118 req->length = xfer;
119
120 status = dbc_ep_queue(port->in, req, GFP_ATOMIC);
121 if (status) {
122 dev->error = status;
123 r = status;
124 goto request_fail;
125 }
126
127 ret = wait_event_interruptible(dev->read_wq,
128 (req->status != -EINPROGRESS));
129
130 if (ret < 0) {
131 r = ret;
132 goto request_fail;
133 }
134
135 if (dev->error) {
136 r = dev->error;
137 goto request_fail;
138 }
139
140 xfer = (req->actual < count) ? req->actual : count;
141 if (!req->actual) {
142 r = 0;
143 } else {
> 144 r = copy_to_user(buf, req->buf, xfer);
145 if (!r)
146 r = xfer;
147 }
148
149 request_fail:
150 xhci_dbc_free_req(port->in, req);
151 alloc_fail:
152 mutex_unlock(&dev->read_excl);
153
154 return r;
155 }
156
157 static ssize_t dbc_write(struct file *fp, const char __user *buf,
158 size_t count, loff_t *pos)
159 {
160 int status = 0;
161 struct dbc_dev *dev = (struct dbc_dev *) fp->private_data;
162 struct xhci_dbc *dbc = dev->dbc;
163 struct dbc_request *req = 0;
164 struct dbc_port *port = &dbc->port;
165 int r = count, xfer;
166 int ret;
167
168 if (dbc->state != DS_CONFIGURED)
169 return -EAGAIN;
170
171 port->out = get_out_ep(dbc->xhci);
172
173 mutex_lock(&dev->write_excl);
174
175 /* get an idle tx request to use */
176 req = xhci_dbc_alloc_requests(port->out, dbc_complete_in);
177 if (!req) {
178 r = -ENOMEM;
179 goto alloc_fail;
180 }
181
182 req->actual = 0;
183 xfer = min_t(size_t, count, DBC_RAW_BULK_BUFFER_SIZE);
184
> 185 ret = copy_from_user(req->buf, buf, xfer);
186 if (ret) {
187 r = ret;
188 goto request_fail;
189 }
190 r = xfer;
191 req->length = xfer;
192 status = dbc_ep_queue(port->out, req, GFP_ATOMIC);
193 if (status) {
194 dev->error = status;
195 r = status;
196 goto request_fail;
197 }
198
199 ret = wait_event_interruptible(dev->write_wq,
200 (req->status != -EINPROGRESS));
201 if (ret < 0)
202 r = ret;
203
204 request_fail:
205 xhci_dbc_free_req(port->out, req);
206 alloc_fail:
207 mutex_unlock(&dev->write_excl);
208
209 return r;
210 }
211
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [Outreachy kernel] [PATCH] staging: rtl8192u: Remove variable set but not used
by kernel test robot
Hi "Fabio,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Fabio-M-De-Francesco/staging-rtl...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 1b9e18de8d43bf798622cc365f99b41f180b446f
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
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://github.com/0day-ci/linux/commit/be9cfd3fe0983d09a3d400bd84e497367...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Fabio-M-De-Francesco/staging-rtl8192u-Remove-variable-set-but-not-used/20210412-014242
git checkout be9cfd3fe0983d09a3d400bd84e497367fc5d29d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/staging/rtl8192u/r8192U_core.c: In function 'rtl8192_hard_data_xmit':
>> drivers/staging/rtl8192u/r8192U_core.c:917:2: error: 'ret' undeclared (first use in this function); did you mean 'net'?
917 | ret = rtl8192_tx(dev, skb);
| ^~~
| net
drivers/staging/rtl8192u/r8192U_core.c:917:2: note: each undeclared identifier is reported only once for each function it appears in
vim +917 drivers/staging/rtl8192u/r8192U_core.c
8fc8598e61f6f3 Jerry Chuang 2009-11-03 897
8fc8598e61f6f3 Jerry Chuang 2009-11-03 898 /* this function TX data frames when the ieee80211 stack requires this.
8fc8598e61f6f3 Jerry Chuang 2009-11-03 899 * It checks also if we need to stop the ieee tx queue, eventually do it
8fc8598e61f6f3 Jerry Chuang 2009-11-03 900 */
069b3162590896 Raphaël Beamonte 2015-09-20 901 static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
069b3162590896 Raphaël Beamonte 2015-09-20 902 int rate)
8fc8598e61f6f3 Jerry Chuang 2009-11-03 903 {
8fc8598e61f6f3 Jerry Chuang 2009-11-03 904 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 905 unsigned long flags;
20f896c4dbb48f simran singhal 2017-02-12 906 struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 907 u8 queue_index = tcb_desc->queue_index;
8fc8598e61f6f3 Jerry Chuang 2009-11-03 908
8fc8598e61f6f3 Jerry Chuang 2009-11-03 909 /* shall not be referred by command packet */
4a8d1135548baf Xenia Ragiadakou 2013-06-09 910 RTL8192U_ASSERT(queue_index != TXCMD_QUEUE);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 911
8fc8598e61f6f3 Jerry Chuang 2009-11-03 912 spin_lock_irqsave(&priv->tx_lock, flags);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 913
c3f463484bdd0a Ben Hutchings 2016-04-21 914 *(struct net_device **)(skb->cb) = dev;
8fc8598e61f6f3 Jerry Chuang 2009-11-03 915 tcb_desc->bTxEnableFwCalcDur = 1;
8fc8598e61f6f3 Jerry Chuang 2009-11-03 916 skb_push(skb, priv->ieee80211->tx_headroom);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 @917 ret = rtl8192_tx(dev, skb);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 918
8fc8598e61f6f3 Jerry Chuang 2009-11-03 919 spin_unlock_irqrestore(&priv->tx_lock, flags);
8fc8598e61f6f3 Jerry Chuang 2009-11-03 920 }
8fc8598e61f6f3 Jerry Chuang 2009-11-03 921
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months