All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-5.10 11/21] drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:1240:12: warning: cast to smaller integer type 'enum mdp_comp_type' from 'const void *'
@ 2021-08-13  8:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-13  8:35 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head:   fd02c3763b163e3228c744f68af7acada84b164a
commit: c09db8d0cdc8a6b23b5243f23d879b1f602ec371 [11/21] FROMLIST: media: platform: mtk-mdp3: Add Mediatek MDP3 driver
config: powerpc64-randconfig-r001-20210813 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 62df4df41c939205b2dc0a2a3bfb75b8c1ed74fa)
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 powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
        git fetch --no-tags chrome-os chromeos-5.10
        git checkout c09db8d0cdc8a6b23b5243f23d879b1f602ec371
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

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 >>):

   ^
   arch/powerpc/include/asm/io.h:522:62: note: expanded from macro '__do_outl'
   #define __do_outl(val, port)    writel(val,(PCI_IO_ADDR)_IO_BASE+port);
                                              ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
   In file included from include/linux/of_address.h:7:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:133:1: note: expanded from here
   __do_insb
   ^
   arch/powerpc/include/asm/io.h:541:56: note: expanded from macro '__do_insb'
   #define __do_insb(p, b, n)      readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
   In file included from include/linux/of_address.h:7:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:135:1: note: expanded from here
   __do_insw
   ^
   arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
   #define __do_insw(p, b, n)      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
   In file included from include/linux/of_address.h:7:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:137:1: note: expanded from here
   __do_insl
   ^
   arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
   #define __do_insl(p, b, n)      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
   In file included from include/linux/of_address.h:7:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:139:1: note: expanded from here
   __do_outsb
   ^
   arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
   #define __do_outsb(p, b, n)     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
   In file included from include/linux/of_address.h:7:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:141:1: note: expanded from here
   __do_outsw
   ^
   arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
   #define __do_outsw(p, b, n)     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:9:
   In file included from include/linux/of_address.h:7:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:143:1: note: expanded from here
   __do_outsl
   ^
   arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
   #define __do_outsl(p, b, n)     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:1240:12: warning: cast to smaller integer type 'enum mdp_comp_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
                                   type = (enum mdp_comp_type)matches->data;
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:1282:6: warning: unused variable 'ret' [-Wunused-variable]
           int ret;
               ^
   drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:1368:10: warning: cast to smaller integer type 'enum mdp_comp_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
                   type = (enum mdp_comp_type)of_id->data;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   15 warnings generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for MTK_SCP
   Depends on REMOTEPROC && (ARCH_MEDIATEK || COMPILE_TEST
   Selected by
   - VIDEO_MEDIATEK_MDP3 && MEDIA_SUPPORT && MEDIA_PLATFORM_SUPPORT && V4L_MEM2MEM_DRIVERS && MTK_IOMMU && VIDEO_DEV && VIDEO_V4L2 && (ARCH_MEDIATEK || COMPILE_TEST && HAS_DMA


vim +1240 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c

  1222	
  1223	static int mdp_sub_comps_create(struct mdp_dev *mdp, struct device_node *node)
  1224	{
  1225		struct device *dev = &mdp->pdev->dev;
  1226		struct property *prop;
  1227		const char *name;
  1228		int index = 0;
  1229	
  1230		of_property_for_each_string(node, "mdp3-comps", prop, name) {
  1231			const struct of_device_id *matches = mdp_sub_comp_dt_ids;
  1232			enum mdp_comp_type type = MDP_COMP_NONE;
  1233			u32 alias_id;
  1234			int id, ret;
  1235			struct mdp_comp *comp;
  1236	
  1237			for (; matches->compatible[0]; matches++) {
  1238				if (of_compat_cmp(name, matches->compatible,
  1239						 strlen(matches->compatible)) == 0) {
> 1240					type = (enum mdp_comp_type)matches->data;
  1241					break;
  1242				}
  1243			}
  1244	
  1245			ret = of_property_read_u32_index(node, "mdp3-comp-ids",
  1246							index, &alias_id);
  1247			if (ret) {
  1248				dev_warn(dev, "Skipping unknown component %s\n", name);
  1249				return ret;
  1250			}
  1251	
  1252			id = mdp_comp_get_id(type, alias_id);
  1253			if (id < 0) {
  1254				dev_err(dev, "Failed to get component id: "
  1255					"%s type %d, alias %d\n", name, type, alias_id);
  1256				return -ENODEV;
  1257			}
  1258	
  1259			comp = mdp_comp_create(mdp, node, id);
  1260			if (IS_ERR(comp))
  1261				return PTR_ERR(comp);
  1262	
  1263			index++;
  1264		}
  1265		return 0;
  1266	}
  1267	

---
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: 30289 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-13  8:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13  8:35 [chrome-os:chromeos-5.10 11/21] drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c:1240:12: warning: cast to smaller integer type 'enum mdp_comp_type' from 'const void *' 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.