Re: [PATCH v2 13/21] drm/rockchip: Convert to drm_gem_object_funcs
by kernel test robot
Hi Thomas,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20200915]
[cannot apply to drm-intel/for-linux-next arm/drm-armada-devel linus/master arm/drm-armada-fixes anholt/for-next v5.9-rc5 v5.9-rc4 v5.9-rc3 v5.9-rc5]
[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/Thomas-Zimmermann/Convert-all-re...
base: 6b02addb1d1748d21dd1261e46029b264be4e5a0
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/rockchip/rockchip_drm_gem.c:304:13: error: 'drm_gem_cma_vm_ops' undeclared here (not in a function); did you mean 'drm_gem_mmap_obj'?
304 | .vm_ops = &drm_gem_cma_vm_ops,
| ^~~~~~~~~~~~~~~~~~
| drm_gem_mmap_obj
# https://github.com/0day-ci/linux/commit/9516e471a1e5d73a108c0568243987a03...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Zimmermann/Convert-all-remaining-drivers-to-GEM-object-functions/20200915-230157
git checkout 9516e471a1e5d73a108c0568243987a032c2e9e3
vim +304 drivers/gpu/drm/rockchip/rockchip_drm_gem.c
298
299 static const struct drm_gem_object_funcs rockchip_gem_object_funcs = {
300 .free = rockchip_gem_free_object,
301 .get_sg_table = rockchip_gem_prime_get_sg_table,
302 .vmap = rockchip_gem_prime_vmap,
303 .vunmap = rockchip_gem_prime_vunmap,
> 304 .vm_ops = &drm_gem_cma_vm_ops,
305 };
306
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH 1/2 v7] rseq/membarrier: add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ
by kernel test robot
Hi Peter,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kselftest/next]
[also build test ERROR on tip/sched/core linux/master linus/master v5.9-rc5 next-20200915]
[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/Peter-Oskolkov/rseq-membarrier-a...
base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: m68k-randconfig-r015-20200916 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/mmc/host/wbsd.c:20:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/mmc/host/wbsd.c: In function 'wbsd_request_end':
drivers/mmc/host/wbsd.c:212:14: error: implicit declaration of function 'claim_dma_lock' [-Werror=implicit-function-declaration]
212 | dmaflags = claim_dma_lock();
| ^~~~~~~~~~~~~~
>> drivers/mmc/host/wbsd.c:213:3: error: implicit declaration of function 'disable_dma'; did you mean 'disable_irq'? [-Werror=implicit-function-declaration]
213 | disable_dma(host->dma);
| ^~~~~~~~~~~
| disable_irq
>> drivers/mmc/host/wbsd.c:214:3: error: implicit declaration of function 'clear_dma_ff' [-Werror=implicit-function-declaration]
214 | clear_dma_ff(host->dma);
| ^~~~~~~~~~~~
drivers/mmc/host/wbsd.c:215:3: error: implicit declaration of function 'release_dma_lock'; did you mean 'release_task'? [-Werror=implicit-function-declaration]
215 | release_dma_lock(dmaflags);
| ^~~~~~~~~~~~~~~~
| release_task
drivers/mmc/host/wbsd.c: In function 'wbsd_prepare_data':
>> drivers/mmc/host/wbsd.c:618:4: error: implicit declaration of function 'set_dma_mode'; did you mean 'set_dev_node'? [-Werror=implicit-function-declaration]
618 | set_dma_mode(host->dma, DMA_MODE_READ & ~0x40);
| ^~~~~~~~~~~~
| set_dev_node
>> drivers/mmc/host/wbsd.c:618:28: error: 'DMA_MODE_READ' undeclared (first use in this function); did you mean 'FMODE_READ'?
618 | set_dma_mode(host->dma, DMA_MODE_READ & ~0x40);
| ^~~~~~~~~~~~~
| FMODE_READ
drivers/mmc/host/wbsd.c:618:28: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/mmc/host/wbsd.c:620:28: error: 'DMA_MODE_WRITE' undeclared (first use in this function); did you mean 'FMODE_WRITE'?
620 | set_dma_mode(host->dma, DMA_MODE_WRITE & ~0x40);
| ^~~~~~~~~~~~~~
| FMODE_WRITE
>> drivers/mmc/host/wbsd.c:621:3: error: implicit declaration of function 'set_dma_addr'; did you mean 'print_vma_addr'? [-Werror=implicit-function-declaration]
621 | set_dma_addr(host->dma, host->dma_addr);
| ^~~~~~~~~~~~
| print_vma_addr
>> drivers/mmc/host/wbsd.c:622:3: error: implicit declaration of function 'set_dma_count'; did you mean 'head_mapcount'? [-Werror=implicit-function-declaration]
622 | set_dma_count(host->dma, size);
| ^~~~~~~~~~~~~
| head_mapcount
>> drivers/mmc/host/wbsd.c:624:3: error: implicit declaration of function 'enable_dma'; did you mean 'enable_nmi'? [-Werror=implicit-function-declaration]
624 | enable_dma(host->dma);
| ^~~~~~~~~~
| enable_nmi
drivers/mmc/host/wbsd.c: In function 'wbsd_finish_data':
>> drivers/mmc/host/wbsd.c:702:11: error: implicit declaration of function 'get_dma_residue'; did you mean 'set_dma_reserve'? [-Werror=implicit-function-declaration]
702 | count = get_dma_residue(host->dma);
| ^~~~~~~~~~~~~~~
| set_dma_reserve
cc1: some warnings being treated as errors
--
In file included from include/asm-generic/bug.h:5,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from arch/m68k/include/asm/current.h:16,
from include/linux/sched.h:12,
from kernel/sched/sched.h:5,
from kernel/sched/membarrier.c:7:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from kernel/sched/sched.h:65,
from kernel/sched/membarrier.c:7:
kernel/sched/membarrier.c: At top level:
>> include/linux/syscalls.h:238:18: error: conflicting types for 'sys_membarrier'
238 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
| ^~~
include/linux/syscalls.h:224:2: note: in expansion of macro '__SYSCALL_DEFINEx'
224 | __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
include/linux/syscalls.h:215:36: note: in expansion of macro 'SYSCALL_DEFINEx'
215 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
| ^~~~~~~~~~~~~~~
kernel/sched/membarrier.c:401:1: note: in expansion of macro 'SYSCALL_DEFINE3'
401 | SYSCALL_DEFINE3(membarrier, int, cmd, unsigned int, flags, int, cpu_id)
| ^~~~~~~~~~~~~~~
In file included from kernel/sched/sched.h:65,
from kernel/sched/membarrier.c:7:
include/linux/syscalls.h:977:17: note: previous declaration of 'sys_membarrier' was here
977 | asmlinkage long sys_membarrier(int cmd, int flags, int cpu_id);
| ^~~~~~~~~~~~~~
# https://github.com/0day-ci/linux/commit/eb21b18c9bbbbb6f280319c4ead2be5c5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Peter-Oskolkov/rseq-membarrier-add-MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ/20200916-025708
git checkout eb21b18c9bbbbb6f280319c4ead2be5c52dade77
vim +/sys_membarrier +238 include/linux/syscalls.h
1bd21c6c21e8489 Dominik Brodowski 2018-04-05 227
e145242ea0df6b7 Dominik Brodowski 2018-04-09 228 /*
e145242ea0df6b7 Dominik Brodowski 2018-04-09 229 * The asmlinkage stub is aliased to a function named __se_sys_*() which
e145242ea0df6b7 Dominik Brodowski 2018-04-09 230 * sign-extends 32-bit ints to longs whenever needed. The actual work is
e145242ea0df6b7 Dominik Brodowski 2018-04-09 231 * done within __do_sys_*().
e145242ea0df6b7 Dominik Brodowski 2018-04-09 232 */
1bd21c6c21e8489 Dominik Brodowski 2018-04-05 233 #ifndef __SYSCALL_DEFINEx
bed1ffca022cc87 Frederic Weisbecker 2009-03-13 234 #define __SYSCALL_DEFINEx(x, name, ...) \
bee20031772af3d Arnd Bergmann 2018-06-19 235 __diag_push(); \
bee20031772af3d Arnd Bergmann 2018-06-19 236 __diag_ignore(GCC, 8, "-Wattribute-alias", \
bee20031772af3d Arnd Bergmann 2018-06-19 237 "Type aliasing is used to sanitize syscall arguments");\
83460ec8dcac141 Andi Kleen 2013-11-12 @238 asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
e145242ea0df6b7 Dominik Brodowski 2018-04-09 239 __attribute__((alias(__stringify(__se_sys##name)))); \
c9a211951c7c79c Howard McLauchlan 2018-03-21 240 ALLOW_ERROR_INJECTION(sys##name, ERRNO); \
e145242ea0df6b7 Dominik Brodowski 2018-04-09 241 static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
e145242ea0df6b7 Dominik Brodowski 2018-04-09 242 asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
e145242ea0df6b7 Dominik Brodowski 2018-04-09 243 asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
1a94bc34768e463 Heiko Carstens 2009-01-14 244 { \
e145242ea0df6b7 Dominik Brodowski 2018-04-09 245 long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__));\
07fe6e00f6cca6f Al Viro 2013-01-21 246 __MAP(x,__SC_TEST,__VA_ARGS__); \
2cf0966683430b6 Al Viro 2013-01-21 247 __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
2cf0966683430b6 Al Viro 2013-01-21 248 return ret; \
1a94bc34768e463 Heiko Carstens 2009-01-14 249 } \
bee20031772af3d Arnd Bergmann 2018-06-19 250 __diag_pop(); \
e145242ea0df6b7 Dominik Brodowski 2018-04-09 251 static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
1bd21c6c21e8489 Dominik Brodowski 2018-04-05 252 #endif /* __SYSCALL_DEFINEx */
1a94bc34768e463 Heiko Carstens 2009-01-14 253
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[arm-platforms:kvm/protected-memory 3/16] arch/x86/mm/mem_encrypt_common.c:16:6: warning: no previous prototype for 'force_dma_unencrypted'
by kernel test robot
Hi Kirill,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm/protected-memory
head: d9455e6eabef4b9be5f33c418a8046e0389edade
commit: dbd4c551b3d34cb3e06e575eb205e2056f4a6e76 [3/16] x86/kvm: Make DMA pages shared
config: x86_64-randconfig-s021-20200916 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
git checkout dbd4c551b3d34cb3e06e575eb205e2056f4a6e76
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/x86/mm/mem_encrypt_common.c:16:6: warning: no previous prototype for 'force_dma_unencrypted' [-Wmissing-prototypes]
16 | bool force_dma_unencrypted(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/com...
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms kvm/protected-memory
git checkout dbd4c551b3d34cb3e06e575eb205e2056f4a6e76
vim +/force_dma_unencrypted +16 arch/x86/mm/mem_encrypt_common.c
0fdb85af352f8f Kirill A. Shutemov 2020-05-22 14
0fdb85af352f8f Kirill A. Shutemov 2020-05-22 15 /* Override for DMA direct allocation check - ARCH_HAS_FORCE_DMA_UNENCRYPTED */
0fdb85af352f8f Kirill A. Shutemov 2020-05-22 @16 bool force_dma_unencrypted(struct device *dev)
:::::: The code at line 16 was first introduced by commit
:::::: 0fdb85af352f8f003ce368eaeee57406f748801e x86/mm: Move force_dma_unencrypted() to common code
:::::: TO: Kirill A. Shutemov <kirill(a)shutemov.name>
:::::: CC: Marc Zyngier <maz(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[kdave-btrfs-devel:ext/aota/zoned-7 133/162] arch/arm/include/asm/bitops.h:209: warning: "find_first_zero_bit" redefined
by kernel test robot
tree: https://github.com/kdave/btrfs-devel.git ext/aota/zoned-7
head: 17046312f8c0a16a96b4b3a145f4b30be84e6ede
commit: bc960447dd5838f71d4ef88b107e8329a00c4f1d [133/162] btrfs: implement zoned chunk allocator
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-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
git checkout bc960447dd5838f71d4ef88b107e8329a00c4f1d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from fs/btrfs/zoned.c:10:
>> arch/arm/include/asm/bitops.h:209: warning: "find_first_zero_bit" redefined
209 | #define find_first_zero_bit(p,sz) _find_first_zero_bit_be(p,sz)
|
In file included from fs/btrfs/zoned.c:9:
include/asm-generic/bitops/find.h:78: note: this is the location of the previous definition
78 | #define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
|
In file included from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from fs/btrfs/zoned.c:10:
>> arch/arm/include/asm/bitops.h:211: warning: "find_first_bit" redefined
211 | #define find_first_bit(p,sz) _find_first_bit_be(p,sz)
|
In file included from fs/btrfs/zoned.c:9:
include/asm-generic/bitops/find.h:75: note: this is the location of the previous definition
75 | #define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
|
# https://github.com/kdave/btrfs-devel/commit/bc960447dd5838f71d4ef88b107e8...
git remote add kdave-btrfs-devel https://github.com/kdave/btrfs-devel.git
git fetch --no-tags kdave-btrfs-devel ext/aota/zoned-7
git checkout bc960447dd5838f71d4ef88b107e8329a00c4f1d
vim +/find_first_zero_bit +209 arch/arm/include/asm/bitops.h
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 204
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 205 #else
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 206 /*
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 207 * These are the big endian, atomic definitions.
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 208 */
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 @209 #define find_first_zero_bit(p,sz) _find_first_zero_bit_be(p,sz)
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 210 #define find_next_zero_bit(p,sz,off) _find_next_zero_bit_be(p,sz,off)
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 @211 #define find_first_bit(p,sz) _find_first_bit_be(p,sz)
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 212 #define find_next_bit(p,sz,off) _find_next_bit_be(p,sz,off)
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 213
:::::: The code at line 209 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[hverkuil-media:tegrav5 4/16] drivers/media/i2c/imx274.c:1864:10: warning: variable 'ret' is uninitialized when used here
by kernel test robot
tree: git://linuxtv.org/hverkuil/media_tree.git tegrav5
head: 34c5bfcb69d84e693fc4cac946f5104292a8b880
commit: 1db17015125eb03cd05ce850e47e21f033b950ba [4/16] media: i2c: Add support for IMX274 supplies and external clock
config: x86_64-randconfig-a005-20200913 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 3ed89b51da38f081fedb57727076262abb81d149)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 1db17015125eb03cd05ce850e47e21f033b950ba
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/i2c/imx274.c:1864:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
return ret;
^~~
drivers/media/i2c/imx274.c:1852:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
git remote add hverkuil-media git://linuxtv.org/hverkuil/media_tree.git
git fetch --no-tags hverkuil-media tegrav5
git checkout 1db17015125eb03cd05ce850e47e21f033b950ba
vim +/ret +1864 drivers/media/i2c/imx274.c
1847
1848 static int imx274_probe(struct i2c_client *client)
1849 {
1850 struct v4l2_subdev *sd;
1851 struct stimx274 *imx274;
1852 int ret;
1853
1854 /* initialize imx274 */
1855 imx274 = devm_kzalloc(&client->dev, sizeof(*imx274), GFP_KERNEL);
1856 if (!imx274)
1857 return -ENOMEM;
1858
1859 mutex_init(&imx274->lock);
1860
1861 imx274->xclk = devm_clk_get(&client->dev, "xclk");
1862 if (IS_ERR(imx274->xclk)) {
1863 dev_err(&client->dev, "Failed to get xclk\n");
> 1864 return ret;
1865 }
1866
1867 ret = clk_set_rate(imx274->xclk, IMX274_DEFAULT_CLK_FREQ);
1868 if (ret < 0) {
1869 dev_err(&client->dev, "Failed to set xclk rate\n");
1870 return ret;
1871 }
1872
1873 ret = imx274_get_regulators(&client->dev, imx274);
1874 if (ret) {
1875 dev_err(&client->dev, "Failed to get power regulators, err: %d\n", ret);
1876 return ret;
1877 }
1878
1879 /* initialize format */
1880 imx274->mode = &imx274_modes[IMX274_DEFAULT_BINNING];
1881 imx274->crop.width = IMX274_MAX_WIDTH;
1882 imx274->crop.height = IMX274_MAX_HEIGHT;
1883 imx274->format.width = imx274->crop.width / imx274->mode->bin_ratio;
1884 imx274->format.height = imx274->crop.height / imx274->mode->bin_ratio;
1885 imx274->format.field = V4L2_FIELD_NONE;
1886 imx274->format.code = MEDIA_BUS_FMT_SRGGB10_1X10;
1887 imx274->format.colorspace = V4L2_COLORSPACE_SRGB;
1888 imx274->frame_interval.numerator = 1;
1889 imx274->frame_interval.denominator = IMX274_DEF_FRAME_RATE;
1890
1891 /* initialize regmap */
1892 imx274->regmap = devm_regmap_init_i2c(client, &imx274_regmap_config);
1893 if (IS_ERR(imx274->regmap)) {
1894 dev_err(&client->dev,
1895 "regmap init failed: %ld\n", PTR_ERR(imx274->regmap));
1896 ret = -ENODEV;
1897 goto err_regmap;
1898 }
1899
1900 /* initialize subdevice */
1901 imx274->client = client;
1902 sd = &imx274->sd;
1903 v4l2_i2c_subdev_init(sd, client, &imx274_subdev_ops);
1904 sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
1905
1906 /* initialize subdev media pad */
1907 imx274->pad.flags = MEDIA_PAD_FL_SOURCE;
1908 sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
1909 ret = media_entity_pads_init(&sd->entity, 1, &imx274->pad);
1910 if (ret < 0) {
1911 dev_err(&client->dev,
1912 "%s : media entity init Failed %d\n", __func__, ret);
1913 goto err_regmap;
1914 }
1915
1916 /* initialize sensor reset gpio */
1917 imx274->reset_gpio = devm_gpiod_get_optional(&client->dev, "reset",
1918 GPIOD_OUT_HIGH);
1919 if (IS_ERR(imx274->reset_gpio)) {
1920 if (PTR_ERR(imx274->reset_gpio) != -EPROBE_DEFER)
1921 dev_err(&client->dev, "Reset GPIO not setup in DT");
1922 ret = PTR_ERR(imx274->reset_gpio);
1923 goto err_me;
1924 }
1925
1926 /* initialize controls */
1927 ret = v4l2_ctrl_handler_init(&imx274->ctrls.handler, 4);
1928 if (ret < 0) {
1929 dev_err(&client->dev,
1930 "%s : ctrl handler init Failed\n", __func__);
1931 goto err_me;
1932 }
1933
1934 imx274->ctrls.handler.lock = &imx274->lock;
1935
1936 /* add new controls */
1937 imx274->ctrls.test_pattern = v4l2_ctrl_new_std_menu_items(
1938 &imx274->ctrls.handler, &imx274_ctrl_ops,
1939 V4L2_CID_TEST_PATTERN,
1940 ARRAY_SIZE(tp_qmenu) - 1, 0, 0, tp_qmenu);
1941
1942 imx274->ctrls.gain = v4l2_ctrl_new_std(
1943 &imx274->ctrls.handler,
1944 &imx274_ctrl_ops,
1945 V4L2_CID_GAIN, IMX274_MIN_GAIN,
1946 IMX274_MAX_DIGITAL_GAIN * IMX274_MAX_ANALOG_GAIN, 1,
1947 IMX274_DEF_GAIN);
1948
1949 imx274->ctrls.exposure = v4l2_ctrl_new_std(
1950 &imx274->ctrls.handler,
1951 &imx274_ctrl_ops,
1952 V4L2_CID_EXPOSURE, IMX274_MIN_EXPOSURE_TIME,
1953 1000000 / IMX274_DEF_FRAME_RATE, 1,
1954 IMX274_MIN_EXPOSURE_TIME);
1955
1956 imx274->ctrls.vflip = v4l2_ctrl_new_std(
1957 &imx274->ctrls.handler,
1958 &imx274_ctrl_ops,
1959 V4L2_CID_VFLIP, 0, 1, 1, 0);
1960
1961 imx274->sd.ctrl_handler = &imx274->ctrls.handler;
1962 if (imx274->ctrls.handler.error) {
1963 ret = imx274->ctrls.handler.error;
1964 goto err_ctrls;
1965 }
1966
1967 /* power on the sensor */
1968 ret = imx274_power_on(&client->dev);
1969 if (ret < 0) {
1970 dev_err(&client->dev,
1971 "%s : imx274 power on failed\n", __func__);
1972 goto err_ctrls;
1973 }
1974
1975 /* setup default controls */
1976 ret = v4l2_ctrl_handler_setup(&imx274->ctrls.handler);
1977 if (ret) {
1978 dev_err(&client->dev,
1979 "Error %d setup default controls\n", ret);
1980 goto err_power_off;
1981 }
1982
1983 /* load default control values */
1984 ret = imx274_load_default(imx274);
1985 if (ret) {
1986 dev_err(&client->dev,
1987 "%s : imx274_load_default failed %d\n",
1988 __func__, ret);
1989 goto err_power_off;
1990 }
1991
1992 /* register subdevice */
1993 ret = v4l2_async_register_subdev(sd);
1994 if (ret < 0) {
1995 dev_err(&client->dev,
1996 "%s : v4l2_async_register_subdev failed %d\n",
1997 __func__, ret);
1998 goto err_power_off;
1999 }
2000
2001 dev_info(&client->dev, "imx274 : imx274 probe success !\n");
2002 return 0;
2003
2004 err_power_off:
2005 imx274_power_off(&client->dev);
2006 err_ctrls:
2007 v4l2_ctrl_handler_free(&imx274->ctrls.handler);
2008 err_me:
2009 media_entity_cleanup(&sd->entity);
2010 err_regmap:
2011 mutex_destroy(&imx274->lock);
2012 return ret;
2013 }
2014
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v2 17/19] btrfs: implement subpage metadata read and its endio function
by kernel test robot
Hi Qu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.9-rc5]
[also build test ERROR on next-20200915]
[cannot apply to kdave/for-next btrfs/next]
[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/Qu-Wenruo/btrfs-add-read-only-su...
base: 856deb866d16e29bd65952e0289066f6078af773
config: m68k-randconfig-r014-20200913 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
m68k-linux-ld: fs/btrfs/disk-io.o: in function `btree_read_subpage_endio_hook':
>> fs/btrfs/disk-io.c:674: undefined reference to `__udivdi3'
m68k-linux-ld: fs/btrfs/extent_io.o: in function `release_extent_buffer':
fs/btrfs/extent_io.c:5480: undefined reference to `__udivdi3'
m68k-linux-ld: fs/btrfs/extent_io.o: in function `find_extent_buffer':
fs/btrfs/extent_io.c:5230: undefined reference to `__udivdi3'
m68k-linux-ld: fs/btrfs/extent_io.o: in function `alloc_extent_buffer':
fs/btrfs/extent_io.c:5411: undefined reference to `__udivdi3'
# https://github.com/0day-ci/linux/commit/1cc0af35d8945ec5e3a36ca3f0d51c1c7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Qu-Wenruo/btrfs-add-read-only-support-for-subpage-sector-size/20200915-133811
git checkout 1cc0af35d8945ec5e3a36ca3f0d51c1c70a37e1a
vim +674 fs/btrfs/disk-io.c
647
648 static int btree_read_subpage_endio_hook(struct page *page, u64 start, u64 end,
649 int mirror)
650 {
651 struct btrfs_fs_info *fs_info = page_to_fs_info(page);
652 struct extent_io_tree *io_tree = info_to_btree_io_tree(fs_info);
653 struct extent_buffer *eb;
654 int reads_done;
655 int ret = 0;
656
657 if (!IS_ALIGNED(start, fs_info->sectorsize) ||
658 !IS_ALIGNED(end - start + 1, fs_info->sectorsize) ||
659 !IS_ALIGNED(end - start + 1, fs_info->nodesize)) {
660 WARN_ON(IS_ENABLED(CONFIG_BTRFS_DEBUG));
661 btrfs_err(fs_info, "invalid tree read bytenr");
662 return -EUCLEAN;
663 }
664
665 /*
666 * We don't allow bio merge for subpage metadata read, so we should
667 * only get one eb for each endio hook.
668 */
669 ASSERT(end == start + fs_info->nodesize - 1);
670 ASSERT(PagePrivate(page));
671
672 rcu_read_lock();
673 eb = radix_tree_lookup(&fs_info->buffer_radix,
> 674 start / fs_info->sectorsize);
675 rcu_read_unlock();
676
677 /*
678 * When we are reading one tree block, eb must have been
679 * inserted into the radix tree. If not something is wrong.
680 */
681 if (!eb) {
682 WARN_ON(IS_ENABLED(CONFIG_BTRFS_DEBUG));
683 btrfs_err(fs_info,
684 "can't find extent buffer for bytenr %llu",
685 start);
686 return -EUCLEAN;
687 }
688 /*
689 * The pending IO might have been the only thing that kept
690 * this buffer in memory. Make sure we have a ref for all
691 * this other checks
692 */
693 atomic_inc(&eb->refs);
694
695 reads_done = atomic_dec_and_test(&eb->io_pages);
696 /* Subpage read must finish in page read */
697 ASSERT(reads_done);
698
699 eb->read_mirror= mirror;
700 if (test_bit(EXTENT_BUFFER_READ_ERR, &eb->bflags)) {
701 ret = -EIO;
702 goto err;
703 }
704 ret = btrfs_check_extent_buffer(eb);
705 if (ret < 0)
706 goto err;
707
708 if (test_and_clear_bit(EXTENT_BUFFER_READAHEAD, &eb->bflags))
709 btree_readahead_hook(eb, ret);
710
711 set_extent_buffer_uptodate(eb);
712
713 free_extent_buffer(eb);
714
715 /*
716 * Since we don't use PageLocked() but extent_io_tree lock to lock the
717 * range, we need to unlock the range here.
718 */
719 unlock_extent(io_tree, start, end);
720 return ret;
721 err:
722 /*
723 * our io error hook is going to dec the io pages
724 * again, we have to make sure it has something to
725 * decrement
726 */
727 atomic_inc(&eb->io_pages);
728 clear_extent_buffer_uptodate(eb);
729 free_extent_buffer(eb);
730 unlock_extent(io_tree, start, end);
731 return ret;
732 }
733
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v2 05/19] btrfs: make btrfs_fs_info::buffer_radix to take sector size devided values
by kernel test robot
Hi Qu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.9-rc5]
[also build test ERROR on next-20200915]
[cannot apply to kdave/for-next btrfs/next]
[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/Qu-Wenruo/btrfs-add-read-only-su...
base: 856deb866d16e29bd65952e0289066f6078af773
config: m68k-randconfig-r014-20200913 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
m68k-linux-ld: fs/btrfs/extent_io.o: in function `alloc_extent_buffer':
>> fs/btrfs/extent_io.c:5305: undefined reference to `__udivdi3'
m68k-linux-ld: fs/btrfs/extent_io.o: in function `release_extent_buffer':
fs/btrfs/extent_io.c:5361: undefined reference to `__udivdi3'
m68k-linux-ld: fs/btrfs/extent_io.o: in function `find_extent_buffer':
fs/btrfs/extent_io.c:5145: undefined reference to `__udivdi3'
# https://github.com/0day-ci/linux/commit/d68d61d0719a047c653dcee58952ec46f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Qu-Wenruo/btrfs-add-read-only-support-for-subpage-sector-size/20200915-133811
git checkout d68d61d0719a047c653dcee58952ec46f5db5d00
vim +5305 fs/btrfs/extent_io.c
5216
5217 struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
5218 u64 start)
5219 {
5220 unsigned long len = fs_info->nodesize;
5221 int num_pages;
5222 int i;
5223 unsigned long index = start >> PAGE_SHIFT;
5224 struct extent_buffer *eb;
5225 struct extent_buffer *exists = NULL;
5226 struct page *p;
5227 struct address_space *mapping = fs_info->btree_inode->i_mapping;
5228 int uptodate = 1;
5229 int ret;
5230
5231 if (!IS_ALIGNED(start, fs_info->sectorsize)) {
5232 btrfs_err(fs_info, "bad tree block start %llu", start);
5233 return ERR_PTR(-EINVAL);
5234 }
5235
5236 eb = find_extent_buffer(fs_info, start);
5237 if (eb)
5238 return eb;
5239
5240 eb = __alloc_extent_buffer(fs_info, start, len);
5241 if (!eb)
5242 return ERR_PTR(-ENOMEM);
5243
5244 num_pages = num_extent_pages(eb);
5245 for (i = 0; i < num_pages; i++, index++) {
5246 p = find_or_create_page(mapping, index, GFP_NOFS|__GFP_NOFAIL);
5247 if (!p) {
5248 exists = ERR_PTR(-ENOMEM);
5249 goto free_eb;
5250 }
5251
5252 spin_lock(&mapping->private_lock);
5253 if (PagePrivate(p)) {
5254 /*
5255 * We could have already allocated an eb for this page
5256 * and attached one so lets see if we can get a ref on
5257 * the existing eb, and if we can we know it's good and
5258 * we can just return that one, else we know we can just
5259 * overwrite page->private.
5260 */
5261 exists = (struct extent_buffer *)p->private;
5262 if (atomic_inc_not_zero(&exists->refs)) {
5263 spin_unlock(&mapping->private_lock);
5264 unlock_page(p);
5265 put_page(p);
5266 mark_extent_buffer_accessed(exists, p);
5267 goto free_eb;
5268 }
5269 exists = NULL;
5270
5271 /*
5272 * Do this so attach doesn't complain and we need to
5273 * drop the ref the old guy had.
5274 */
5275 ClearPagePrivate(p);
5276 WARN_ON(PageDirty(p));
5277 put_page(p);
5278 }
5279 attach_extent_buffer_page(eb, p);
5280 spin_unlock(&mapping->private_lock);
5281 WARN_ON(PageDirty(p));
5282 eb->pages[i] = p;
5283 if (!PageUptodate(p))
5284 uptodate = 0;
5285
5286 /*
5287 * We can't unlock the pages just yet since the extent buffer
5288 * hasn't been properly inserted in the radix tree, this
5289 * opens a race with btree_releasepage which can free a page
5290 * while we are still filling in all pages for the buffer and
5291 * we could crash.
5292 */
5293 }
5294 if (uptodate)
5295 set_bit(EXTENT_BUFFER_UPTODATE, &eb->bflags);
5296 again:
5297 ret = radix_tree_preload(GFP_NOFS);
5298 if (ret) {
5299 exists = ERR_PTR(ret);
5300 goto free_eb;
5301 }
5302
5303 spin_lock(&fs_info->buffer_lock);
5304 ret = radix_tree_insert(&fs_info->buffer_radix,
> 5305 start / fs_info->sectorsize, eb);
5306 spin_unlock(&fs_info->buffer_lock);
5307 radix_tree_preload_end();
5308 if (ret == -EEXIST) {
5309 exists = find_extent_buffer(fs_info, start);
5310 if (exists)
5311 goto free_eb;
5312 else
5313 goto again;
5314 }
5315 /* add one reference for the tree */
5316 check_buffer_tree_ref(eb);
5317 set_bit(EXTENT_BUFFER_IN_TREE, &eb->bflags);
5318
5319 /*
5320 * Now it's safe to unlock the pages because any calls to
5321 * btree_releasepage will correctly detect that a page belongs to a
5322 * live buffer and won't free them prematurely.
5323 */
5324 for (i = 0; i < num_pages; i++)
5325 unlock_page(eb->pages[i]);
5326 return eb;
5327
5328 free_eb:
5329 WARN_ON(!atomic_dec_and_test(&eb->refs));
5330 for (i = 0; i < num_pages; i++) {
5331 if (eb->pages[i])
5332 unlock_page(eb->pages[i]);
5333 }
5334
5335 btrfs_release_extent_buffer(eb);
5336 return exists;
5337 }
5338
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years