linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/tilcdc: add const to of_device_id
@ 2021-12-15 16:18 Xiang wangx
  2021-12-15 20:35 ` kernel test robot
  0 siblings, 1 reply; 3+ messages in thread
From: Xiang wangx @ 2021-12-15 16:18 UTC (permalink / raw)
  To: jyri.sarha; +Cc: tomba, airlied, daniel, dri-devel, linux-kernel, Xiang wangx

struct of_device_id should normally be const.

Signed-off-by: Xiang wangx <wangxiang@cdjrlc.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 3ddb7c710a3d..d23ed0e2e87b 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -587,7 +587,7 @@ static int tilcdc_pdev_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id tilcdc_of_match[] = {
+static const struct of_device_id tilcdc_of_match[] = {
 		{ .compatible = "ti,am33xx-tilcdc", },
 		{ .compatible = "ti,da850-tilcdc", },
 		{ },
-- 
2.20.1


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

* Re: [PATCH] drm/tilcdc: add const to of_device_id
  2021-12-15 16:18 [PATCH] drm/tilcdc: add const to of_device_id Xiang wangx
@ 2021-12-15 20:35 ` kernel test robot
  2021-12-16  8:56   ` Jyri Sarha
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-12-15 20:35 UTC (permalink / raw)
  To: Xiang wangx, jyri.sarha
  Cc: kbuild-all, Xiang wangx, tomba, airlied, linux-kernel, dri-devel

Hi Xiang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm/drm-next]
[also build test ERROR on v5.16-rc5 next-20211214]
[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/Xiang-wangx/drm-tilcdc-add-const-to-of_device_id/20211216-002326
base:   git://anongit.freedesktop.org/drm/drm drm-next
config: arm-randconfig-c002-20211214 (https://download.01.org/0day-ci/archive/20211216/202112160411.sNrSELAY-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/5698eadb76d94a4fc5298f5bea88b839399ddef0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Xiang-wangx/drm-tilcdc-add-const-to-of_device_id/20211216-002326
        git checkout 5698eadb76d94a4fc5298f5bea88b839399ddef0
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/tilcdc/

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

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/tilcdc/tilcdc_drv.c:590:34: error: conflicting types for 'tilcdc_of_match'; have 'const struct of_device_id[]'
     590 | static const struct of_device_id tilcdc_of_match[] = {
         |                                  ^~~~~~~~~~~~~~~
   drivers/gpu/drm/tilcdc/tilcdc_drv.c:63:28: note: previous declaration of 'tilcdc_of_match' with type 'struct of_device_id[]'
      63 | static struct of_device_id tilcdc_of_match[];
         |                            ^~~~~~~~~~~~~~~
   drivers/gpu/drm/tilcdc/tilcdc_drv.c:63:28: error: array 'tilcdc_of_match' assumed to have one element [-Werror]
>> drivers/gpu/drm/tilcdc/tilcdc_drv.c:63:28: error: 'tilcdc_of_match' defined but not used [-Werror=unused-variable]
   cc1: all warnings being treated as errors


vim +590 drivers/gpu/drm/tilcdc/tilcdc_drv.c

   589	
 > 590	static const struct of_device_id tilcdc_of_match[] = {
   591			{ .compatible = "ti,am33xx-tilcdc", },
   592			{ .compatible = "ti,da850-tilcdc", },
   593			{ },
   594	};
   595	MODULE_DEVICE_TABLE(of, tilcdc_of_match);
   596	

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

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

* Re: [PATCH] drm/tilcdc: add const to of_device_id
  2021-12-15 20:35 ` kernel test robot
@ 2021-12-16  8:56   ` Jyri Sarha
  0 siblings, 0 replies; 3+ messages in thread
From: Jyri Sarha @ 2021-12-16  8:56 UTC (permalink / raw)
  To: Xiang wangx; +Cc: tomba, linux-kernel, dri-devel

Please fix the bellow error and I will review and merge this. But in 
future, please at least compile test you changes with relevant 
configurations or alldefconfig before sending them to upstream!

Best regards,
Jyri

On 2021-12-15 22:35, kernel test robot wrote:
> Hi Xiang,
> 
> Thank you for the patch! Yet something to improve:
> 
> [auto build test ERROR on drm/drm-next]
> [also build test ERROR on v5.16-rc5 next-20211214]
> [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/Xiang-wangx/drm-tilcdc-add-const-to-of_device_id/20211216-002326
> base:   git://anongit.freedesktop.org/drm/drm drm-next
> config: arm-randconfig-c002-20211214
> (https://download.01.org/0day-ci/archive/20211216/202112160411.sNrSELAY-lkp@intel.com/config)
> compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/5698eadb76d94a4fc5298f5bea88b839399ddef0
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review
> Xiang-wangx/drm-tilcdc-add-const-to-of_device_id/20211216-002326
>         git checkout 5698eadb76d94a4fc5298f5bea88b839399ddef0
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0
> make.cross O=build_dir ARCH=arm SHELL=/bin/bash
> drivers/gpu/drm/tilcdc/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>>> drivers/gpu/drm/tilcdc/tilcdc_drv.c:590:34: error: conflicting types 
>>> for 'tilcdc_of_match'; have 'const struct of_device_id[]'
>      590 | static const struct of_device_id tilcdc_of_match[] = {
>          |                                  ^~~~~~~~~~~~~~~
>    drivers/gpu/drm/tilcdc/tilcdc_drv.c:63:28: note: previous
> declaration of 'tilcdc_of_match' with type 'struct of_device_id[]'
>       63 | static struct of_device_id tilcdc_of_match[];
>          |                            ^~~~~~~~~~~~~~~
>    drivers/gpu/drm/tilcdc/tilcdc_drv.c:63:28: error: array
> 'tilcdc_of_match' assumed to have one element [-Werror]
>>> drivers/gpu/drm/tilcdc/tilcdc_drv.c:63:28: error: 'tilcdc_of_match' 
>>> defined but not used [-Werror=unused-variable]
>    cc1: all warnings being treated as errors
> 
> 
> vim +590 drivers/gpu/drm/tilcdc/tilcdc_drv.c
> 
>    589
>  > 590	static const struct of_device_id tilcdc_of_match[] = {
>    591			{ .compatible = "ti,am33xx-tilcdc", },
>    592			{ .compatible = "ti,da850-tilcdc", },
>    593			{ },
>    594	};
>    595	MODULE_DEVICE_TABLE(of, tilcdc_of_match);
>    596
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

end of thread, other threads:[~2021-12-16  8:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 16:18 [PATCH] drm/tilcdc: add const to of_device_id Xiang wangx
2021-12-15 20:35 ` kernel test robot
2021-12-16  8:56   ` Jyri Sarha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).