All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] mtd: ftl: Initialize rq.limits.discard_granularity
@ 2021-06-16 11:18 kernel test robot
  0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2021-06-16 11:18 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210613112942.2329192-1-chengzhihao1@huawei.com>
References: <20210613112942.2329192-1-chengzhihao1@huawei.com>
TO: Zhihao Cheng <chengzhihao1@huawei.com>
TO: miquel.raynal(a)bootlin.com
TO: richard(a)nod.at
TO: vigneshr(a)ti.com
TO: boris.brezillon(a)bootlin.com
CC: linux-mtd(a)lists.infradead.org
CC: linux-kernel(a)vger.kernel.org
CC: chengzhihao1(a)huawei.com
CC: yukuai3(a)huawei.com

Hi Zhihao,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mtd/mtd/next]
[also build test WARNING on mtd/mtd/fixes linux/master linus/master v5.13-rc6 next-20210615]
[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/Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago
config: s390-randconfig-s032-20210615 (attached as .config)
compiler: s390-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-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
        git checkout 64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        # 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__' W=1 ARCH=s390 

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


sparse warnings: (new ones prefixed by >>)
   drivers/mtd/ftl.c:107:9: sparse: sparse: preprocessor token SECTOR_SIZE redefined
   drivers/mtd/ftl.c: note: in included file:
>> include/linux/blkdev.h:967:9: sparse: this was the original definition
   drivers/mtd/ftl.c:180:37: sparse: sparse: cast to restricted __le16
   drivers/mtd/ftl.c:203:23: sparse: sparse: cast to restricted __le16
   drivers/mtd/ftl.c:219:21: sparse: sparse: cast to restricted __le16
   drivers/mtd/ftl.c:220:24: sparse: sparse: cast to restricted __le16
   drivers/mtd/ftl.c:231:24: sparse: sparse: cast to restricted __le16
   drivers/mtd/ftl.c:232:28: sparse: sparse: cast to restricted __le16
   drivers/mtd/ftl.c:233:27: sparse: sparse: cast to restricted __le16
   drivers/mtd/ftl.c:234:27: sparse: sparse: cast to restricted __le16
   drivers/mtd/ftl.c:235:17: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:243:28: sparse: sparse: cast to restricted __le16
   drivers/mtd/ftl.c:245:53: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:250:21: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:259:27: sparse: sparse: cast to restricted __le16
   drivers/mtd/ftl.c:266:14: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:285:44: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:295:17: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:298:25: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:299:23: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:300:39: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:302:22: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:302:22: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:387:23: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [assigned] [usertype] LogicalEUN @@     got restricted __le16 [usertype] @@
   drivers/mtd/ftl.c:387:23: sparse:     expected unsigned short [assigned] [usertype] LogicalEUN
   drivers/mtd/ftl.c:387:23: sparse:     got restricted __le16 [usertype]
   drivers/mtd/ftl.c:388:23: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [assigned] [usertype] EraseCount @@     got restricted __le32 [usertype] @@
   drivers/mtd/ftl.c:388:23: sparse:     expected unsigned int [assigned] [usertype] EraseCount
   drivers/mtd/ftl.c:388:23: sparse:     got restricted __le32 [usertype]
   drivers/mtd/ftl.c:398:12: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:401:29: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:402:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] ctl @@     got restricted __le32 [usertype] @@
   drivers/mtd/ftl.c:402:9: sparse:     expected unsigned int [usertype] ctl
   drivers/mtd/ftl.c:402:9: sparse:     got restricted __le32 [usertype]
   drivers/mtd/ftl.c:440:28: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned short [usertype] srcunitswap @@     got restricted __le16 [usertype] @@
   drivers/mtd/ftl.c:440:28: sparse:     expected unsigned short [usertype] srcunitswap
   drivers/mtd/ftl.c:440:28: sparse:     got restricted __le16 [usertype]
   drivers/mtd/ftl.c:451:32: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:469:10: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] unit @@     got restricted __le16 [usertype] @@
   drivers/mtd/ftl.c:469:10: sparse:     expected unsigned short [usertype] unit
   drivers/mtd/ftl.c:469:10: sparse:     got restricted __le16 [usertype]
   drivers/mtd/ftl.c:485:17: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:509:32: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/mtd/ftl.c:509:32: sparse:     expected unsigned int [usertype]
   drivers/mtd/ftl.c:509:32: sparse:     got restricted __le32 [usertype]
   drivers/mtd/ftl.c:519:36: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:713:52: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:727:13: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:766:43: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:812:19: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:835:18: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] le_virt_addr @@     got restricted __le32 [usertype] @@
   drivers/mtd/ftl.c:835:18: sparse:     expected unsigned int [usertype] le_virt_addr
   drivers/mtd/ftl.c:835:18: sparse:     got restricted __le32 [usertype]
   drivers/mtd/ftl.c:888:26: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:949:16: sparse: sparse: cast to restricted __le32
   drivers/mtd/ftl.c:1029:39: sparse: sparse: cast to restricted __le32

vim +967 include/linux/blkdev.h

^1da177e4c3f41 Linus Torvalds  2005-04-16  956  
233bde21aa4351 Bart Van Assche 2018-03-14  957  /*
233bde21aa4351 Bart Van Assche 2018-03-14  958   * The basic unit of block I/O is a sector. It is used in a number of contexts
233bde21aa4351 Bart Van Assche 2018-03-14  959   * in Linux (blk, bio, genhd). The size of one sector is 512 = 2**9
233bde21aa4351 Bart Van Assche 2018-03-14  960   * bytes. Variables of type sector_t represent an offset or size that is a
233bde21aa4351 Bart Van Assche 2018-03-14  961   * multiple of 512 bytes. Hence these two constants.
233bde21aa4351 Bart Van Assche 2018-03-14  962   */
233bde21aa4351 Bart Van Assche 2018-03-14  963  #ifndef SECTOR_SHIFT
233bde21aa4351 Bart Van Assche 2018-03-14  964  #define SECTOR_SHIFT 9
233bde21aa4351 Bart Van Assche 2018-03-14  965  #endif
233bde21aa4351 Bart Van Assche 2018-03-14  966  #ifndef SECTOR_SIZE
233bde21aa4351 Bart Van Assche 2018-03-14 @967  #define SECTOR_SIZE (1 << SECTOR_SHIFT)
233bde21aa4351 Bart Van Assche 2018-03-14  968  #endif
233bde21aa4351 Bart Van Assche 2018-03-14  969  

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

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

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

* Re: [PATCH] mtd: ftl: Initialize rq.limits.discard_granularity
  2021-06-13 11:29 ` Zhihao Cheng
  (?)
@ 2021-06-16 19:39   ` kernel test robot
  -1 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2021-06-16 19:39 UTC (permalink / raw)
  To: Zhihao Cheng, miquel.raynal, richard, vigneshr, boris.brezillon
  Cc: kbuild-all, clang-built-linux, linux-mtd, linux-kernel,
	chengzhihao1, yukuai3

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

Hi Zhihao,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mtd/mtd/next]
[also build test WARNING on mtd/mtd/fixes linux/master linus/master v5.13-rc6 next-20210616]
[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/Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next
config: riscv-randconfig-r024-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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/64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
        git checkout 64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        # 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@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/mtd/ftl.c:107:9: warning: 'SECTOR_SIZE' macro redefined [-Wmacro-redefined]
   #define SECTOR_SIZE     512
           ^
   include/linux/blkdev.h:967:9: note: previous definition is here
   #define SECTOR_SIZE (1 << SECTOR_SHIFT)
           ^
   1 warning generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for LOCKDEP
   Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
   Selected by
   - PROVE_LOCKING && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
   - DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT


vim +/SECTOR_SIZE +107 drivers/mtd/ftl.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  105  
^1da177e4c3f41 Linus Torvalds 2005-04-16  106  /* Sector size -- shouldn't need to change */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @107  #define SECTOR_SIZE	512
^1da177e4c3f41 Linus Torvalds 2005-04-16  108  
^1da177e4c3f41 Linus Torvalds 2005-04-16  109  

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

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

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

* Re: [PATCH] mtd: ftl: Initialize rq.limits.discard_granularity
@ 2021-06-16 19:39   ` kernel test robot
  0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2021-06-16 19:39 UTC (permalink / raw)
  To: Zhihao Cheng, miquel.raynal, richard, vigneshr, boris.brezillon
  Cc: kbuild-all, clang-built-linux, linux-mtd, linux-kernel,
	chengzhihao1, yukuai3

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

Hi Zhihao,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mtd/mtd/next]
[also build test WARNING on mtd/mtd/fixes linux/master linus/master v5.13-rc6 next-20210616]
[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/Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next
config: riscv-randconfig-r024-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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/64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
        git checkout 64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        # 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@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/mtd/ftl.c:107:9: warning: 'SECTOR_SIZE' macro redefined [-Wmacro-redefined]
   #define SECTOR_SIZE     512
           ^
   include/linux/blkdev.h:967:9: note: previous definition is here
   #define SECTOR_SIZE (1 << SECTOR_SHIFT)
           ^
   1 warning generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for LOCKDEP
   Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
   Selected by
   - PROVE_LOCKING && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
   - DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT


vim +/SECTOR_SIZE +107 drivers/mtd/ftl.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  105  
^1da177e4c3f41 Linus Torvalds 2005-04-16  106  /* Sector size -- shouldn't need to change */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @107  #define SECTOR_SIZE	512
^1da177e4c3f41 Linus Torvalds 2005-04-16  108  
^1da177e4c3f41 Linus Torvalds 2005-04-16  109  

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

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

[-- Attachment #3: Type: text/plain, Size: 144 bytes --]

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: ftl: Initialize rq.limits.discard_granularity
@ 2021-06-16 19:39   ` kernel test robot
  0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2021-06-16 19:39 UTC (permalink / raw)
  To: kbuild-all

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

Hi Zhihao,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mtd/mtd/next]
[also build test WARNING on mtd/mtd/fixes linux/master linus/master v5.13-rc6 next-20210616]
[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/Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next
config: riscv-randconfig-r024-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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/64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
        git checkout 64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        # 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@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/mtd/ftl.c:107:9: warning: 'SECTOR_SIZE' macro redefined [-Wmacro-redefined]
   #define SECTOR_SIZE     512
           ^
   include/linux/blkdev.h:967:9: note: previous definition is here
   #define SECTOR_SIZE (1 << SECTOR_SHIFT)
           ^
   1 warning generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for LOCKDEP
   Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
   Selected by
   - PROVE_LOCKING && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
   - DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT


vim +/SECTOR_SIZE +107 drivers/mtd/ftl.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  105  
^1da177e4c3f41 Linus Torvalds 2005-04-16  106  /* Sector size -- shouldn't need to change */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @107  #define SECTOR_SIZE	512
^1da177e4c3f41 Linus Torvalds 2005-04-16  108  
^1da177e4c3f41 Linus Torvalds 2005-04-16  109  

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

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

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

* Re: [PATCH] mtd: ftl: Initialize rq.limits.discard_granularity
  2021-06-13 11:29 ` Zhihao Cheng
  (?)
@ 2021-06-16 13:22   ` kernel test robot
  -1 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2021-06-16 13:22 UTC (permalink / raw)
  To: Zhihao Cheng, miquel.raynal, richard, vigneshr, boris.brezillon
  Cc: kbuild-all, linux-mtd, linux-kernel, chengzhihao1, yukuai3

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

Hi Zhihao,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mtd/mtd/next]
[also build test WARNING on mtd/mtd/fixes linux/master linus/master v5.13-rc6 next-20210615]
[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/Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next
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/64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
        git checkout 64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        # 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@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/mtd/ftl.c:107: warning: "SECTOR_SIZE" redefined
     107 | #define SECTOR_SIZE 512
         | 
   In file included from drivers/mtd/ftl.c:73:
   include/linux/blkdev.h:967: note: this is the location of the previous definition
     967 | #define SECTOR_SIZE (1 << SECTOR_SHIFT)
         | 


vim +/SECTOR_SIZE +107 drivers/mtd/ftl.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  105  
^1da177e4c3f41 Linus Torvalds 2005-04-16  106  /* Sector size -- shouldn't need to change */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @107  #define SECTOR_SIZE	512
^1da177e4c3f41 Linus Torvalds 2005-04-16  108  
^1da177e4c3f41 Linus Torvalds 2005-04-16  109  

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

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

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

* Re: [PATCH] mtd: ftl: Initialize rq.limits.discard_granularity
@ 2021-06-16 13:22   ` kernel test robot
  0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2021-06-16 13:22 UTC (permalink / raw)
  To: Zhihao Cheng, miquel.raynal, richard, vigneshr, boris.brezillon
  Cc: kbuild-all, linux-mtd, linux-kernel, chengzhihao1, yukuai3

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

Hi Zhihao,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mtd/mtd/next]
[also build test WARNING on mtd/mtd/fixes linux/master linus/master v5.13-rc6 next-20210615]
[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/Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next
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/64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
        git checkout 64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        # 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@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/mtd/ftl.c:107: warning: "SECTOR_SIZE" redefined
     107 | #define SECTOR_SIZE 512
         | 
   In file included from drivers/mtd/ftl.c:73:
   include/linux/blkdev.h:967: note: this is the location of the previous definition
     967 | #define SECTOR_SIZE (1 << SECTOR_SHIFT)
         | 


vim +/SECTOR_SIZE +107 drivers/mtd/ftl.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  105  
^1da177e4c3f41 Linus Torvalds 2005-04-16  106  /* Sector size -- shouldn't need to change */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @107  #define SECTOR_SIZE	512
^1da177e4c3f41 Linus Torvalds 2005-04-16  108  
^1da177e4c3f41 Linus Torvalds 2005-04-16  109  

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

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

[-- Attachment #3: Type: text/plain, Size: 144 bytes --]

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: ftl: Initialize rq.limits.discard_granularity
@ 2021-06-16 13:22   ` kernel test robot
  0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2021-06-16 13:22 UTC (permalink / raw)
  To: kbuild-all

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

Hi Zhihao,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mtd/mtd/next]
[also build test WARNING on mtd/mtd/fixes linux/master linus/master v5.13-rc6 next-20210615]
[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/Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next
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/64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhihao-Cheng/mtd-ftl-Initialize-rq-limits-discard_granularity/20210616-134538
        git checkout 64ffb6f0cfd38ca3d47e7bef4674c52a14fe024d
        # 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@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/mtd/ftl.c:107: warning: "SECTOR_SIZE" redefined
     107 | #define SECTOR_SIZE 512
         | 
   In file included from drivers/mtd/ftl.c:73:
   include/linux/blkdev.h:967: note: this is the location of the previous definition
     967 | #define SECTOR_SIZE (1 << SECTOR_SHIFT)
         | 


vim +/SECTOR_SIZE +107 drivers/mtd/ftl.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  105  
^1da177e4c3f41 Linus Torvalds 2005-04-16  106  /* Sector size -- shouldn't need to change */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @107  #define SECTOR_SIZE	512
^1da177e4c3f41 Linus Torvalds 2005-04-16  108  
^1da177e4c3f41 Linus Torvalds 2005-04-16  109  

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

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

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

* [PATCH] mtd: ftl: Initialize rq.limits.discard_granularity
@ 2021-06-13 11:29 ` Zhihao Cheng
  0 siblings, 0 replies; 9+ messages in thread
From: Zhihao Cheng @ 2021-06-13 11:29 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr, boris.brezillon
  Cc: linux-mtd, linux-kernel, chengzhihao1, yukuai3

Since commit b35fd7422c2f8("block: check queue's limits.discard_granularity
in __blkdev_issue_discard()") checks rq.limits.discard_granularity in
__blkdev_issue_discard(), we may get following warnings while formating ftl:

  WARNING: CPU: 2 PID: 7313 at block/blk-lib.c:51
  __blkdev_issue_discard+0x2a7/0x390

Reproducer:
  1. ftl_format /dev/mtd0
  2. modprobe ftl
  3. mkfs.vfat /dev/ftla
  4. mount -odiscard /dev/ftla temp
  5. dd if=/dev/zero of=temp/tst bs=1M count=10 oflag=direct
  6. dd if=/dev/zero of=temp/tst bs=1M count=10 oflag=direct

Fix it by initializing rq.limits.discard_granularity in ftl_add_mtd().

Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
---
 drivers/mtd/ftl.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
index 9b33c082179d..fb31e33b8a77 100644
--- a/drivers/mtd/ftl.c
+++ b/drivers/mtd/ftl.c
@@ -70,6 +70,7 @@
 #include <linux/hdreg.h>
 #include <linux/vmalloc.h>
 #include <linux/blkpg.h>
+#include <linux/blkdev.h>
 #include <linux/uaccess.h>
 
 #include <linux/mtd/ftl.h>
@@ -1029,8 +1030,11 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 
 		partition->mbd.tr = tr;
 		partition->mbd.devnum = -1;
-		if (!add_mtd_blktrans_dev((void *)partition))
+		if (!add_mtd_blktrans_dev((void *)partition)) {
+			partition->mbd.rq->limits.discard_granularity =
+								tr->blksize;
 			return;
+		}
 	}
 
 	kfree(partition);
-- 
2.31.1


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

* [PATCH] mtd: ftl: Initialize rq.limits.discard_granularity
@ 2021-06-13 11:29 ` Zhihao Cheng
  0 siblings, 0 replies; 9+ messages in thread
From: Zhihao Cheng @ 2021-06-13 11:29 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr, boris.brezillon
  Cc: linux-mtd, linux-kernel, chengzhihao1, yukuai3

Since commit b35fd7422c2f8("block: check queue's limits.discard_granularity
in __blkdev_issue_discard()") checks rq.limits.discard_granularity in
__blkdev_issue_discard(), we may get following warnings while formating ftl:

  WARNING: CPU: 2 PID: 7313 at block/blk-lib.c:51
  __blkdev_issue_discard+0x2a7/0x390

Reproducer:
  1. ftl_format /dev/mtd0
  2. modprobe ftl
  3. mkfs.vfat /dev/ftla
  4. mount -odiscard /dev/ftla temp
  5. dd if=/dev/zero of=temp/tst bs=1M count=10 oflag=direct
  6. dd if=/dev/zero of=temp/tst bs=1M count=10 oflag=direct

Fix it by initializing rq.limits.discard_granularity in ftl_add_mtd().

Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
---
 drivers/mtd/ftl.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
index 9b33c082179d..fb31e33b8a77 100644
--- a/drivers/mtd/ftl.c
+++ b/drivers/mtd/ftl.c
@@ -70,6 +70,7 @@
 #include <linux/hdreg.h>
 #include <linux/vmalloc.h>
 #include <linux/blkpg.h>
+#include <linux/blkdev.h>
 #include <linux/uaccess.h>
 
 #include <linux/mtd/ftl.h>
@@ -1029,8 +1030,11 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 
 		partition->mbd.tr = tr;
 		partition->mbd.devnum = -1;
-		if (!add_mtd_blktrans_dev((void *)partition))
+		if (!add_mtd_blktrans_dev((void *)partition)) {
+			partition->mbd.rq->limits.discard_granularity =
+								tr->blksize;
 			return;
+		}
 	}
 
 	kfree(partition);
-- 
2.31.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2021-06-16 19:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 11:18 [PATCH] mtd: ftl: Initialize rq.limits.discard_granularity kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-06-13 11:29 Zhihao Cheng
2021-06-13 11:29 ` Zhihao Cheng
2021-06-16 13:22 ` kernel test robot
2021-06-16 13:22   ` kernel test robot
2021-06-16 13:22   ` kernel test robot
2021-06-16 19:39 ` kernel test robot
2021-06-16 19:39   ` kernel test robot
2021-06-16 19:39   ` 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.