[kbuild] Re: [PATCH] ALSA: control_led: use helper macro to declare device attributes with specific permission

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
In-Reply-To: <20210404083047.71048-1-o-taka...@sakamocchi.jp>
References: <20210404083047.71048-1-o-taka...@sakamocchi.jp>
TO: Takashi Sakamoto 
TO: ti...@suse.de
TO: pe...@perex.cz
CC: alsa-de...@alsa-project.org

Hi Takashi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on sound/for-next]
[also build test WARNING on next-20210401]
[cannot apply to v5.12-rc6]
[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/Takashi-Sakamoto/ALSA-control_led-use-helper-macro-to-declare-device-attributes-with-specific-permission/20210404-163324
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
:: branch date: 2 days ago
:: commit date: 2 days ago
config: i386-randconfig-m021-20210406 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

smatch warnings:
sound/core/control_led.c:385 mode_show() error: uninitialized symbol 'str'.

vim +/str +385 sound/core/control_led.c

22d8de62f11b28 Jaroslav Kysela  2021-03-17  369  
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  370  /*
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  371   * sysfs
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  372   */
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  373  
013389f5522b33 Takashi Sakamoto 2021-04-04  374  static ssize_t 
mode_show(struct device *dev, struct device_attribute *attr, char *buf)
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  375  {
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  376 struct snd_ctl_led *led 
= container_of(dev, struct snd_ctl_led, dev);
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  377 const char *str;
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  378  
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  379 switch (led->mode) {
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  380 case MODE_FOLLOW_MUTE:  
str = "follow-mute"; break;
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  381 case MODE_FOLLOW_ROUTE: 
str = "follow-route"; break;
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  382 case MODE_ON:   
str = "on"; break;
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  383 case MODE_OFF:  
str = "off"; break;
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  384 }
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17 @385 return sprintf(buf, 
"%s\n", str);
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  386  }
cb17fe0045aaa7 Jaroslav Kysela  2021-03-17  387  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] [linux-next:master 9160/9190] net/netfilter/nf_log_syslog.c:212 nf_log_dump_tcp_header() warn: mask and shift to zero

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: Linux Memory Management List 
TO: Stephen Rothwell 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   454c576c3f5e51d60f00a4ac0dde07f4f9d70e9d
commit: ed05281b3fa0c502eeb197d301414f2995e6a2e4 [9160/9190] Merge branch 
'akpm-current/current'
:: branch date: 5 days ago
:: commit date: 5 days ago
config: i386-randconfig-m021-20210405 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

smatch warnings:
net/netfilter/nf_log_syslog.c:212 nf_log_dump_tcp_header() warn: mask and shift 
to zero

vim +212 net/netfilter/nf_log_syslog.c

e465cccd0b9de1 Florian Westphal 2021-03-25  175  
e465cccd0b9de1 Florian Westphal 2021-03-25  176  static noinline_for_stack int
e465cccd0b9de1 Florian Westphal 2021-03-25  177  nf_log_dump_tcp_header(struct 
nf_log_buf *m,
e465cccd0b9de1 Florian Westphal 2021-03-25  178const 
struct sk_buff *skb,
e465cccd0b9de1 Florian Westphal 2021-03-25  179u8 
proto, int fragment,
e465cccd0b9de1 Florian Westphal 2021-03-25  180unsigned 
int offset,
e465cccd0b9de1 Florian Westphal 2021-03-25  181unsigned 
int logflags)
e465cccd0b9de1 Florian Westphal 2021-03-25  182  {
e465cccd0b9de1 Florian Westphal 2021-03-25  183 struct tcphdr _tcph;
e465cccd0b9de1 Florian Westphal 2021-03-25  184 const struct tcphdr *th;
e465cccd0b9de1 Florian Westphal 2021-03-25  185  
e465cccd0b9de1 Florian Westphal 2021-03-25  186 /* Max length: 10 
"PROTO=TCP " */
e465cccd0b9de1 Florian Westphal 2021-03-25  187 nf_log_buf_add(m, 
"PROTO=TCP ");
e465cccd0b9de1 Florian Westphal 2021-03-25  188  
e465cccd0b9de1 Florian Westphal 2021-03-25  189 if (fragment)
e465cccd0b9de1 Florian Westphal 2021-03-25  190 return 0;
e465cccd0b9de1 Florian Westphal 2021-03-25  191  
e465cccd0b9de1 Florian Westphal 2021-03-25  192 /* Max length: 25 
"INCOMPLETE [65535 bytes] " */
e465cccd0b9de1 Florian Westphal 2021-03-25  193 th = 
skb_header_pointer(skb, offset, sizeof(_tcph), &_tcph);
e465cccd0b9de1 Florian Westphal 2021-03-25  194 if (!th) {
e465cccd0b9de1 Florian Westphal 2021-03-25  195 
nf_log_buf_add(m, "INCOMPLETE [%u bytes] ", skb->len - offset);
e465cccd0b9de1 Florian Westphal 2021-03-25  196 return 1;
e465cccd0b9de1 Florian Westphal 2021-03-25  197 }
e465cccd0b9de1 Florian Westphal 2021-03-25  198  
e465cccd0b9de1 Florian Westphal 2021-03-25  199 /* Max length: 20 
"SPT=65535 DPT=65535 " */
e465cccd0b9de1 Florian Westphal 2021-03-25  200 nf_log_buf_add(m, 
"SPT=%u DPT=%u ",
e465cccd0b9de1 Florian Westphal 2021-03-25  201
ntohs(th->source), ntohs(th->dest));
e465cccd0b9de1 Florian Westphal 2021-03-25  202 /* Max length: 30 
"SEQ=4294967295 ACK=4294967295 " */
e465cccd0b9de1 Florian Westphal 2021-03-25  203 if (logflags & 
NF_LOG_TCPSEQ) {
e465cccd0b9de1 Florian Westphal 2021-03-25  204 
nf_log_buf_add(m, "SEQ=%u ACK=%u ",
e465cccd0b9de1 Florian Westphal 2021-03-25  205
ntohl(th->seq), ntohl(th->ack_seq));
e465cccd0b9de1 Florian Westphal 2021-03-25  206 }
e465cccd0b9de1 Florian Westphal 2021-03-25  207  
e465cccd0b9de1 Florian Westphal 2021-03-25  208 /* Max length: 13 
"WINDOW=65535 " */
e465cccd0b9de1 Florian Westphal 2021-03-25  209 nf_log_buf_add(m, 
"WINDOW=%u ", ntohs(th->window));
e465cccd0b9de1 Florian Westphal 2021-03-25  210 /* Max length: 9 
"RES=0x3C " */
e465cccd0b9de1 Florian Westphal 2021-03-25  211 nf_log_buf_add(m, 
"RES=0x%02x ", (u_int8_t)(ntohl(tcp_flag_word(th) &
e465cccd0b9de1 Florian Westphal 2021-03-25 @212 
TCP_RESERVED_BITS) >> 22));
e465cccd0b9de1 Florian Westphal 2021-03-25  213 /* Max length: 32 "CWR 
ECE URG ACK PSH RST SYN FIN " */
e465cccd0b9de1 Florian Westphal 2021-03-25  214 if (th->cwr)
e465cccd0b9de1 Florian Westphal 2021-03-25  215 
nf_log_buf_add(m, "CWR ");
e465cccd0b9de1 Florian Westphal 2021-03-25  216 if (th->ece)
e465cccd0b9de1 Florian Westphal 2021-03-25  217 
nf_log_buf_add(m, "ECE ");
e465cccd0b9de1 Florian Westphal 2021-03-25  218 if (th->urg)
e465cccd0b9de1 Florian Westphal 2021-03-25  219 
nf_log_buf_add(m, "URG ");
e465cccd0b9de1 Florian Westphal 2021-03-25  220 if (th->ack)
e465cccd0b9de1 Florian Westphal 2021-03-25  221 
nf_log_buf_add(m, "ACK ");
e465cccd0b

[kbuild] [iio:testing 39/69] drivers/iio/cdc/ad7150.c:321 ad7150_write_event_config() error: uninitialized symbol 'ret'.

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
TO: Jonathan Cameron 
CC: Alexandru Ardelean 

Hi Jonathan,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing
head:   448fea9496ae166a285858bf17eb5473eb77f4dc
commit: 53e5aaab4c850f99a9eb3144cc29eccea7570c7f [39/69] iio:cdc:ad7150: Move 
driver out of staging.
:: branch date: 4 hours ago
:: commit date: 4 days ago
config: x86_64-randconfig-m001-20210405 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

smatch warnings:
drivers/iio/cdc/ad7150.c:321 ad7150_write_event_config() error: uninitialized 
symbol 'ret'.

vim +/ret +321 drivers/iio/cdc/ad7150.c

54c5be349bf66e drivers/staging/iio/adc/ad7150.c Barry Song 2010-10-27  
231  
531efd6aa09916 drivers/staging/iio/adc/ad7150.c Jonathan Cameron   2011-09-02  
232  static int ad7150_write_event_config(struct iio_dev *indio_dev,
c4f0ebd91467c7 drivers/staging/iio/cdc/ad7150.c Shraddha Barke 2015-12-29  
233   const struct iio_chan_spec *chan,
c4f0ebd91467c7 drivers/staging/iio/cdc/ad7150.c Shraddha Barke 2015-12-29  
234   enum iio_event_type type,
1489d629a481dc drivers/staging/iio/cdc/ad7150.c Lars-Peter Clausen 2013-10-07  
235   enum iio_event_direction dir, int state)
54c5be349bf66e drivers/staging/iio/adc/ad7150.c Barry Song 2010-10-27  
236  {
531efd6aa09916 drivers/staging/iio/adc/ad7150.c Jonathan Cameron   2011-09-02  
237  struct ad7150_chip_info *chip = iio_priv(indio_dev);
887b66527c6435 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
238  int ret;
54c5be349bf66e drivers/staging/iio/adc/ad7150.c Barry Song 2010-10-27  
239  
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
240  /*
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
241   * There is only a single shared control and no on chip
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
242   * interrupt disables for the two interrupt lines.
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
243   * So, enabling will switch the events configured to enable
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
244   * whatever was most recently requested and if necessary enable_irq()
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
245   * the interrupt and any disable will disable_irq() for that
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
246   * channels interrupt.
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
247   */
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
248  if (!state) {
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
249  if ((chip->int_enabled[chan->channel]) &&
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
250  (type == chip->type) && (dir == chip->dir)) {
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
251  disable_irq(chip->interrupts[chan->channel]);
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
252  chip->int_enabled[chan->channel] = false;
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
253  }
531efd6aa09916 drivers/staging/iio/adc/ad7150.c Jonathan Cameron   2011-09-02  
254  return 0;
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
255  }
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
256  
531efd6aa09916 drivers/staging/iio/adc/ad7150.c Jonathan Cameron   2011-09-02  
257  mutex_lock(>state_lock);
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
258  if ((type != chip->type) || (dir != chip->dir)) {
887b66527c6435 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
259  int rising = (dir == IIO_EV_DIR_RISING);
887b66527c6435 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
260  u8 thresh_type, cfg, fixed;
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
261  
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
262  /*
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
263   * Need to temporarily disable both interrupts if
b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron   2021-03-14  
264

[kbuild] drivers/gpu/drm/nouveau/nouveau_bo5039.c:39 nv50_bo_move_m2mf() warn: should 'new_reg->num_pages << (12)' be a 64 bit type?

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Ben Skeggs 
CC: Lyude Paul 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   0a50438c84363bd37fe18fe432888ae9a074dcab
commit: 8b9d5d63a7193156b6b397c4f5078efbc200695f drm/nouveau/bo: split buffer 
move functions into their own source files
date:   9 months ago
:: branch date: 4 hours ago
:: commit date: 9 months ago
config: riscv-randconfig-m031-20210405 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

smatch warnings:
drivers/gpu/drm/nouveau/nouveau_bo5039.c:39 nv50_bo_move_m2mf() warn: should 
'new_reg->num_pages << (12)' be a 64 bit type?

vim +39 drivers/gpu/drm/nouveau/nouveau_bo5039.c

8b9d5d63a71931 Ben Skeggs 2020-06-22   33  
8b9d5d63a71931 Ben Skeggs 2020-06-22   34  int
8b9d5d63a71931 Ben Skeggs 2020-06-22   35  nv50_bo_move_m2mf(struct 
nouveau_channel *chan, struct ttm_buffer_object *bo,
8b9d5d63a71931 Ben Skeggs 2020-06-22   36 struct ttm_mem_reg 
*old_reg, struct ttm_mem_reg *new_reg)
8b9d5d63a71931 Ben Skeggs 2020-06-22   37  {
8b9d5d63a71931 Ben Skeggs 2020-06-22   38   struct nouveau_mem *mem = 
nouveau_mem(old_reg);
8b9d5d63a71931 Ben Skeggs 2020-06-22  @39   u64 length = 
(new_reg->num_pages << PAGE_SHIFT);
8b9d5d63a71931 Ben Skeggs 2020-06-22   40   u64 src_offset = 
mem->vma[0].addr;
8b9d5d63a71931 Ben Skeggs 2020-06-22   41   u64 dst_offset = 
mem->vma[1].addr;
8b9d5d63a71931 Ben Skeggs 2020-06-22   42   int src_tiled = !!mem->kind;
8b9d5d63a71931 Ben Skeggs 2020-06-22   43   int dst_tiled = 
!!nouveau_mem(new_reg)->kind;
8b9d5d63a71931 Ben Skeggs 2020-06-22   44   int ret;
8b9d5d63a71931 Ben Skeggs 2020-06-22   45  
8b9d5d63a71931 Ben Skeggs 2020-06-22   46   while (length) {
8b9d5d63a71931 Ben Skeggs 2020-06-22   47   u32 amount, stride, 
height;
8b9d5d63a71931 Ben Skeggs 2020-06-22   48  
8b9d5d63a71931 Ben Skeggs 2020-06-22   49   ret = RING_SPACE(chan, 
18 + 6 * (src_tiled + dst_tiled));
8b9d5d63a71931 Ben Skeggs 2020-06-22   50   if (ret)
8b9d5d63a71931 Ben Skeggs 2020-06-22   51   return ret;
8b9d5d63a71931 Ben Skeggs 2020-06-22   52  
8b9d5d63a71931 Ben Skeggs 2020-06-22   53   amount  = min(length, 
(u64)(4 * 1024 * 1024));
8b9d5d63a71931 Ben Skeggs 2020-06-22   54   stride  = 16 * 4;
8b9d5d63a71931 Ben Skeggs 2020-06-22   55   height  = amount / 
stride;
8b9d5d63a71931 Ben Skeggs 2020-06-22   56  
8b9d5d63a71931 Ben Skeggs 2020-06-22   57   if (src_tiled) {
8b9d5d63a71931 Ben Skeggs 2020-06-22   58   
BEGIN_NV04(chan, NvSubCopy, 0x0200, 7);
8b9d5d63a71931 Ben Skeggs 2020-06-22   59   OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   60   OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   61   OUT_RING  
(chan, stride);
8b9d5d63a71931 Ben Skeggs 2020-06-22   62   OUT_RING  
(chan, height);
8b9d5d63a71931 Ben Skeggs 2020-06-22   63   OUT_RING  
(chan, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   64   OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   65   OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   66   } else {
8b9d5d63a71931 Ben Skeggs 2020-06-22   67   
BEGIN_NV04(chan, NvSubCopy, 0x0200, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   68   OUT_RING  
(chan, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   69   }
8b9d5d63a71931 Ben Skeggs 2020-06-22   70   if (dst_tiled) {
8b9d5d63a71931 Ben Skeggs 2020-06-22   71   
BEGIN_NV04(chan, NvSubCopy, 0x021c, 7);
8b9d5d63a71931 Ben Skeggs 2020-06-22   72   OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   73   OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   74   OUT_RING  
(chan, stride);
8b9d5d63a71931 Ben Skeggs 2020-06-22   75   OUT_RING  
(chan, height);
8b9d5d63a71931 Ben Skeggs 2020-06-22   76   OUT_RING  
(chan, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   77   OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   78   OUT_RING  
(chan, 0);
8b9d5d63a71931 Ben Skeggs 2020-06-22   79   } else {
8b9d5d63a71931 Ben Skeggs 2020-06-22   80   
BEGIN_NV04(chan, NvSubCopy, 0x021c, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   81   OUT_RING  
(chan, 1);
8b9d5d63a71931 Ben Skeggs 2020-06-22   82   }
8b9d5d63a71931 Ben Skeggs 2020-06-22   83  
8b9d5d63a71931 Ben Skeggs 2020-06-22   84

[kbuild] drivers/vdpa/mlx5/core/mr.c:46 populate_mtts() warn: should '(((1))) << (mr->log_size)' be a 64 bit type?

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Eli Cohen 
CC: "Michael S. Tsirkin" 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   e49d033bddf5b565044e2abe4241353959bc9120
commit: 710eb8e32d04714452759f2b66884bfa7e97d495 vdpa/mlx5: Fix memory key MTT 
population
date:   3 months ago
:: branch date: 21 hours ago
:: commit date: 3 months ago
config: microblaze-randconfig-m031-20210405 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/vdpa/mlx5/core/mr.c:46 populate_mtts() warn: should '(((1))) << 
(mr->log_size)' be a 64 bit type?
drivers/vdpa/mlx5/core/mr.c:46 populate_mtts() warn: should '(((1))) << 
(mr->log_size)' be a 64 bit type?

Old smatch warnings:
drivers/vdpa/mlx5/core/mr.c:277 map_direct_mr() warn: missing error code 'err'

vim +46 drivers/vdpa/mlx5/core/mr.c

94abbccdf2916c Eli Cohen 2020-08-04  33  
94abbccdf2916c Eli Cohen 2020-08-04  34  static void populate_mtts(struct 
mlx5_vdpa_direct_mr *mr, __be64 *mtt)
94abbccdf2916c Eli Cohen 2020-08-04  35  {
94abbccdf2916c Eli Cohen 2020-08-04  36 struct scatterlist *sg;
710eb8e32d0471 Eli Cohen 2021-01-07  37 int nsg = mr->nsg;
710eb8e32d0471 Eli Cohen 2021-01-07  38 u64 dma_addr;
710eb8e32d0471 Eli Cohen 2021-01-07  39 u64 dma_len;
710eb8e32d0471 Eli Cohen 2021-01-07  40 int j = 0;
94abbccdf2916c Eli Cohen 2020-08-04  41 int i;
94abbccdf2916c Eli Cohen 2020-08-04  42  
710eb8e32d0471 Eli Cohen 2021-01-07  43 for_each_sg(mr->sg_head.sgl, 
sg, mr->nent, i) {
710eb8e32d0471 Eli Cohen 2021-01-07  44 for (dma_addr = 
sg_dma_address(sg), dma_len = sg_dma_len(sg);
710eb8e32d0471 Eli Cohen 2021-01-07  45  nsg && dma_len;
710eb8e32d0471 Eli Cohen 2021-01-07 @46  nsg--, dma_addr += 
BIT(mr->log_size), dma_len -= BIT(mr->log_size))
710eb8e32d0471 Eli Cohen 2021-01-07  47 mtt[j++] = 
cpu_to_be64(dma_addr);
710eb8e32d0471 Eli Cohen 2021-01-07  48 }
94abbccdf2916c Eli Cohen 2020-08-04  49  }
94abbccdf2916c Eli Cohen 2020-08-04  50  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] [drm-intel:for-linux-next 1/1] drivers/gpu/drm/i915/display/intel_psr.c:668 tgl_dc3co_exitline_compute_config() warn: ignoring unreachable code.

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: intel-...@lists.freedesktop.org
CC: dri-de...@lists.freedesktop.org
TO: "Gwan-gyeong Mun" 
CC: "José Roberto de Souza" 

tree:   git://anongit.freedesktop.org/drm-intel for-linux-next
head:   2d667442dbe70e7e78c3450b17ba5aa5032a7b6b
commit: 2d667442dbe70e7e78c3450b17ba5aa5032a7b6b [1/1] drm/i915/display/psr: 
Disable DC3CO when the PSR2 is used
:: branch date: 3 days ago
:: commit date: 3 days ago
config: x86_64-randconfig-m001-20210405 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/gpu/drm/i915/display/intel_psr.c:668 
tgl_dc3co_exitline_compute_config() warn: ignoring unreachable code.

Old smatch warnings:
drivers/gpu/drm/i915/display/intel_psr.c:1219 
intel_psr2_program_plane_sel_fetch() error: we previously assumed 'plane_state' 
could be null (see line 1211)

vim +668 drivers/gpu/drm/i915/display/intel_psr.c

1c4d821db91936 Anshuman Gupta2019-10-03  647  
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  648  static void
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  649  
tgl_dc3co_exitline_compute_config(struct intel_dp *intel_dp,
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  650
  struct intel_crtc_state *crtc_state)
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  651  {
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  652const u32 crtc_vdisplay 
= crtc_state->uapi.adjusted_mode.crtc_vdisplay;
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  653struct 
intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  654struct drm_i915_private 
*dev_priv = dp_to_i915(intel_dp);
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  655u32 exit_scanlines;
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  656  
2d667442dbe70e Gwan-gyeong Mun   2021-04-01  657/*
2d667442dbe70e Gwan-gyeong Mun   2021-04-01  658 * FIXME: Due to the 
changed sequence of activating/deactivating DC3CO,
2d667442dbe70e Gwan-gyeong Mun   2021-04-01  659 * disable DC3CO until 
the changed dc3co activating/deactivating sequence
2d667442dbe70e Gwan-gyeong Mun   2021-04-01  660 * is applied. 
B.Specs:49196
2d667442dbe70e Gwan-gyeong Mun   2021-04-01  661 */
2d667442dbe70e Gwan-gyeong Mun   2021-04-01  662return;
2d667442dbe70e Gwan-gyeong Mun   2021-04-01  663  
62c211bb9e1bee Gwan-gyeong Mun   2021-02-22  664/*
62c211bb9e1bee Gwan-gyeong Mun   2021-02-22  665 * DMC's DC3CO exit 
mechanism has an issue with Selective Fecth
62c211bb9e1bee Gwan-gyeong Mun   2021-02-22  666 * TODO: when the issue 
is addressed, this restriction should be removed.
62c211bb9e1bee Gwan-gyeong Mun   2021-02-22  667 */
62c211bb9e1bee Gwan-gyeong Mun   2021-02-22 @668if 
(crtc_state->enable_psr2_sel_fetch)
62c211bb9e1bee Gwan-gyeong Mun   2021-02-22  669return;
62c211bb9e1bee Gwan-gyeong Mun   2021-02-22  670  
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  671if 
(!(dev_priv->csr.allowed_dc_mask & DC_STATE_EN_DC3CO))
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  672return;
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  673  
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  674/* B.Specs:49196 DC3CO 
only works with pipeA and DDIA.*/
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  675if 
(to_intel_crtc(crtc_state->uapi.crtc)->pipe != PIPE_A ||
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  676dig_port->base.port 
!= PORT_A)
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  677return;
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  678  
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  679/*
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  680 * DC3CO Exit time 
200us B.Spec 49196
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  681 * PSR2 transcoder 
Early Exit scanlines = ROUNDUP(200 / line time) + 1
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  682 */
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  683exit_scanlines =
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  684
intel_usecs_to_scanlines(_state->uapi.adjusted_mode, 200) + 1;
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  685  
16c56083c0cb60 Pankaj Bharadiya  2020-01-28  686if 
(drm_WARN_ON(_priv->drm, exit_scanlines > crtc_vdisplay))
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  687return;
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  688  
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  689
crtc_state->dc3co_exitline = crtc_vdisplay - exit_scanlines;
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  690  }
c5c772cf8d7cb6 José Roberto de Souza 2020-01-22  691  

:: The code at line 668 was first introduced by comm

[kbuild] drivers/gpu/drm/nouveau/nouveau_bo.c:1323 nouveau_bo_move_ntfy() warn: should 'new_reg->start << (12)' be a 64 bit type?

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Dave Airlie 
CC: Maarten Lankhorst 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   e49d033bddf5b565044e2abe4241353959bc9120
commit: 60e9eabf41fa916d2ef68c5bf929197975917578 Backmerge remote-tracking 
branch 'drm/drm-next' into drm-misc-next
date:   9 months ago
:: branch date: 18 hours ago
:: commit date: 9 months ago
config: riscv-randconfig-m031-20210405 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/gpu/drm/nouveau/nouveau_bo.c:1323 nouveau_bo_move_ntfy() warn: should 
'new_reg->start << (12)' be a 64 bit type?

Old smatch warnings:
drivers/gpu/drm/nouveau/nouveau_bo.c:947 nv50_bo_move_m2mf() warn: should 
'new_reg->num_pages << (12)' be a 64 bit type?
drivers/gpu/drm/nouveau/nouveau_bo.c:1337 nouveau_bo_vm_bind() warn: should 
'new_reg->start << (12)' be a 64 bit type?

vim +1323 drivers/gpu/drm/nouveau/nouveau_bo.c

6ee738610f41b5 Ben Skeggs 2009-12-11  1296  
a4154bbffdc9f6 Ben Skeggs 2011-02-10  1297  static void
66257db7a5276d Nicolai Hähnle 2016-12-15  1298  nouveau_bo_move_ntfy(struct 
ttm_buffer_object *bo, bool evict,
605f9ccd7d0ad6 Ben Skeggs 2016-05-17  1299   struct 
ttm_mem_reg *new_reg)
a4154bbffdc9f6 Ben Skeggs 2011-02-10  1300  {
9ce523cc3bf2ac Ben Skeggs 2017-11-01  1301  struct nouveau_mem *mem 
= new_reg ? nouveau_mem(new_reg) : NULL;
a4154bbffdc9f6 Ben Skeggs 2011-02-10  1302  struct nouveau_bo *nvbo 
= nouveau_bo(bo);
24e8375b1bfdf7 Ben Skeggs 2017-11-01  1303  struct nouveau_vma *vma;
a4154bbffdc9f6 Ben Skeggs 2011-02-10  1304  
9f1feed2e16652 Ben Skeggs 2012-01-25  1305  /* ttm can now 
(stupidly) pass the driver bos it didn't create... */
9f1feed2e16652 Ben Skeggs 2012-01-25  1306  if (bo->destroy != 
nouveau_bo_del_ttm)
9f1feed2e16652 Ben Skeggs 2012-01-25  1307  return;
9f1feed2e16652 Ben Skeggs 2012-01-25  1308  
425b34f7df63a2 Ben Skeggs 2017-11-01  1309  if (mem && 
new_reg->mem_type != TTM_PL_SYSTEM &&
9ce523cc3bf2ac Ben Skeggs 2017-11-01  1310  mem->mem.page == 
nvbo->page) {
a48296ab9dbe8b Ben Skeggs 2017-11-01  1311  
list_for_each_entry(vma, >vma_list, head) {
24e8375b1bfdf7 Ben Skeggs 2017-11-01  1312  
nouveau_vma_map(vma, mem);
a48296ab9dbe8b Ben Skeggs 2017-11-01  1313  }
d2f9c56a50 Ben Skeggs 2011-06-06  1314  } else {
a48296ab9dbe8b Ben Skeggs 2017-11-01  1315  
list_for_each_entry(vma, >vma_list, head) {
10dcab3e7f477b Ben Skeggs 2016-12-12  1316  
WARN_ON(ttm_bo_wait(bo, false, false));
24e8375b1bfdf7 Ben Skeggs 2017-11-01  1317  
nouveau_vma_unmap(vma);
fd2871af3d2dad Ben Skeggs 2011-06-06  1318  }
a4154bbffdc9f6 Ben Skeggs 2011-02-10  1319  }
0dc9b286b8d2c2 Nirmoy Das 2020-06-24  1320  
0dc9b286b8d2c2 Nirmoy Das 2020-06-24  1321  if (new_reg) {
0dc9b286b8d2c2 Nirmoy Das 2020-06-24  1322  if 
(new_reg->mm_node)
0dc9b286b8d2c2 Nirmoy Das 2020-06-24 @1323  
nvbo->offset = (new_reg->start << PAGE_SHIFT);
0dc9b286b8d2c2 Nirmoy Das 2020-06-24  1324  else
0dc9b286b8d2c2 Nirmoy Das 2020-06-24  1325  
nvbo->offset = 0;
0dc9b286b8d2c2 Nirmoy Das 2020-06-24  1326  }
0dc9b286b8d2c2 Nirmoy Das 2020-06-24  1327  

:: The code at line 1323 was first introduced by commit
:: 0dc9b286b8d2c219a55f6ad05d144aa4da495e97 drm/nouveau: don't use ttm 
bo->offset v3

:: TO: Nirmoy Das 
:: CC: Christian König 

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] drivers/vdpa/mlx5/net/mlx5_vnet.c:614 umem_size() error: uninitialized symbol 'p_a'.

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Eli Cohen 
CC: "Michael S. Tsirkin" 
CC: Parav Pandit 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   e49d033bddf5b565044e2abe4241353959bc9120
commit: 1a86b377aa2147a7c866b03142e848c18e5f3cb8 vdpa/mlx5: Add VDPA driver for 
supported mlx5 devices
date:   8 months ago
:: branch date: 18 hours ago
:: commit date: 8 months ago
config: microblaze-randconfig-m031-20210405 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/vdpa/mlx5/net/mlx5_vnet.c:614 umem_size() error: uninitialized symbol 
'p_a'.
drivers/vdpa/mlx5/net/mlx5_vnet.c:614 umem_size() error: uninitialized symbol 
'p_b'.
drivers/vdpa/mlx5/net/mlx5_vnet.c:696 umem_destroy() error: potentially 
dereferencing uninitialized 'umem'.

Old smatch warnings:
drivers/vdpa/mlx5/net/mlx5_vnet.c:219 print_features() warn: should '1))) 
<< (57))' be a 64 bit type?
drivers/vdpa/mlx5/net/mlx5_vnet.c:220 print_features() warn: should '1))) 
<< (60))' be a 64 bit type?
drivers/vdpa/mlx5/net/mlx5_vnet.c:221 print_features() warn: should '1))) 
<< (61))' be a 64 bit type?
drivers/vdpa/mlx5/net/mlx5_vnet.c:222 print_features() warn: should '1))) 
<< (62))' be a 64 bit type?
drivers/vdpa/mlx5/net/mlx5_vnet.c:223 print_features() warn: should '1))) 
<< (63))' be a 64 bit type?
drivers/vdpa/mlx5/net/mlx5_vnet.c:226 print_features() warn: should '1))) 
<< (32))' be a 64 bit type?
drivers/vdpa/mlx5/net/mlx5_vnet.c:227 print_features() warn: should '1))) 
<< (33))' be a 64 bit type?
drivers/vdpa/mlx5/net/mlx5_vnet.c:228 print_features() warn: should '1))) 
<< (34))' be a 64 bit type?
drivers/vdpa/mlx5/net/mlx5_vnet.c:229 print_features() warn: should '1))) 
<< (36))' be a 64 bit type?
drivers/vdpa/mlx5/net/mlx5_vnet.c:230 print_features() warn: should '1))) 
<< (37))' be a 64 bit type?
drivers/vdpa/mlx5/net/mlx5_vnet.c:870 alloc_inout() warn: variable dereferenced 
before check 'in' (see line 868)
drivers/vdpa/mlx5/net/mlx5_vnet.c:870 alloc_inout() warn: variable dereferenced 
before check 'out' (see line 869)
drivers/vdpa/mlx5/net/mlx5_vnet.c:882 alloc_inout() warn: variable dereferenced 
before check 'in' (see line 880)
drivers/vdpa/mlx5/net/mlx5_vnet.c:882 alloc_inout() warn: variable dereferenced 
before check 'out' (see line 881)
drivers/vdpa/mlx5/net/mlx5_vnet.c:899 alloc_inout() warn: variable dereferenced 
before check 'in' (see line 897)
drivers/vdpa/mlx5/net/mlx5_vnet.c:899 alloc_inout() warn: variable dereferenced 
before check 'out' (see line 898)
drivers/vdpa/mlx5/net/mlx5_vnet.c:917 alloc_inout() warn: variable dereferenced 
before check 'in' (see line 915)
drivers/vdpa/mlx5/net/mlx5_vnet.c:917 alloc_inout() warn: variable dereferenced 
before check 'out' (see line 916)
drivers/vdpa/mlx5/net/mlx5_vnet.c:1470 verify_min_features() warn: should 
'1))) << (33))' be a 64 bit type?
drivers/vdpa/mlx5/net/mlx5_vnet.c:1470 verify_min_features() warn: bitwise AND 
condition is false here

vim +/p_a +614 drivers/vdpa/mlx5/net/mlx5_vnet.c

1a86b377aa2147 Eli Cohen 2020-08-04  589  
1a86b377aa2147 Eli Cohen 2020-08-04  590  static int umem_size(struct 
mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *mvq, int num,
1a86b377aa2147 Eli Cohen 2020-08-04  591 struct 
mlx5_vdpa_umem **umemp)
1a86b377aa2147 Eli Cohen 2020-08-04  592  {
1a86b377aa2147 Eli Cohen 2020-08-04  593struct mlx5_core_dev *mdev = 
ndev->mvdev.mdev;
1a86b377aa2147 Eli Cohen 2020-08-04  594int p_a;
1a86b377aa2147 Eli Cohen 2020-08-04  595int p_b;
1a86b377aa2147 Eli Cohen 2020-08-04  596  
1a86b377aa2147 Eli Cohen 2020-08-04  597switch (num) {
1a86b377aa2147 Eli Cohen 2020-08-04  598case 1:
1a86b377aa2147 Eli Cohen 2020-08-04  599p_a = 
MLX5_CAP_DEV_VDPA_EMULATION(mdev, umem_1_buffer_param_a);
1a86b377aa2147 Eli Cohen 2020-08-04  600p_b = 
MLX5_CAP_DEV_VDPA_EMULATION(mdev, umem_1_buffer_param_b);
1a86b377aa2147 Eli Cohen 2020-08-04  601*umemp = >umem1;
1a86b377aa2147 Eli Cohen 2020-08-04  602break;
1a86b377aa2147 Eli Cohen 2020-08-04  603case 2:
1a86b377aa2147 Eli Cohen 2020-08-04  604p_a = 
MLX5_CAP_DEV_VDPA_EMULATION(mdev, umem_2_buffer_param_a);
1a86b377aa2147 Eli Cohen 2020-08-04  605p_b = 
MLX5_CAP_DEV_VDPA_EMULATION(mdev, umem_2_buffer_param_b);
1a86b377aa2147 Eli Cohen 2020-08-04  606*umemp = >umem2;
1a86b377aa2147 Eli Cohen 2020-08-04  607break;
1a86b377aa2147 Eli Cohen 2020-08-04  608case 3:
1a86b377aa2147 Eli Cohen 2020-08-04  609p_a = 
MLX5_CAP_DEV_VDPA_EMULATION(mdev

[kbuild] Re: [PATCH net-next v9 2/2] net: Add Qcom WWAN control driver

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
In-Reply-To: <1617616369-27305-2-git-send-email-loic.poul...@linaro.org>
References: <1617616369-27305-2-git-send-email-loic.poul...@linaro.org>
TO: Loic Poulain 
TO: gre...@linuxfoundation.org
TO: k...@kernel.org
TO: da...@davemloft.net
CC: linux-arm-...@vger.kernel.org
CC: aleksan...@aleksander.es
CC: linux-ker...@vger.kernel.org
CC: net...@vger.kernel.org
CC: bjorn.anders...@linaro.org
CC: manivannan.sadhasi...@linaro.org
CC: Loic Poulain 

Hi Loic,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:
https://github.com/0day-ci/linux/commits/Loic-Poulain/net-Add-a-WWAN-subsystem/20210405-174547
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 
7d42e84eb99daf9b7feef37e8f2ea1eaf975346b
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Julia Lawall 


cocci warnings: (new ones prefixed by >>)
>> drivers/net/wwan/mhi_wwan_ctrl.c:239:5-11: inconsistent IS_ERR and PTR_ERR 
>> on line 241.

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] drivers/vdpa/mlx5/core/mr.c:282 map_direct_mr() warn: missing error code 'err'

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Eli Cohen 
CC: "Michael S. Tsirkin" 
CC: Parav Pandit 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   e49d033bddf5b565044e2abe4241353959bc9120
commit: 94abbccdf2916cb03f9626f2d36c6e9971490c12 vdpa/mlx5: Add shared memory 
registration code
date:   8 months ago
:: branch date: 16 hours ago
:: commit date: 8 months ago
config: microblaze-randconfig-m031-20210405 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/vdpa/mlx5/core/mr.c:282 map_direct_mr() warn: missing error code 'err'

Old smatch warnings:
drivers/vdpa/mlx5/core/mr.c:350 add_direct_chain() error: uninitialized symbol 
'err'.
drivers/vdpa/mlx5/core/mr.c:483 mlx5_vdpa_handle_set_map() error: uninitialized 
symbol 'err'.

vim +/err +282 drivers/vdpa/mlx5/core/mr.c

94abbccdf2916c Eli Cohen 2020-08-04  225  
94abbccdf2916c Eli Cohen 2020-08-04  226  static int map_direct_mr(struct 
mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_direct_mr *mr,
94abbccdf2916c Eli Cohen 2020-08-04  227 struct 
vhost_iotlb *iotlb)
94abbccdf2916c Eli Cohen 2020-08-04  228  {
94abbccdf2916c Eli Cohen 2020-08-04  229struct vhost_iotlb_map *map;
94abbccdf2916c Eli Cohen 2020-08-04  230unsigned long lgcd = 0;
94abbccdf2916c Eli Cohen 2020-08-04  231int log_entity_size;
94abbccdf2916c Eli Cohen 2020-08-04  232unsigned long size;
94abbccdf2916c Eli Cohen 2020-08-04  233u64 start = 0;
94abbccdf2916c Eli Cohen 2020-08-04  234int err;
94abbccdf2916c Eli Cohen 2020-08-04  235struct page *pg;
94abbccdf2916c Eli Cohen 2020-08-04  236unsigned int nsg;
94abbccdf2916c Eli Cohen 2020-08-04  237int sglen;
94abbccdf2916c Eli Cohen 2020-08-04  238u64 pa;
94abbccdf2916c Eli Cohen 2020-08-04  239u64 paend;
94abbccdf2916c Eli Cohen 2020-08-04  240struct scatterlist *sg;
94abbccdf2916c Eli Cohen 2020-08-04  241struct device *dma = 
mvdev->mdev->device;
94abbccdf2916c Eli Cohen 2020-08-04  242int ret;
94abbccdf2916c Eli Cohen 2020-08-04  243  
94abbccdf2916c Eli Cohen 2020-08-04  244for (map = 
vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1);
94abbccdf2916c Eli Cohen 2020-08-04  245 map; map = 
vhost_iotlb_itree_next(map, start, mr->end - 1)) {
94abbccdf2916c Eli Cohen 2020-08-04  246size = maplen(map, mr);
94abbccdf2916c Eli Cohen 2020-08-04  247lgcd = gcd(lgcd, size);
94abbccdf2916c Eli Cohen 2020-08-04  248start += size;
94abbccdf2916c Eli Cohen 2020-08-04  249}
94abbccdf2916c Eli Cohen 2020-08-04  250log_entity_size = ilog2(lgcd);
94abbccdf2916c Eli Cohen 2020-08-04  251  
94abbccdf2916c Eli Cohen 2020-08-04  252sglen = 1 << log_entity_size;
94abbccdf2916c Eli Cohen 2020-08-04  253nsg = 
MLX5_DIV_ROUND_UP_POW2(mr->end - mr->start, log_entity_size);
94abbccdf2916c Eli Cohen 2020-08-04  254  
94abbccdf2916c Eli Cohen 2020-08-04  255err = 
sg_alloc_table(>sg_head, nsg, GFP_KERNEL);
94abbccdf2916c Eli Cohen 2020-08-04  256if (err)
94abbccdf2916c Eli Cohen 2020-08-04  257return err;
94abbccdf2916c Eli Cohen 2020-08-04  258  
94abbccdf2916c Eli Cohen 2020-08-04  259sg = mr->sg_head.sgl;
94abbccdf2916c Eli Cohen 2020-08-04  260for (map = 
vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1);
94abbccdf2916c Eli Cohen 2020-08-04  261 map; map = 
vhost_iotlb_itree_next(map, mr->start, mr->end - 1)) {
94abbccdf2916c Eli Cohen 2020-08-04  262paend = map->addr + 
maplen(map, mr);
94abbccdf2916c Eli Cohen 2020-08-04  263for (pa = map->addr; pa 
< paend; pa += sglen) {
94abbccdf2916c Eli Cohen 2020-08-04  264pg = 
pfn_to_page(__phys_to_pfn(pa));
94abbccdf2916c Eli Cohen 2020-08-04  265if (!sg) {
94abbccdf2916c Eli Cohen 2020-08-04  266
mlx5_vdpa_warn(mvdev, "sg null. start 0x%llx, end 0x%llx\n",
94abbccdf2916c Eli Cohen 2020-08-04  267
   map->start, map->last + 1);
94abbccdf2916c Eli Cohen 2020-08-04  268err = 
-ENOMEM;
94abbccdf2916c Eli Cohen 2020-08-04  269goto 
err_map;
94abbccdf2916c Eli Cohen 2020-08-04  270}
94abbccdf2916c Eli Cohen 2020-08-04  271sg_set_page(sg, 
pg, sglen, 0);
94abbccdf2916c Eli Cohen 2020-08-04  272sg = 
sg_next(sg);
94abbccdf2916c Eli Cohen 2020-08-04  273if (!sg)
94abbccdf2916c Eli Cohen 2020-08-04  274

[kbuild] arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 'RCU_in_HARDIRQ' - wrong count at exit

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Boqun Feng 
CC: Peter Zijlstra 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   e49d033bddf5b565044e2abe4241353959bc9120
commit: 9271a40d2a1429113160ccc4c16150921600bcc1 lockdep/selftest: Add wait 
context selftests
date:   3 months ago
:: branch date: 13 hours ago
:: commit date: 3 months ago
config: arm64-randconfig-s031-20210405 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-279-g6d5d9b42-dirty
# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9271a40d2a1429113160ccc4c16150921600bcc1
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9271a40d2a1429113160ccc4c16150921600bcc1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


sparse warnings: (new ones prefixed by >>)
   lib/locking-selftest.c:298:1: sparse: sparse: context imbalance in 'AA_spin' 
- wrong count at exit
   lib/locking-selftest.c:300:1: sparse: sparse: context imbalance in 
'AA_wlock' - wrong count at exit
   lib/locking-selftest.c:302:1: sparse: sparse: context imbalance in 
'AA_rlock' - wrong count at exit
   lib/locking-selftest.c:321:13: sparse: sparse: context imbalance in 
'rlock_AA1' - wrong count at exit
   lib/locking-selftest.c:327:13: sparse: sparse: context imbalance in 
'rlock_AA1B' - wrong count at exit
   lib/locking-selftest.c:347:13: sparse: sparse: context imbalance in 
'rlock_AA2' - wrong count at exit
   lib/locking-selftest.c:359:13: sparse: sparse: context imbalance in 
'rlock_AA3' - wrong count at exit
   lib/locking-selftest.c:722:1: sparse: sparse: context imbalance in 
'double_unlock_spin' - unexpected unlock
   lib/locking-selftest.c:724:1: sparse: sparse: context imbalance in 
'double_unlock_wlock' - unexpected unlock
   lib/locking-selftest.c:726:1: sparse: sparse: context imbalance in 
'double_unlock_rlock' - unexpected unlock
   lib/locking-selftest.c:753:1: sparse: sparse: context imbalance in 
'init_held_spin' - wrong count at exit
   lib/locking-selftest.c:755:1: sparse: sparse: context imbalance in 
'init_held_wlock' - wrong count at exit
   lib/locking-selftest.c:757:1: sparse: sparse: context imbalance in 
'init_held_rlock' - wrong count at exit
   lib/locking-selftest.c:2456:13: sparse: sparse: context imbalance in 
'rcu_exit' - unexpected unlock
   lib/locking-selftest.c:2465:13: sparse: sparse: context imbalance in 
'rcu_bh_exit' - unexpected unlock
   lib/locking-selftest.c:2474:13: sparse: sparse: context imbalance in 
'rcu_sched_exit' - unexpected unlock
   lib/locking-selftest.c:2493:13: sparse: sparse: context imbalance in 
'raw_spinlock_exit' - unexpected unlock
   lib/locking-selftest.c:2502:13: sparse: sparse: context imbalance in 
'spinlock_exit' - unexpected unlock
   lib/locking-selftest.c: note: in included file (through 
include/linux/thread_info.h, arch/arm64/include/asm/preempt.h, 
include/linux/preempt.h, ...):
>> arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 
>> 'RCU_in_HARDIRQ' - wrong count at exit
>> arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 
>> 'RCU_in_NOTTHREADED_HARDIRQ' - wrong count at exit
>> arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 
>> 'RCU_in_SOFTIRQ' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_RCU' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_RCU_BH' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_RCU_CALLBACK' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_RCU_SCHED' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_RAW_SPINLOCK' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_SPINLOCK' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_MUTEX' - wrong count at exit
>> arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 
>> 'RAW_SPINLOCK_in_HARDIRQ' - wrong count at exit
>> arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 
>> 'RAW_SPINLOCK_in_NOTTHREADED_HARDIRQ' - wr

[kbuild] drivers/net/ethernet/broadcom/bnxt/bnxt.c:7654 bnxt_accumulate_all_stats() error: potentially dereferencing uninitialized 'ring0_stats'.

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Michael Chan 
CC: Vasundhara Volam 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   e49d033bddf5b565044e2abe4241353959bc9120
commit: fea6b3335527f41bc729466fb2a95e48a98827ac bnxt_en: Accumulate all 
counters.
date:   8 months ago
:: branch date: 10 hours ago
:: commit date: 8 months ago
config: microblaze-randconfig-m031-20210405 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/net/ethernet/broadcom/bnxt/bnxt.c:7654 bnxt_accumulate_all_stats() 
error: potentially dereferencing uninitialized 'ring0_stats'.

Old smatch warnings:
drivers/net/ethernet/broadcom/bnxt/bnxt.c:1539 bnxt_tpa_end() warn: bitwise AND 
condition is false here
drivers/net/ethernet/broadcom/bnxt/bnxt.c:4876 bnxt_hwrm_vnic_set_tpa() warn: 
bitwise AND condition is false here
drivers/net/ethernet/broadcom/bnxt/bnxt.c:12283 bnxt_init_one() warn: missing 
error code 'rc'

vim +/ring0_stats +7654 drivers/net/ethernet/broadcom/bnxt/bnxt.c

fea6b3335527f4 Michael Chan 2020-07-27  7633  
fea6b3335527f4 Michael Chan 2020-07-27  7634  static void 
bnxt_accumulate_all_stats(struct bnxt *bp)
fea6b3335527f4 Michael Chan 2020-07-27  7635  {
fea6b3335527f4 Michael Chan 2020-07-27  7636struct bnxt_stats_mem 
*ring0_stats;
fea6b3335527f4 Michael Chan 2020-07-27  7637bool ignore_zero = false;
fea6b3335527f4 Michael Chan 2020-07-27  7638int i;
fea6b3335527f4 Michael Chan 2020-07-27  7639  
fea6b3335527f4 Michael Chan 2020-07-27  7640/* Chip bug.  Counter 
intermittently becomes 0. */
fea6b3335527f4 Michael Chan 2020-07-27  7641if (bp->flags & 
BNXT_FLAG_CHIP_P5)
fea6b3335527f4 Michael Chan 2020-07-27  7642ignore_zero = true;
fea6b3335527f4 Michael Chan 2020-07-27  7643  
fea6b3335527f4 Michael Chan 2020-07-27  7644for (i = 0; i < 
bp->cp_nr_rings; i++) {
fea6b3335527f4 Michael Chan 2020-07-27  7645struct bnxt_napi *bnapi 
= bp->bnapi[i];
fea6b3335527f4 Michael Chan 2020-07-27  7646struct 
bnxt_cp_ring_info *cpr;
fea6b3335527f4 Michael Chan 2020-07-27  7647struct bnxt_stats_mem 
*stats;
fea6b3335527f4 Michael Chan 2020-07-27  7648  
fea6b3335527f4 Michael Chan 2020-07-27  7649cpr = >cp_ring;
fea6b3335527f4 Michael Chan 2020-07-27  7650stats = >stats;
fea6b3335527f4 Michael Chan 2020-07-27  7651if (!i)
fea6b3335527f4 Michael Chan 2020-07-27  7652ring0_stats = 
stats;
fea6b3335527f4 Michael Chan 2020-07-27  7653
__bnxt_accumulate_stats(stats->hw_stats, stats->sw_stats,
fea6b3335527f4 Michael Chan 2020-07-27 @7654
ring0_stats->hw_masks,
fea6b3335527f4 Michael Chan 2020-07-27  7655
ring0_stats->len / 8, ignore_zero);
fea6b3335527f4 Michael Chan 2020-07-27  7656}
fea6b3335527f4 Michael Chan 2020-07-27  7657if (bp->flags & 
BNXT_FLAG_PORT_STATS) {
fea6b3335527f4 Michael Chan 2020-07-27  7658struct bnxt_stats_mem 
*stats = >port_stats;
fea6b3335527f4 Michael Chan 2020-07-27  7659__le64 *hw_stats = 
stats->hw_stats;
fea6b3335527f4 Michael Chan 2020-07-27  7660u64 *sw_stats = 
stats->sw_stats;
fea6b3335527f4 Michael Chan 2020-07-27  7661u64 *masks = 
stats->hw_masks;
fea6b3335527f4 Michael Chan 2020-07-27  7662int cnt;
fea6b3335527f4 Michael Chan 2020-07-27  7663  
fea6b3335527f4 Michael Chan 2020-07-27  7664cnt = sizeof(struct 
rx_port_stats) / 8;
fea6b3335527f4 Michael Chan 2020-07-27  7665
__bnxt_accumulate_stats(hw_stats, sw_stats, masks, cnt, false);
fea6b3335527f4 Michael Chan 2020-07-27  7666  
fea6b3335527f4 Michael Chan 2020-07-27  7667hw_stats += 
BNXT_TX_PORT_STATS_BYTE_OFFSET / 8;
fea6b3335527f4 Michael Chan 2020-07-27  7668sw_stats += 
BNXT_TX_PORT_STATS_BYTE_OFFSET / 8;
fea6b3335527f4 Michael Chan 2020-07-27  7669masks += 
BNXT_TX_PORT_STATS_BYTE_OFFSET / 8;
fea6b3335527f4 Michael Chan 2020-07-27  7670cnt = sizeof(struct 
tx_port_stats) / 8;
fea6b3335527f4 Michael Chan 2020-07-27  7671
__bnxt_accumulate_stats(hw_stats, sw_stats, masks, cnt, false);
fea6b3335527f4 Michael Chan 2020-07-27  7672}
fea6b3335527f4 Michael Chan 2020-07-27  7673if (bp->flags & 
BNXT_FLAG_PORT_STATS_EXT) {
fea6b3335527f4 Michael Chan 2020-07-27  7674
bnxt_accumulate_stats(>rx_port_stats_ext);
fea6b3335527f4 Michael Chan 2020-07-27  7675
bnxt_accumulate_stats(>tx_port_stats_ext);
fea6b3335527f4 Michael Chan 2020-07-27  7676}
fea6b3335527f4 Michael Chan 2020-07-27  7677  }
fea6b3335527f4 Michael Chan 2020-07-27  7678  

---
0-DAY CI Kern

[kbuild] Re: [PATCH 02/10] tty/sysrq: Fix issues of code indent should use tabs

2021-04-05 Thread kernel test robot
CC: kbuild-...@lists.01.org
In-Reply-To: <1617593662-25900-3-git-send-email-tanxiao...@huawei.com>
References: <1617593662-25900-3-git-send-email-tanxiao...@huawei.com>
TO: Xiaofei Tan 
TO: gre...@linuxfoundation.org
TO: jirisl...@kernel.org
CC: linux-ker...@vger.kernel.org
CC: linux...@openeuler.org
CC: Xiaofei Tan 

Hi Xiaofei,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tty/tty-testing]
[also build test WARNING on v5.12-rc6 next-20210401]
[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/Xiaofei-Tan/tty-Fix-some-coding-style-issues/20210405-113900
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git 
tty-testing
:: branch date: 4 hours ago
:: commit date: 4 hours ago
config: x86_64-randconfig-m001-20210405 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

smatch warnings:
drivers/tty/sysrq.c:558 __sysrq_get_key_op() warn: curly braces intended?

vim +558 drivers/tty/sysrq.c

^1da177e4c3f41 drivers/char/sysrq.c Linus Torvalds  2005-04-16  545  
^1da177e4c3f41 drivers/char/sysrq.c Linus Torvalds  2005-04-16  546  /*
^1da177e4c3f41 drivers/char/sysrq.c Linus Torvalds  2005-04-16  547   * get and 
put functions for the table, exposed to modules.
^1da177e4c3f41 drivers/char/sysrq.c Linus Torvalds  2005-04-16  548   */
23cbedf812ff7c drivers/tty/sysrq.c  Emil Velikov2020-05-13  549  static 
const struct sysrq_key_op *__sysrq_get_key_op(int key)
bf36b9011e3c5b drivers/char/sysrq.c Andrew Morton   2006-03-25  550  {
23cbedf812ff7c drivers/tty/sysrq.c  Emil Velikov2020-05-13  551 const 
struct sysrq_key_op *op_p = NULL;
^1da177e4c3f41 drivers/char/sysrq.c Linus Torvalds  2005-04-16  552 int i;
^1da177e4c3f41 drivers/char/sysrq.c Linus Torvalds  2005-04-16  553  
^1da177e4c3f41 drivers/char/sysrq.c Linus Torvalds  2005-04-16  554 i = 
sysrq_key_table_key2index(key);
bf36b9011e3c5b drivers/char/sysrq.c Andrew Morton   2006-03-25  555 if (i 
!= -1)
bf36b9011e3c5b drivers/char/sysrq.c Andrew Morton   2006-03-25  556 
op_p = sysrq_key_table[i];
97f5f0cd8cd0a0 drivers/char/sysrq.c Dmitry Torokhov 2010-03-21  557  
^1da177e4c3f41 drivers/char/sysrq.c Linus Torvalds  2005-04-16 @558 
return op_p;
^1da177e4c3f41 drivers/char/sysrq.c Linus Torvalds  2005-04-16  559  }
^1da177e4c3f41 drivers/char/sysrq.c Linus Torvalds  2005-04-16  560  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org