All of lore.kernel.org
 help / color / mirror / Atom feed
* sound/virtio/virtio_pcm_msg.c:56 virtsnd_pcm_sg_num() warn: should '((pg - mem_map) + arch_pfn_offset) << 13' be a 64 bit type?
@ 2021-09-28 18:20 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-09-28 18:20 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3819 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Anton Yakovlev <anton.yakovlev@opensynergy.com>
CC: Takashi Iwai <tiwai@suse.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6fd3ec5c7af58d5d6b598fba22ac387645af33f4
commit: f40a28679e0b7cb3a9cc6627a8dbb40961990f0a ALSA: virtio: handling control and I/O messages for the PCM device
date:   7 months ago
:::::: branch date: 3 hours ago
:::::: commit date: 7 months ago
config: arc-randconfig-m031-20210928 (attached as .config)
compiler: arc-elf-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
sound/virtio/virtio_pcm_msg.c:56 virtsnd_pcm_sg_num() warn: should '((pg - mem_map) + arch_pfn_offset) << 13' be a 64 bit type?

vim +56 sound/virtio/virtio_pcm_msg.c

f40a28679e0b7c Anton Yakovlev 2021-03-02  38  
f40a28679e0b7c Anton Yakovlev 2021-03-02  39  /**
f40a28679e0b7c Anton Yakovlev 2021-03-02  40   * virtsnd_pcm_sg_num() - Count the number of sg-elements required to represent
f40a28679e0b7c Anton Yakovlev 2021-03-02  41   *                        vmalloc'ed buffer.
f40a28679e0b7c Anton Yakovlev 2021-03-02  42   * @data: Pointer to vmalloc'ed buffer.
f40a28679e0b7c Anton Yakovlev 2021-03-02  43   * @length: Buffer size.
f40a28679e0b7c Anton Yakovlev 2021-03-02  44   *
f40a28679e0b7c Anton Yakovlev 2021-03-02  45   * Context: Any context.
f40a28679e0b7c Anton Yakovlev 2021-03-02  46   * Return: Number of physically contiguous parts in the @data.
f40a28679e0b7c Anton Yakovlev 2021-03-02  47   */
f40a28679e0b7c Anton Yakovlev 2021-03-02  48  static int virtsnd_pcm_sg_num(u8 *data, unsigned int length)
f40a28679e0b7c Anton Yakovlev 2021-03-02  49  {
f40a28679e0b7c Anton Yakovlev 2021-03-02  50  	phys_addr_t sg_address;
f40a28679e0b7c Anton Yakovlev 2021-03-02  51  	unsigned int sg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  52  	int num = 0;
f40a28679e0b7c Anton Yakovlev 2021-03-02  53  
f40a28679e0b7c Anton Yakovlev 2021-03-02  54  	while (length) {
f40a28679e0b7c Anton Yakovlev 2021-03-02  55  		struct page *pg = vmalloc_to_page(data);
f40a28679e0b7c Anton Yakovlev 2021-03-02 @56  		phys_addr_t pg_address = page_to_phys(pg);
f40a28679e0b7c Anton Yakovlev 2021-03-02  57  		size_t pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  58  
f40a28679e0b7c Anton Yakovlev 2021-03-02  59  		pg_length = PAGE_SIZE - offset_in_page(data);
f40a28679e0b7c Anton Yakovlev 2021-03-02  60  		if (pg_length > length)
f40a28679e0b7c Anton Yakovlev 2021-03-02  61  			pg_length = length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  62  
f40a28679e0b7c Anton Yakovlev 2021-03-02  63  		if (!num || sg_address + sg_length != pg_address) {
f40a28679e0b7c Anton Yakovlev 2021-03-02  64  			sg_address = pg_address;
f40a28679e0b7c Anton Yakovlev 2021-03-02  65  			sg_length = pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  66  			num++;
f40a28679e0b7c Anton Yakovlev 2021-03-02  67  		} else {
f40a28679e0b7c Anton Yakovlev 2021-03-02  68  			sg_length += pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  69  		}
f40a28679e0b7c Anton Yakovlev 2021-03-02  70  
f40a28679e0b7c Anton Yakovlev 2021-03-02  71  		data += pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  72  		length -= pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  73  	}
f40a28679e0b7c Anton Yakovlev 2021-03-02  74  
f40a28679e0b7c Anton Yakovlev 2021-03-02  75  	return num;
f40a28679e0b7c Anton Yakovlev 2021-03-02  76  }
f40a28679e0b7c Anton Yakovlev 2021-03-02  77  

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24753 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread
* sound/virtio/virtio_pcm_msg.c:56 virtsnd_pcm_sg_num() warn: should '((pg - mem_map) + arch_pfn_offset) << 13' be a 64 bit type?
@ 2021-11-10 15:56 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-11-10 15:56 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3820 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Anton Yakovlev <anton.yakovlev@opensynergy.com>
CC: Takashi Iwai <tiwai@suse.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cb690f5238d71f543f4ce874aa59237cf53a877c
commit: f40a28679e0b7cb3a9cc6627a8dbb40961990f0a ALSA: virtio: handling control and I/O messages for the PCM device
date:   8 months ago
:::::: branch date: 21 hours ago
:::::: commit date: 8 months ago
config: arc-randconfig-m031-20210928 (attached as .config)
compiler: arc-elf-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
sound/virtio/virtio_pcm_msg.c:56 virtsnd_pcm_sg_num() warn: should '((pg - mem_map) + arch_pfn_offset) << 13' be a 64 bit type?

vim +56 sound/virtio/virtio_pcm_msg.c

f40a28679e0b7c Anton Yakovlev 2021-03-02  38  
f40a28679e0b7c Anton Yakovlev 2021-03-02  39  /**
f40a28679e0b7c Anton Yakovlev 2021-03-02  40   * virtsnd_pcm_sg_num() - Count the number of sg-elements required to represent
f40a28679e0b7c Anton Yakovlev 2021-03-02  41   *                        vmalloc'ed buffer.
f40a28679e0b7c Anton Yakovlev 2021-03-02  42   * @data: Pointer to vmalloc'ed buffer.
f40a28679e0b7c Anton Yakovlev 2021-03-02  43   * @length: Buffer size.
f40a28679e0b7c Anton Yakovlev 2021-03-02  44   *
f40a28679e0b7c Anton Yakovlev 2021-03-02  45   * Context: Any context.
f40a28679e0b7c Anton Yakovlev 2021-03-02  46   * Return: Number of physically contiguous parts in the @data.
f40a28679e0b7c Anton Yakovlev 2021-03-02  47   */
f40a28679e0b7c Anton Yakovlev 2021-03-02  48  static int virtsnd_pcm_sg_num(u8 *data, unsigned int length)
f40a28679e0b7c Anton Yakovlev 2021-03-02  49  {
f40a28679e0b7c Anton Yakovlev 2021-03-02  50  	phys_addr_t sg_address;
f40a28679e0b7c Anton Yakovlev 2021-03-02  51  	unsigned int sg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  52  	int num = 0;
f40a28679e0b7c Anton Yakovlev 2021-03-02  53  
f40a28679e0b7c Anton Yakovlev 2021-03-02  54  	while (length) {
f40a28679e0b7c Anton Yakovlev 2021-03-02  55  		struct page *pg = vmalloc_to_page(data);
f40a28679e0b7c Anton Yakovlev 2021-03-02 @56  		phys_addr_t pg_address = page_to_phys(pg);
f40a28679e0b7c Anton Yakovlev 2021-03-02  57  		size_t pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  58  
f40a28679e0b7c Anton Yakovlev 2021-03-02  59  		pg_length = PAGE_SIZE - offset_in_page(data);
f40a28679e0b7c Anton Yakovlev 2021-03-02  60  		if (pg_length > length)
f40a28679e0b7c Anton Yakovlev 2021-03-02  61  			pg_length = length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  62  
f40a28679e0b7c Anton Yakovlev 2021-03-02  63  		if (!num || sg_address + sg_length != pg_address) {
f40a28679e0b7c Anton Yakovlev 2021-03-02  64  			sg_address = pg_address;
f40a28679e0b7c Anton Yakovlev 2021-03-02  65  			sg_length = pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  66  			num++;
f40a28679e0b7c Anton Yakovlev 2021-03-02  67  		} else {
f40a28679e0b7c Anton Yakovlev 2021-03-02  68  			sg_length += pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  69  		}
f40a28679e0b7c Anton Yakovlev 2021-03-02  70  
f40a28679e0b7c Anton Yakovlev 2021-03-02  71  		data += pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  72  		length -= pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  73  	}
f40a28679e0b7c Anton Yakovlev 2021-03-02  74  
f40a28679e0b7c Anton Yakovlev 2021-03-02  75  	return num;
f40a28679e0b7c Anton Yakovlev 2021-03-02  76  }
f40a28679e0b7c Anton Yakovlev 2021-03-02  77  

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24753 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread
* sound/virtio/virtio_pcm_msg.c:56 virtsnd_pcm_sg_num() warn: should '((pg - mem_map) + arch_pfn_offset) << 13' be a 64 bit type?
@ 2021-11-11 11:05 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-11-11 11:05 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3820 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Anton Yakovlev <anton.yakovlev@opensynergy.com>
CC: Takashi Iwai <tiwai@suse.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   debe436e77c72fcee804fb867f275e6d31aa999c
commit: f40a28679e0b7cb3a9cc6627a8dbb40961990f0a ALSA: virtio: handling control and I/O messages for the PCM device
date:   8 months ago
:::::: branch date: 10 hours ago
:::::: commit date: 8 months ago
config: arc-randconfig-m031-20210928 (attached as .config)
compiler: arc-elf-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
sound/virtio/virtio_pcm_msg.c:56 virtsnd_pcm_sg_num() warn: should '((pg - mem_map) + arch_pfn_offset) << 13' be a 64 bit type?

vim +56 sound/virtio/virtio_pcm_msg.c

f40a28679e0b7c Anton Yakovlev 2021-03-02  38  
f40a28679e0b7c Anton Yakovlev 2021-03-02  39  /**
f40a28679e0b7c Anton Yakovlev 2021-03-02  40   * virtsnd_pcm_sg_num() - Count the number of sg-elements required to represent
f40a28679e0b7c Anton Yakovlev 2021-03-02  41   *                        vmalloc'ed buffer.
f40a28679e0b7c Anton Yakovlev 2021-03-02  42   * @data: Pointer to vmalloc'ed buffer.
f40a28679e0b7c Anton Yakovlev 2021-03-02  43   * @length: Buffer size.
f40a28679e0b7c Anton Yakovlev 2021-03-02  44   *
f40a28679e0b7c Anton Yakovlev 2021-03-02  45   * Context: Any context.
f40a28679e0b7c Anton Yakovlev 2021-03-02  46   * Return: Number of physically contiguous parts in the @data.
f40a28679e0b7c Anton Yakovlev 2021-03-02  47   */
f40a28679e0b7c Anton Yakovlev 2021-03-02  48  static int virtsnd_pcm_sg_num(u8 *data, unsigned int length)
f40a28679e0b7c Anton Yakovlev 2021-03-02  49  {
f40a28679e0b7c Anton Yakovlev 2021-03-02  50  	phys_addr_t sg_address;
f40a28679e0b7c Anton Yakovlev 2021-03-02  51  	unsigned int sg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  52  	int num = 0;
f40a28679e0b7c Anton Yakovlev 2021-03-02  53  
f40a28679e0b7c Anton Yakovlev 2021-03-02  54  	while (length) {
f40a28679e0b7c Anton Yakovlev 2021-03-02  55  		struct page *pg = vmalloc_to_page(data);
f40a28679e0b7c Anton Yakovlev 2021-03-02 @56  		phys_addr_t pg_address = page_to_phys(pg);
f40a28679e0b7c Anton Yakovlev 2021-03-02  57  		size_t pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  58  
f40a28679e0b7c Anton Yakovlev 2021-03-02  59  		pg_length = PAGE_SIZE - offset_in_page(data);
f40a28679e0b7c Anton Yakovlev 2021-03-02  60  		if (pg_length > length)
f40a28679e0b7c Anton Yakovlev 2021-03-02  61  			pg_length = length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  62  
f40a28679e0b7c Anton Yakovlev 2021-03-02  63  		if (!num || sg_address + sg_length != pg_address) {
f40a28679e0b7c Anton Yakovlev 2021-03-02  64  			sg_address = pg_address;
f40a28679e0b7c Anton Yakovlev 2021-03-02  65  			sg_length = pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  66  			num++;
f40a28679e0b7c Anton Yakovlev 2021-03-02  67  		} else {
f40a28679e0b7c Anton Yakovlev 2021-03-02  68  			sg_length += pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  69  		}
f40a28679e0b7c Anton Yakovlev 2021-03-02  70  
f40a28679e0b7c Anton Yakovlev 2021-03-02  71  		data += pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  72  		length -= pg_length;
f40a28679e0b7c Anton Yakovlev 2021-03-02  73  	}
f40a28679e0b7c Anton Yakovlev 2021-03-02  74  
f40a28679e0b7c Anton Yakovlev 2021-03-02  75  	return num;
f40a28679e0b7c Anton Yakovlev 2021-03-02  76  }
f40a28679e0b7c Anton Yakovlev 2021-03-02  77  

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24753 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-11 11:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-28 18:20 sound/virtio/virtio_pcm_msg.c:56 virtsnd_pcm_sg_num() warn: should '((pg - mem_map) + arch_pfn_offset) << 13' be a 64 bit type? kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-11-10 15:56 kernel test robot
2021-11-11 11:05 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.