All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-5.4 31/243] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c:98:14: warning: cast to smaller integer type 'enum mtk_vdec_hw_id' from 'const void *'
@ 2021-05-01  7:29 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-01  7:29 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head:   52d269f32500581166246e0e494b2b62d979dba6
commit: f04d055758de31185e1b298147cae3de6349dba1 [31/243] CHROMIUM: media: mtk-vcodec: Use component framework to manage each hardware information
config: arm64-randconfig-r021-20210501 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
        git fetch --no-tags chrome-os chromeos-5.4
        git checkout f04d055758de31185e1b298147cae3de6349dba1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64 

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/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c:98:14: warning: cast to smaller integer type 'enum mtk_vdec_hw_id' from 'const void *' [-Wvoid-pointer-to-enum-cast]
                   comp_idx = (enum mtk_vdec_hw_id)of_id->data;
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c:70:25: warning: no previous prototype for function 'mtk_vdec_match_add' [-Wmissing-prototypes]
   struct component_match *mtk_vdec_match_add(struct mtk_vcodec_dev *vdec_dev)
                           ^
   drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c:70:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   struct component_match *mtk_vdec_match_add(struct mtk_vcodec_dev *vdec_dev)
   ^
   static 
   2 warnings generated.


vim +98 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c

    69	
    70	struct component_match *mtk_vdec_match_add(struct mtk_vcodec_dev *vdec_dev)
    71	{
    72		struct platform_device *pdev = vdec_dev->plat_dev;
    73		struct component_match *match = NULL;
    74		int i;
    75	
    76		for (i = 0; i < ARRAY_SIZE(mtk_vdec_drv_ids); i++) {
    77			struct device_node *comp_node;
    78			enum mtk_vdec_hw_id comp_idx;
    79			const struct of_device_id *of_id;
    80	
    81			comp_node = of_find_compatible_node(NULL, NULL,
    82				mtk_vdec_drv_ids[i].compatible);
    83			if (!comp_node)
    84				continue;
    85	
    86			if (!of_device_is_available(comp_node)) {
    87				of_node_put(comp_node);
    88				dev_err(&pdev->dev, "Fail to get MMSYS node\n");
    89				continue;
    90			}
    91	
    92			of_id = of_match_node(mtk_vdec_drv_ids, comp_node);
    93			if (!of_id) {
    94				dev_err(&pdev->dev, "Failed to get match node\n");
    95				return ERR_PTR(-EINVAL);
    96			}
    97	
  > 98			comp_idx = (enum mtk_vdec_hw_id)of_id->data;
    99			mtk_v4l2_debug(4, "Get component:hw_id(%d),vdec_dev(0x%p),comp_node(0x%p)\n",
   100				comp_idx, vdec_dev, comp_node);
   101			vdec_dev->component_node[comp_idx] = comp_node;
   102	
   103			component_match_add_release(&pdev->dev, &match, mtk_vdec_release_of,
   104				mtk_vdec_compare_of, comp_node);
   105		}
   106	
   107		return match;
   108	}
   109	

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

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

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

only message in thread, other threads:[~2021-05-01  7:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01  7:29 [chrome-os:chromeos-5.4 31/243] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c:98:14: warning: cast to smaller integer type 'enum mtk_vdec_hw_id' 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.