Re: [PATCH 2/2] compiler.h: Include asm/rwonce.h under ARM64 and ALPHA to fix build errors
by kernel test robot
Hi Tiezhu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
[also build test ERROR on bpf/master linus/master v5.11-rc3 next-20210113]
[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/Tiezhu-Yang/Fix-build-errors-and...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: arm-defconfig (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
# https://github.com/0day-ci/linux/commit/f65413b91d3c20f52eb8b53d7d32b9fd3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tiezhu-Yang/Fix-build-errors-and-warnings-when-make-M-samples-bpf/20210113-190045
git checkout f65413b91d3c20f52eb8b53d7d32b9fd38a18dca
# 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 errors (new ones prefixed by >>):
In file included from include/linux/spinlock_types.h:13,
from include/linux/ratelimit_types.h:7,
from include/linux/ratelimit.h:5,
from lib/ratelimit.c:11:
>> arch/arm/include/asm/spinlock_types.h:13:3: error: unknown type name 'u32'
13 | u32 slock;
| ^~~
>> arch/arm/include/asm/spinlock_types.h:19:4: error: unknown type name 'u16'
19 | u16 owner;
| ^~~
arch/arm/include/asm/spinlock_types.h:20:4: error: unknown type name 'u16'
20 | u16 next;
| ^~~
arch/arm/include/asm/spinlock_types.h:29:2: error: unknown type name 'u32'
29 | u32 lock;
| ^~~
vim +/u32 +13 arch/arm/include/asm/spinlock_types.h
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 10
fb1c8f93d869b34c include/asm-arm/spinlock_types.h Ingo Molnar 2005-09-10 11 typedef struct {
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 12 union {
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 @13 u32 slock;
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 14 struct __raw_tickets {
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 15 #ifdef __ARMEB__
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 16 u16 next;
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 17 u16 owner;
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 18 #else
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 @19 u16 owner;
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 20 u16 next;
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 21 #endif
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 22 } tickets;
546c2896a42202db arch/arm/include/asm/spinlock_types.h Will Deacon 2012-07-06 23 };
445c89514be242b1 arch/arm/include/asm/spinlock_types.h Thomas Gleixner 2009-12-02 24 } arch_spinlock_t;
fb1c8f93d869b34c include/asm-arm/spinlock_types.h Ingo Molnar 2005-09-10 25
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
arch/mips/bmips/dma.c:43:12: warning: no previous prototype for 'phys_to_dma'
by kernel test robot
Hi Christoph,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 65f0d2414b7079556fbbcc070b3d1c9f9587606d
commit: 5ceda74093a5c1c3f42a02b894df031f3bbc9af1 dma-direct: rename and cleanup __phys_to_dma
date: 4 months ago
config: mips-randconfig-r023-20210113 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5ceda74093a5c1c3f42a02b894df031f3bbc9af1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
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/mips/bmips/dma.c:43:12: warning: no previous prototype for 'phys_to_dma' [-Wmissing-prototypes]
43 | dma_addr_t phys_to_dma(struct device *dev, phys_addr_t pa)
| ^~~~~~~~~~~
arch/mips/bmips/dma.c:55:13: warning: no previous prototype for 'dma_to_phys' [-Wmissing-prototypes]
55 | phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr)
| ^~~~~~~~~~~
arch/mips/bmips/dma.c:67:6: warning: no previous prototype for 'arch_sync_dma_for_cpu_all' [-Wmissing-prototypes]
67 | void arch_sync_dma_for_cpu_all(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/phys_to_dma +43 arch/mips/bmips/dma.c
42
> 43 dma_addr_t phys_to_dma(struct device *dev, phys_addr_t pa)
44 {
45 struct bmips_dma_range *r;
46
47 for (r = bmips_dma_ranges; r && r->size; r++) {
48 if (pa >= r->child_addr &&
49 pa < (r->child_addr + r->size))
50 return pa - r->child_addr + r->parent_addr;
51 }
52 return pa;
53 }
54
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[masahiroy:cc-check 1/1] sh: 1: scripts/cc-check.sh: not found
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git cc-check
head: df26de0eabbf2c8b73182561bf6e5ae9ebfefc4d
commit: df26de0eabbf2c8b73182561bf6e5ae9ebfefc4d [1/1] WIP
config: x86_64-rhel-8.3-kbuiltin (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.gi...
git remote add masahiroy https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
git fetch --no-tags masahiroy cc-check
git checkout df26de0eabbf2c8b73182561bf6e5ae9ebfefc4d
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> Error: kernelrelease not valid - run 'make prepare' to update it
--
>> sh: 1: scripts/cc-check.sh: not found
>> init/Kconfig:34: syntax error
init/Kconfig:33: invalid statement
init/Kconfig:34: invalid statement
init/Kconfig:49: syntax error
init/Kconfig:48: invalid statement
init/Kconfig:49: invalid statement
--
>> sh: 1: scripts/cc-check.sh: not found
>> init/Kconfig:34: syntax error
init/Kconfig:33: invalid statement
init/Kconfig:34: invalid statement
init/Kconfig:49: syntax error
init/Kconfig:48: invalid statement
init/Kconfig:49: invalid statement
make[3]: *** [scripts/kconfig/Makefile:71: syncconfig] Error 1
make[2]: *** [Makefile:602: syncconfig] Error 2
make[1]: *** [Makefile:710: include/config/auto.conf.cmd] Error 2
make[1]: Failed to remake makefile 'include/config/auto.conf.cmd'.
make[1]: Failed to remake makefile 'include/config/auto.conf'.
>> make[1]: *** No rule to make target 'modules_prepare'.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
>> sh: 1: scripts/cc-check.sh: not found
>> init/Kconfig:34: syntax error
init/Kconfig:33: invalid statement
init/Kconfig:34: invalid statement
init/Kconfig:49: syntax error
init/Kconfig:48: invalid statement
init/Kconfig:49: invalid statement
make[2]: *** [scripts/kconfig/Makefile:71: olddefconfig] Error 1
make[1]: *** [Makefile:602: olddefconfig] Error 2
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'olddefconfig' not remade because of errors.
--
>> sh: 1: scripts/cc-check.sh: not found
>> init/Kconfig:34: syntax error
init/Kconfig:33: invalid statement
init/Kconfig:34: invalid statement
init/Kconfig:49: syntax error
init/Kconfig:48: invalid statement
init/Kconfig:49: invalid statement
make[3]: *** [scripts/kconfig/Makefile:71: syncconfig] Error 1
make[2]: *** [Makefile:602: syncconfig] Error 2
make[1]: *** [Makefile:710: include/config/auto.conf.cmd] Error 2
make[1]: Failed to remake makefile 'include/config/auto.conf.cmd'.
make[1]: Failed to remake makefile 'include/config/auto.conf'.
make[1]: *** [arch/x86/Makefile:278: checkbin] Error 1
>> Error: kernelrelease not valid - run 'make prepare' to update it
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[freescale-fslc:5.4-2.2.x-imx 10205/16278] drivers/gpu/drm/bridge/nxp-seiko-43wvfig.c:214:14: error: 'struct drm_bridge' has no member named 'of_node'
by kernel test robot
Hi Robert,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc 5.4-2.2.x-imx
head: 36733e64a23549c9aba289b35b7e2ef1492118fa
commit: c40c90f2d3265167edd6384dd8691dc88f78308d [10205/16278] LF-811-1: drm/bridge: Add driver for legacy Freescale Seiko 43WVFIG adapter
config: alpha-randconfig-r031-20210113 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/Freescale/linux-fslc/commit/c40c90f2d3265167edd6384dd8...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.4-2.2.x-imx
git checkout c40c90f2d3265167edd6384dd8691dc88f78308d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/bridge/nxp-seiko-43wvfig.c: In function 'seiko_adapter_probe':
>> drivers/gpu/drm/bridge/nxp-seiko-43wvfig.c:214:14: error: 'struct drm_bridge' has no member named 'of_node'
214 | adap->bridge.of_node = dev->of_node;
| ^
In file included from drivers/gpu/drm/bridge/nxp-seiko-43wvfig.c:20:
At top level:
include/drm/drm_of.h:64:12: warning: 'drm_of_component_probe_with_match' defined but not used [-Wunused-function]
64 | static int drm_of_component_probe_with_match(struct device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for DRM_SEC_MIPI_DSIM
Depends on HAS_IOMEM && DRM && DRM_BRIDGE && OF
Selected by
- DRM_IMX_SEC_DSIM && HAS_IOMEM && DRM_IMX
WARNING: unmet direct dependencies detected for DRM_CDNS_MHDP
Depends on HAS_IOMEM && DRM && DRM_BRIDGE && OF
Selected by
- DRM_IMX_CDNS_MHDP && HAS_IOMEM && DRM_IMX
vim +214 drivers/gpu/drm/bridge/nxp-seiko-43wvfig.c
166
167 static int seiko_adapter_probe(struct platform_device *pdev)
168 {
169 struct device *dev = &pdev->dev;
170 struct seiko_adapter *adap;
171 struct device_node *remote;
172 u32 bus_mode;
173 int port;
174
175 adap = devm_kzalloc(dev, sizeof(*adap), GFP_KERNEL);
176 if (!adap)
177 return -ENOMEM;
178
179 of_property_read_u32(dev->of_node, "bus_mode", &bus_mode);
180 if (bus_mode != 18 && bus_mode != 24) {
181 dev_err(dev, "Invalid bus_mode: %d\n", bus_mode);
182 return -EINVAL;
183 }
184
185 switch (bus_mode) {
186 case 18:
187 adap->bpc = 6;
188 adap->bus_format = MEDIA_BUS_FMT_RGB666_1X18;
189 break;
190 case 24:
191 adap->bpc = 8;
192 adap->bus_format = MEDIA_BUS_FMT_RGB888_1X24;
193 break;
194 }
195
196 for (port = 0; port < 2; port++) {
197 remote = of_graph_get_remote_node(dev->of_node, port, -1);
198 if (!remote) {
199 dev_err(dev, "No remote for port %d\n", port);
200 return -ENODEV;
201 }
202 adap->panel = of_drm_find_panel(remote);
203 if (!IS_ERR(adap->panel))
204 break;
205 }
206 if (IS_ERR(adap->panel)) {
207 dev_err(dev, "No panel found: %ld\n", PTR_ERR(adap->panel));
208 return PTR_ERR(adap->panel);
209 }
210
211 adap->dev = dev;
212 adap->bridge.driver_private = adap;
213 adap->bridge.funcs = &seiko_adapter_bridge_funcs;
> 214 adap->bridge.of_node = dev->of_node;
215
216 drm_bridge_add(&adap->bridge);
217
218 return 0;
219 }
220
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[linux-next:master 1162/2798] drivers/gpu/drm/radeon/radeon_uvd.c:794:9: sparse: sparse: cast from restricted __le32
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aa515cdce7a151dcc14b7600d33f1414c6fa32c9
commit: ede6b6bc43c68ef030f88235e91e85939b8bdb49 [1162/2798] drm/radeon: use writel to avoid gcc optimization v3
config: arm-randconfig-s031-20210113 (attached as .config)
compiler: arm-linux-gnueabi-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-208-g46a52ca4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout ede6b6bc43c68ef030f88235e91e85939b8bdb49
# 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=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/gpu/drm/radeon/radeon_uvd.c:155:37: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/radeon/radeon_uvd.c:156:42: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/radeon/radeon_uvd.c:157:42: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/radeon/radeon_uvd.c:794:9: sparse: sparse: cast from restricted __le32
drivers/gpu/drm/radeon/radeon_uvd.c:796:9: sparse: sparse: cast from restricted __le32
drivers/gpu/drm/radeon/radeon_uvd.c:801:9: sparse: sparse: cast from restricted __le32
drivers/gpu/drm/radeon/radeon_uvd.c:802:9: sparse: sparse: cast from restricted __le32
drivers/gpu/drm/radeon/radeon_uvd.c:804:9: sparse: sparse: cast from restricted __le32
drivers/gpu/drm/radeon/radeon_uvd.c:830:9: sparse: sparse: cast from restricted __le32
drivers/gpu/drm/radeon/radeon_uvd.c:831:9: sparse: sparse: cast from restricted __le32
drivers/gpu/drm/radeon/radeon_uvd.c:832:9: sparse: sparse: cast from restricted __le32
vim +794 drivers/gpu/drm/radeon/radeon_uvd.c
771
772 /*
773 * multiple fence commands without any stream commands in between can
774 * crash the vcpu so just try to emmit a dummy create/destroy msg to
775 * avoid this
776 */
777 int radeon_uvd_get_create_msg(struct radeon_device *rdev, int ring,
778 uint32_t handle, struct radeon_fence **fence)
779 {
780 /* we use the last page of the vcpu bo for the UVD message */
781 uint64_t offs = radeon_bo_size(rdev->uvd.vcpu_bo) -
782 RADEON_GPU_PAGE_SIZE;
783
784 uint32_t __iomem *msg = (void __iomem *)(rdev->uvd.cpu_addr + offs);
785 uint64_t addr = rdev->uvd.gpu_addr + offs;
786
787 int r, i;
788
789 r = radeon_bo_reserve(rdev->uvd.vcpu_bo, true);
790 if (r)
791 return r;
792
793 /* stitch together an UVD create msg */
> 794 writel(cpu_to_le32(0x00000de4), &msg[0]);
795 writel(0x0, (void __iomem *)&msg[1]);
796 writel(cpu_to_le32(handle), &msg[2]);
797 writel(0x0, &msg[3]);
798 writel(0x0, &msg[4]);
799 writel(0x0, &msg[5]);
800 writel(0x0, &msg[6]);
801 writel(cpu_to_le32(0x00000780), &msg[7]);
802 writel(cpu_to_le32(0x00000440), &msg[8]);
803 writel(0x0, &msg[9]);
804 writel(cpu_to_le32(0x01b37000), &msg[10]);
805 for (i = 11; i < 1024; ++i)
806 writel(0x0, &msg[i]);
807
808 r = radeon_uvd_send_msg(rdev, ring, addr, fence);
809 radeon_bo_unreserve(rdev->uvd.vcpu_bo);
810 return r;
811 }
812
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[linux-next:master 2770/2798] include/linux/fortify-string.h:27:30: warning: '__builtin_strncpy' output may be truncated copying between 5 and 9 bytes from a string of length 9
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aa515cdce7a151dcc14b7600d33f1414c6fa32c9
commit: 97a31c94fce5a46cd09fd6a987418e6acd2b8e24 [2770/2798] string.h: move fortified functions definitions in a dedicated header.
config: mips-randconfig-r011-20210113 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 97a31c94fce5a46cd09fd6a987418e6acd2b8e24
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
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/string.h:269,
from include/linux/uuid.h:12,
from fs/xfs/xfs_linux.h:10,
from fs/xfs/xfs.h:22,
from fs/xfs/xfs_xattr.c:7:
In function 'strncpy',
inlined from '__xfs_xattr_put_listent' at fs/xfs/xfs_xattr.c:118:2,
inlined from 'xfs_xattr_put_listent' at fs/xfs/xfs_xattr.c:180:2:
>> include/linux/fortify-string.h:27:30: warning: '__builtin_strncpy' output may be truncated copying between 5 and 9 bytes from a string of length 9 [-Wstringop-truncation]
27 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/fortify-string.h:38:9: note: in expansion of macro '__underlying_strncpy'
38 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/string.h:269,
from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from arch/mips/include/asm/cpu-type.h:12,
from arch/mips/include/asm/timex.h:19,
from include/linux/timex.h:65,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/compat.h:10,
from drivers/hid/uhid.c:11:
In function 'strncpy',
inlined from 'uhid_dev_create2' at drivers/hid/uhid.c:499:2:
>> include/linux/fortify-string.h:27:30: warning: '__builtin_strncpy' output may be truncated copying 127 bytes from a string of length 127 [-Wstringop-truncation]
27 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/fortify-string.h:38:9: note: in expansion of macro '__underlying_strncpy'
38 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'uhid_dev_create2' at drivers/hid/uhid.c:501:2:
include/linux/fortify-string.h:27:30: warning: '__builtin_strncpy' output may be truncated copying 63 bytes from a string of length 63 [-Wstringop-truncation]
27 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/fortify-string.h:38:9: note: in expansion of macro '__underlying_strncpy'
38 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'uhid_dev_create2' at drivers/hid/uhid.c:503:2:
include/linux/fortify-string.h:27:30: warning: '__builtin_strncpy' output may be truncated copying 63 bytes from a string of length 63 [-Wstringop-truncation]
27 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/fortify-string.h:38:9: note: in expansion of macro '__underlying_strncpy'
38 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/string.h:269,
from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from arch/mips/include/asm/cpu-type.h:12,
from arch/mips/include/asm/timex.h:19,
from include/linux/timex.h:65,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/video/fbdev/uvesafb.c:13:
In function 'strncpy',
inlined from 'uvesafb_vbe_getinfo' at drivers/video/fbdev/uvesafb.c:426:2:
include/linux/fortify-string.h:27:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
27 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/fortify-string.h:38:9: note: in expansion of macro '__underlying_strncpy'
38 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'v86d_store' at drivers/video/fbdev/uvesafb.c:1874:2:
>> include/linux/fortify-string.h:27:30: warning: '__builtin_strncpy' specified bound 4096 equals destination size [-Wstringop-truncation]
27 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/fortify-string.h:38:9: note: in expansion of macro '__underlying_strncpy'
38 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
vim +/__builtin_strncpy +27 include/linux/fortify-string.h
4
5
6 #if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
7 extern void *__underlying_memchr(const void *p, int c, __kernel_size_t size) __RENAME(memchr);
8 extern int __underlying_memcmp(const void *p, const void *q, __kernel_size_t size) __RENAME(memcmp);
9 extern void *__underlying_memcpy(void *p, const void *q, __kernel_size_t size) __RENAME(memcpy);
10 extern void *__underlying_memmove(void *p, const void *q, __kernel_size_t size) __RENAME(memmove);
11 extern void *__underlying_memset(void *p, int c, __kernel_size_t size) __RENAME(memset);
12 extern char *__underlying_strcat(char *p, const char *q) __RENAME(strcat);
13 extern char *__underlying_strcpy(char *p, const char *q) __RENAME(strcpy);
14 extern __kernel_size_t __underlying_strlen(const char *p) __RENAME(strlen);
15 extern char *__underlying_strncat(char *p, const char *q, __kernel_size_t count) __RENAME(strncat);
16 extern char *__underlying_strncpy(char *p, const char *q, __kernel_size_t size) __RENAME(strncpy);
17 #else
18 #define __underlying_memchr __builtin_memchr
19 #define __underlying_memcmp __builtin_memcmp
20 #define __underlying_memcpy __builtin_memcpy
21 #define __underlying_memmove __builtin_memmove
22 #define __underlying_memset __builtin_memset
23 #define __underlying_strcat __builtin_strcat
24 #define __underlying_strcpy __builtin_strcpy
25 #define __underlying_strlen __builtin_strlen
26 #define __underlying_strncat __builtin_strncat
> 27 #define __underlying_strncpy __builtin_strncpy
28 #endif
29
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH v5] drm/sun4i: tcon: fix inverted DCLK polarity
by kernel test robot
Hi Giulio,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on sunxi/sunxi/for-next]
[also build test ERROR on drm-exynos/exynos-drm-next drm-intel/for-linux-next tegra-drm/drm/tegra/for-next drm-tip/drm-tip v5.11-rc3 next-20210113]
[cannot apply to mripard/sunxi/for-next drm/drm-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/Giulio-Benetti/drm-sun4i-tcon-fi...
base: https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/for-next
config: arm64-randconfig-r005-20210113 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/acbc865cfd67e02cb2e4a37dfd56598ee...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Giulio-Benetti/drm-sun4i-tcon-fix-inverted-DCLK-polarity/20210114-001027
git checkout acbc865cfd67e02cb2e4a37dfd56598eeae38287
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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/sun4i/sun4i_tcon.c: In function 'sun4i_tcon0_mode_set_rgb':
>> drivers/gpu/drm/sun4i/sun4i_tcon.c:578:7: error: 'SUN4I_TCON0_IO_POL_DCLK_DRIVE_NEGDGE' undeclared (first use in this function); did you mean 'SUN4I_TCON0_IO_POL_DCLK_DRIVE_NEGEDGE'?
578 | SUN4I_TCON0_IO_POL_DCLK_DRIVE_NEGDGE |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| SUN4I_TCON0_IO_POL_DCLK_DRIVE_NEGEDGE
drivers/gpu/drm/sun4i/sun4i_tcon.c:578:7: note: each undeclared identifier is reported only once for each function it appears in
vim +578 drivers/gpu/drm/sun4i/sun4i_tcon.c
502
503 static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,
504 const struct drm_encoder *encoder,
505 const struct drm_display_mode *mode)
506 {
507 struct drm_connector *connector = sun4i_tcon_get_connector(encoder);
508 const struct drm_display_info *info = &connector->display_info;
509 unsigned int bp, hsync, vsync;
510 u8 clk_delay;
511 u32 val = 0;
512
513 WARN_ON(!tcon->quirks->has_channel_0);
514
515 tcon->dclk_min_div = tcon->quirks->dclk_min_div;
516 tcon->dclk_max_div = 127;
517 sun4i_tcon0_mode_set_common(tcon, mode);
518
519 /* Set dithering if needed */
520 sun4i_tcon0_mode_set_dithering(tcon, connector);
521
522 /* Adjust clock delay */
523 clk_delay = sun4i_tcon_get_clk_delay(mode, 0);
524 regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG,
525 SUN4I_TCON0_CTL_CLK_DELAY_MASK,
526 SUN4I_TCON0_CTL_CLK_DELAY(clk_delay));
527
528 /*
529 * This is called a backporch in the register documentation,
530 * but it really is the back porch + hsync
531 */
532 bp = mode->crtc_htotal - mode->crtc_hsync_start;
533 DRM_DEBUG_DRIVER("Setting horizontal total %d, backporch %d\n",
534 mode->crtc_htotal, bp);
535
536 /* Set horizontal display timings */
537 regmap_write(tcon->regs, SUN4I_TCON0_BASIC1_REG,
538 SUN4I_TCON0_BASIC1_H_TOTAL(mode->crtc_htotal) |
539 SUN4I_TCON0_BASIC1_H_BACKPORCH(bp));
540
541 /*
542 * This is called a backporch in the register documentation,
543 * but it really is the back porch + hsync
544 */
545 bp = mode->crtc_vtotal - mode->crtc_vsync_start;
546 DRM_DEBUG_DRIVER("Setting vertical total %d, backporch %d\n",
547 mode->crtc_vtotal, bp);
548
549 /* Set vertical display timings */
550 regmap_write(tcon->regs, SUN4I_TCON0_BASIC2_REG,
551 SUN4I_TCON0_BASIC2_V_TOTAL(mode->crtc_vtotal * 2) |
552 SUN4I_TCON0_BASIC2_V_BACKPORCH(bp));
553
554 /* Set Hsync and Vsync length */
555 hsync = mode->crtc_hsync_end - mode->crtc_hsync_start;
556 vsync = mode->crtc_vsync_end - mode->crtc_vsync_start;
557 DRM_DEBUG_DRIVER("Setting HSYNC %d, VSYNC %d\n", hsync, vsync);
558 regmap_write(tcon->regs, SUN4I_TCON0_BASIC3_REG,
559 SUN4I_TCON0_BASIC3_V_SYNC(vsync) |
560 SUN4I_TCON0_BASIC3_H_SYNC(hsync));
561
562 /* Setup the polarity of the various signals */
563 if (mode->flags & DRM_MODE_FLAG_PHSYNC)
564 val |= SUN4I_TCON0_IO_POL_HSYNC_POSITIVE;
565
566 if (mode->flags & DRM_MODE_FLAG_PVSYNC)
567 val |= SUN4I_TCON0_IO_POL_VSYNC_POSITIVE;
568
569 if (info->bus_flags & DRM_BUS_FLAG_DE_LOW)
570 val |= SUN4I_TCON0_IO_POL_DE_NEGATIVE;
571
572 if (info->bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE)
573 val |= SUN4I_TCON0_IO_POL_DCLK_DRIVE_NEGEDGE;
574
575 regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG,
576 SUN4I_TCON0_IO_POL_HSYNC_POSITIVE |
577 SUN4I_TCON0_IO_POL_VSYNC_POSITIVE |
> 578 SUN4I_TCON0_IO_POL_DCLK_DRIVE_NEGDGE |
579 SUN4I_TCON0_IO_POL_DE_NEGATIVE,
580 val);
581
582 /* Map output pins to channel 0 */
583 regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG,
584 SUN4I_TCON_GCTL_IOMAP_MASK,
585 SUN4I_TCON_GCTL_IOMAP_TCON0);
586
587 /* Enable the output on the pins */
588 regmap_write(tcon->regs, SUN4I_TCON0_IO_TRI_REG, 0);
589 }
590
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[linux-next:master 1162/2798] drivers/gpu/drm/radeon/radeon_uvd.c:794:16: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aa515cdce7a151dcc14b7600d33f1414c6fa32c9
commit: ede6b6bc43c68ef030f88235e91e85939b8bdb49 [1162/2798] drm/radeon: use writel to avoid gcc optimization v3
config: alpha-randconfig-s031-20210113 (attached as .config)
compiler: alpha-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-208-g46a52ca4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout ede6b6bc43c68ef030f88235e91e85939b8bdb49
# 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=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/gpu/drm/radeon/radeon_uvd.c:155:37: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/radeon/radeon_uvd.c:156:42: sparse: sparse: cast to restricted __le32
drivers/gpu/drm/radeon/radeon_uvd.c:157:42: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/radeon/radeon_uvd.c:794:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] b @@ got restricted __le32 [usertype] @@
drivers/gpu/drm/radeon/radeon_uvd.c:794:16: sparse: expected unsigned int [usertype] b
drivers/gpu/drm/radeon/radeon_uvd.c:794:16: sparse: got restricted __le32 [usertype]
drivers/gpu/drm/radeon/radeon_uvd.c:796:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] b @@ got restricted __le32 [usertype] @@
drivers/gpu/drm/radeon/radeon_uvd.c:796:16: sparse: expected unsigned int [usertype] b
drivers/gpu/drm/radeon/radeon_uvd.c:796:16: sparse: got restricted __le32 [usertype]
drivers/gpu/drm/radeon/radeon_uvd.c:801:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] b @@ got restricted __le32 [usertype] @@
drivers/gpu/drm/radeon/radeon_uvd.c:801:16: sparse: expected unsigned int [usertype] b
drivers/gpu/drm/radeon/radeon_uvd.c:801:16: sparse: got restricted __le32 [usertype]
drivers/gpu/drm/radeon/radeon_uvd.c:802:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] b @@ got restricted __le32 [usertype] @@
drivers/gpu/drm/radeon/radeon_uvd.c:802:16: sparse: expected unsigned int [usertype] b
drivers/gpu/drm/radeon/radeon_uvd.c:802:16: sparse: got restricted __le32 [usertype]
drivers/gpu/drm/radeon/radeon_uvd.c:804:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] b @@ got restricted __le32 [usertype] @@
drivers/gpu/drm/radeon/radeon_uvd.c:804:16: sparse: expected unsigned int [usertype] b
drivers/gpu/drm/radeon/radeon_uvd.c:804:16: sparse: got restricted __le32 [usertype]
drivers/gpu/drm/radeon/radeon_uvd.c:830:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] b @@ got restricted __le32 [usertype] @@
drivers/gpu/drm/radeon/radeon_uvd.c:830:16: sparse: expected unsigned int [usertype] b
drivers/gpu/drm/radeon/radeon_uvd.c:830:16: sparse: got restricted __le32 [usertype]
drivers/gpu/drm/radeon/radeon_uvd.c:831:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] b @@ got restricted __le32 [usertype] @@
drivers/gpu/drm/radeon/radeon_uvd.c:831:16: sparse: expected unsigned int [usertype] b
drivers/gpu/drm/radeon/radeon_uvd.c:831:16: sparse: got restricted __le32 [usertype]
drivers/gpu/drm/radeon/radeon_uvd.c:832:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] b @@ got restricted __le32 [usertype] @@
drivers/gpu/drm/radeon/radeon_uvd.c:832:16: sparse: expected unsigned int [usertype] b
drivers/gpu/drm/radeon/radeon_uvd.c:832:16: sparse: got restricted __le32 [usertype]
vim +794 drivers/gpu/drm/radeon/radeon_uvd.c
771
772 /*
773 * multiple fence commands without any stream commands in between can
774 * crash the vcpu so just try to emmit a dummy create/destroy msg to
775 * avoid this
776 */
777 int radeon_uvd_get_create_msg(struct radeon_device *rdev, int ring,
778 uint32_t handle, struct radeon_fence **fence)
779 {
780 /* we use the last page of the vcpu bo for the UVD message */
781 uint64_t offs = radeon_bo_size(rdev->uvd.vcpu_bo) -
782 RADEON_GPU_PAGE_SIZE;
783
784 uint32_t __iomem *msg = (void __iomem *)(rdev->uvd.cpu_addr + offs);
785 uint64_t addr = rdev->uvd.gpu_addr + offs;
786
787 int r, i;
788
789 r = radeon_bo_reserve(rdev->uvd.vcpu_bo, true);
790 if (r)
791 return r;
792
793 /* stitch together an UVD create msg */
> 794 writel(cpu_to_le32(0x00000de4), &msg[0]);
795 writel(0x0, (void __iomem *)&msg[1]);
796 writel(cpu_to_le32(handle), &msg[2]);
797 writel(0x0, &msg[3]);
798 writel(0x0, &msg[4]);
799 writel(0x0, &msg[5]);
800 writel(0x0, &msg[6]);
801 writel(cpu_to_le32(0x00000780), &msg[7]);
802 writel(cpu_to_le32(0x00000440), &msg[8]);
803 writel(0x0, &msg[9]);
804 writel(cpu_to_le32(0x01b37000), &msg[10]);
805 for (i = 11; i < 1024; ++i)
806 writel(0x0, &msg[i]);
807
808 r = radeon_uvd_send_msg(rdev, ring, addr, fence);
809 radeon_bo_unreserve(rdev->uvd.vcpu_bo);
810 return r;
811 }
812
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months