oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: drivers/rtc/rtc-ds3232.c:482:32: warning: 'ds3232_pm_ops' defined but not used
Date: Fri, 17 Nov 2023 23:45:45 +0800	[thread overview]
Message-ID: <202311172325.33tTniaJ-lkp@intel.com> (raw)

Hi Akinobu,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6bc40e44f1ddef16a787f3501b97f1fff909177c
commit: 080481f54ef621211d6c75a03dc652fb6ed04222 rtc: merge ds3232 and ds3234
date:   8 years ago
config: x86_64-buildonly-randconfig-001-20231012 (https://download.01.org/0day-ci/archive/20231117/202311172325.33tTniaJ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231117/202311172325.33tTniaJ-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311172325.33tTniaJ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   include/linux/sysfs.h:517:44: warning: pointer targets in passing argument 2 of 'kernfs_find_and_get' differ in signedness [-Wpointer-sign]
     517 |         return kernfs_find_and_get(parent, name);
         |                                            ^~~~
         |                                            |
         |                                            const unsigned char *
   In file included from include/linux/sysfs.h:15:
   include/linux/kernfs.h:434:57: note: expected 'const char *' but argument is of type 'const unsigned char *'
     434 | kernfs_find_and_get(struct kernfs_node *kn, const char *name)
         |                                             ~~~~~~~~~~~~^~~~
   drivers/rtc/rtc-ds3232.c: In function 'ds3232_check_rtc_status':
   drivers/rtc/rtc-ds3232.c:72:58: warning: pointer targets in passing argument 3 of 'regmap_read' differ in signedness [-Wpointer-sign]
      72 |         ret = regmap_read(ds3232->regmap, DS3232_REG_SR, &stat);
         |                                                          ^~~~~
         |                                                          |
         |                                                          int *
   In file included from drivers/rtc/rtc-ds3232.c:25:
   include/linux/regmap.h:689:69: note: expected 'unsigned int *' but argument is of type 'int *'
     689 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
         |                                                       ~~~~~~~~~~~~~~^~~
   drivers/rtc/rtc-ds3232.c:92:58: warning: pointer targets in passing argument 3 of 'regmap_read' differ in signedness [-Wpointer-sign]
      92 |         ret = regmap_read(ds3232->regmap, DS3232_REG_CR, &control);
         |                                                          ^~~~~~~~
         |                                                          |
         |                                                          int *
   include/linux/regmap.h:689:69: note: expected 'unsigned int *' but argument is of type 'int *'
     689 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
         |                                                       ~~~~~~~~~~~~~~^~~
   drivers/rtc/rtc-ds3232.c: In function 'ds3232_read_alarm':
   drivers/rtc/rtc-ds3232.c:195:58: warning: pointer targets in passing argument 3 of 'regmap_read' differ in signedness [-Wpointer-sign]
     195 |         ret = regmap_read(ds3232->regmap, DS3232_REG_SR, &stat);
         |                                                          ^~~~~
         |                                                          |
         |                                                          int *
   include/linux/regmap.h:689:69: note: expected 'unsigned int *' but argument is of type 'int *'
     689 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
         |                                                       ~~~~~~~~~~~~~~^~~
   drivers/rtc/rtc-ds3232.c:198:58: warning: pointer targets in passing argument 3 of 'regmap_read' differ in signedness [-Wpointer-sign]
     198 |         ret = regmap_read(ds3232->regmap, DS3232_REG_CR, &control);
         |                                                          ^~~~~~~~
         |                                                          |
         |                                                          int *
   include/linux/regmap.h:689:69: note: expected 'unsigned int *' but argument is of type 'int *'
     689 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
         |                                                       ~~~~~~~~~~~~~~^~~
   drivers/rtc/rtc-ds3232.c: In function 'ds3232_set_alarm':
   drivers/rtc/rtc-ds3232.c:247:58: warning: pointer targets in passing argument 3 of 'regmap_read' differ in signedness [-Wpointer-sign]
     247 |         ret = regmap_read(ds3232->regmap, DS3232_REG_CR, &control);
         |                                                          ^~~~~~~~
         |                                                          |
         |                                                          int *
   include/linux/regmap.h:689:69: note: expected 'unsigned int *' but argument is of type 'int *'
     689 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
         |                                                       ~~~~~~~~~~~~~~^~~
   drivers/rtc/rtc-ds3232.c:256:58: warning: pointer targets in passing argument 3 of 'regmap_read' differ in signedness [-Wpointer-sign]
     256 |         ret = regmap_read(ds3232->regmap, DS3232_REG_SR, &stat);
         |                                                          ^~~~~
         |                                                          |
         |                                                          int *
   include/linux/regmap.h:689:69: note: expected 'unsigned int *' but argument is of type 'int *'
     689 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
         |                                                       ~~~~~~~~~~~~~~^~~
   drivers/rtc/rtc-ds3232.c: In function 'ds3232_update_alarm':
   drivers/rtc/rtc-ds3232.c:288:34: warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits]
     288 |         buf[0] = bcd2bin(buf[0]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ?
         |                                  ^
   drivers/rtc/rtc-ds3232.c:290:34: warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits]
     290 |         buf[1] = bcd2bin(buf[1]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ?
         |                                  ^
   drivers/rtc/rtc-ds3232.c:292:34: warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits]
     292 |         buf[2] = bcd2bin(buf[2]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ?
         |                                  ^
   drivers/rtc/rtc-ds3232.c:294:34: warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits]
     294 |         buf[3] = bcd2bin(buf[3]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ?
         |                                  ^
   drivers/rtc/rtc-ds3232.c:301:58: warning: pointer targets in passing argument 3 of 'regmap_read' differ in signedness [-Wpointer-sign]
     301 |         ret = regmap_read(ds3232->regmap, DS3232_REG_CR, &control);
         |                                                          ^~~~~~~~
         |                                                          |
         |                                                          int *
   include/linux/regmap.h:689:69: note: expected 'unsigned int *' but argument is of type 'int *'
     689 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
         |                                                       ~~~~~~~~~~~~~~^~~
   drivers/rtc/rtc-ds3232.c: In function 'ds3232_work':
   drivers/rtc/rtc-ds3232.c:359:58: warning: pointer targets in passing argument 3 of 'regmap_read' differ in signedness [-Wpointer-sign]
     359 |         ret = regmap_read(ds3232->regmap, DS3232_REG_SR, &stat);
         |                                                          ^~~~~
         |                                                          |
         |                                                          int *
   include/linux/regmap.h:689:69: note: expected 'unsigned int *' but argument is of type 'int *'
     689 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
         |                                                       ~~~~~~~~~~~~~~^~~
   drivers/rtc/rtc-ds3232.c:364:66: warning: pointer targets in passing argument 3 of 'regmap_read' differ in signedness [-Wpointer-sign]
     364 |                 ret = regmap_read(ds3232->regmap, DS3232_REG_CR, &control);
         |                                                                  ^~~~~~~~
         |                                                                  |
         |                                                                  int *
   include/linux/regmap.h:689:69: note: expected 'unsigned int *' but argument is of type 'int *'
     689 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
         |                                                       ~~~~~~~~~~~~~~^~~
   drivers/rtc/rtc-ds3232.c: At top level:
>> drivers/rtc/rtc-ds3232.c:482:32: warning: 'ds3232_pm_ops' defined but not used [-Wunused-const-variable=]
     482 | static const struct dev_pm_ops ds3232_pm_ops = {
         |                                ^~~~~~~~~~~~~


vim +/ds3232_pm_ops +482 drivers/rtc/rtc-ds3232.c

c93a3ae2d213ff Wang Dongsheng 2014-04-03  481  
c93a3ae2d213ff Wang Dongsheng 2014-04-03 @482  static const struct dev_pm_ops ds3232_pm_ops = {
c93a3ae2d213ff Wang Dongsheng 2014-04-03  483  	SET_SYSTEM_SLEEP_PM_OPS(ds3232_suspend, ds3232_resume)
c93a3ae2d213ff Wang Dongsheng 2014-04-03  484  };
c93a3ae2d213ff Wang Dongsheng 2014-04-03  485  

:::::: The code at line 482 was first introduced by commit
:::::: c93a3ae2d213ff75a279fe6e28d8f41ca7f01483 drivers/rtc/rtc-ds3232.c: enable ds3232 to work as wakeup source

:::::: TO: Wang Dongsheng <dongsheng.wang@freescale.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2023-11-17 15:46 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=202311172325.33tTniaJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akinobu.mita@gmail.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).