public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Daniel Palmer <daniel@0x0f.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [linux-chenxing:mstar_v5_14_rebase_i2_drm 80/349] include/linux/device/driver.h:288:20: warning: passing argument 1 of '__platform_driver_register' discards 'const' qualifier from pointer target type
Date: Mon, 19 Jul 2021 05:38:59 +0800	[thread overview]
Message-ID: <202107190555.ciD4J51d-lkp@intel.com> (raw)

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

tree:   git://github.com/linux-chenxing/linux.git mstar_v5_14_rebase_i2_drm
head:   93dfb2364436067bf34c6d4ddcd282496182cc0f
commit: 2c26aea472dc85f461af5a2e8a89894fc1e623a0 [80/349] clk: mstar: pll common
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 10.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/linux-chenxing/linux/commit/2c26aea472dc85f461af5a2e8a89894fc1e623a0
        git remote add linux-chenxing git://github.com/linux-chenxing/linux.git
        git fetch --no-tags linux-chenxing mstar_v5_14_rebase_i2_drm
        git checkout 2c26aea472dc85f461af5a2e8a89894fc1e623a0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=s390 

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

   In file included from drivers/clk/mstar/clk-msc313-upll.c:6:
   drivers/clk/mstar/clk-msc313-upll.c: In function 'msc313_upll_driver_init':
>> include/linux/device/driver.h:288:20: warning: passing argument 1 of '__platform_driver_register' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     288 |  return __register(&(__driver) , ##__VA_ARGS__); \
         |                    ^~~~~~~~~~~
   include/linux/platform_device.h:224:29: note: in definition of macro 'platform_driver_register'
     224 |  __platform_driver_register(drv, THIS_MODULE)
         |                             ^~~
   include/linux/platform_device.h:264:2: note: in expansion of macro 'builtin_driver'
     264 |  builtin_driver(__platform_driver, platform_driver_register)
         |  ^~~~~~~~~~~~~~
   drivers/clk/mstar/clk-msc313-upll.c:88:1: note: in expansion of macro 'builtin_platform_driver'
      88 | builtin_platform_driver(msc313_upll_driver);
         | ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_device.h:225:39: note: expected 'struct platform_driver *' but argument is of type 'const struct platform_driver *'
     225 | extern int __platform_driver_register(struct platform_driver *,
         |                                       ^~~~~~~~~~~~~~~~~~~~~~~~


vim +288 include/linux/device/driver.h

4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  269  
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  270  /**
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  271   * builtin_driver() - Helper macro for drivers that don't do anything
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  272   * special in init and have no exit. This eliminates some boilerplate.
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  273   * Each driver may only use this macro once, and calling it replaces
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  274   * device_initcall (or in some cases, the legacy __initcall).  This is
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  275   * meant to be a direct parallel of module_driver() above but without
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  276   * the __exit stuff that is not used for builtin cases.
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  277   *
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  278   * @__driver: driver name
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  279   * @__register: register function for this driver type
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  280   * @...: Additional arguments to be passed to __register
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  281   *
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  282   * Use this macro to construct bus specific macros for registering
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  283   * drivers, and do not use it on its own.
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  284   */
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  285  #define builtin_driver(__driver, __register, ...) \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  286  static int __init __driver##_init(void) \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  287  { \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 @288  	return __register(&(__driver) , ##__VA_ARGS__); \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  289  } \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  290  device_initcall(__driver##_init);
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09  291  

:::::: The code at line 288 was first introduced by commit
:::::: 4c002c978b7f2f2306d53de051c054504af920a9 device.h: move 'struct driver' stuff out to device/driver.h

:::::: TO: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

                 reply	other threads:[~2021-07-18 21:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202107190555.ciD4J51d-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=daniel@0x0f.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox