Linux RTC
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dhaval Shiroya <dhaval.shiroya@siliconsignals.io>,
	alexandre.belloni@bootlin.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Dhaval Shiroya <dhaval.shiroya@siliconsignals.io>,
	linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: rv3028: configure backup switch mode from device tree
Date: Tue, 25 Aug 2026 07:05:14 +0800	[thread overview]
Message-ID: <202608250645.zcZhAAz1-lkp@intel.com> (raw)
In-Reply-To: <20260822092911.318342-1-dhaval.shiroya@siliconsignals.io>

Hi Dhaval,

kernel test robot noticed the following build warnings:

[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on linus/master v7.2 next-20260821]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Dhaval-Shiroya/rtc-rv3028-configure-backup-switch-mode-from-device-tree/20260822-145911
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link:    https://lore.kernel.org/r/20260822092911.318342-1-dhaval.shiroya%40siliconsignals.io
patch subject: [PATCH] rtc: rv3028: configure backup switch mode from device tree
config: arm64-randconfig-002-20260825 (https://download.01.org/0day-ci/archive/20260825/202608250645.zcZhAAz1-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 935bfc708590c60147a79c7df145bb6e68b1d388)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260825/202608250645.zcZhAAz1-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/202608250645.zcZhAAz1-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/rtc/rtc-rv3028.c:908:4: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat]
     906 |                  "setting backup switch mode to %u (reg 0x37: 0x%02x -> 0x%02x)\n",
         |                                                                           ~~~~
         |                                                                           %02lx
     907 |                  bsm_dt, val_old,
     908 |                  (val_old & ~(RV3028_BACKUP_BSM | RV3028_BACKUP_FEDE)) |
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     909 |                  bsm_bits | RV3028_BACKUP_FEDE);
         |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:160:67: note: expanded from macro 'dev_info'
     160 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                                  ~~~     ^~~~~~~~~~~
   include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ~~~    ^~~~~~~~~~~
   1 warning generated.


vim +908 drivers/rtc/rtc-rv3028.c

   857	
   858	/*
   859	 * Configure backup switchover mode from device tree.
   860	 *   0 = disabled
   861	 *   1 = DSM (Direct Switching Mode)  - switch when VDD < VBACKUP
   862	 *   3 = LSM (Level Switching Mode)   - switch when VDD < 2.0V
   863	 */
   864	static int rv3028_set_bsm_from_dt(struct rv3028_data *rv3028,
   865					  struct i2c_client *client)
   866	{
   867		u32 val_old, bsm_dt, bsm_bits;
   868		int ret;
   869	
   870		if (device_property_read_u32(&client->dev, "backup-switch-mode",
   871					     &bsm_dt))
   872			return 0;
   873	
   874		/* Validate and convert DT value to register bits */
   875		switch (bsm_dt) {
   876		case 0:
   877			bsm_bits = 0;
   878			break;
   879		case 1:
   880			bsm_bits = FIELD_PREP(RV3028_BACKUP_BSM, RV3028_BACKUP_BSM_DSM);
   881			break;
   882		case 3:
   883			bsm_bits = FIELD_PREP(RV3028_BACKUP_BSM, RV3028_BACKUP_BSM_LSM);
   884			break;
   885		default:
   886			dev_warn(&client->dev,
   887				 "invalid backup-switch-mode %u (use 0, 1, or 3)\n",
   888				 bsm_dt);
   889			return 0;
   890		}
   891	
   892		/* Read current BACKUP register */
   893		ret = regmap_read(rv3028->regmap, RV3028_BACKUP, &val_old);
   894		if (ret < 0)
   895			return ret;
   896	
   897		/* Check if BSM and FEDE already match desired values */
   898		if ((val_old & (RV3028_BACKUP_BSM | RV3028_BACKUP_FEDE)) ==
   899		    (bsm_bits | RV3028_BACKUP_FEDE)) {
   900			dev_dbg(&client->dev,
   901				"backup switch mode already set to %u\n", bsm_dt);
   902			return 0;
   903		}
   904	
   905		dev_info(&client->dev,
   906			 "setting backup switch mode to %u (reg 0x37: 0x%02x -> 0x%02x)\n",
   907			 bsm_dt, val_old,
 > 908			 (val_old & ~(RV3028_BACKUP_BSM | RV3028_BACKUP_FEDE)) |
   909			 bsm_bits | RV3028_BACKUP_FEDE);
   910	
   911		/* Set BSM and always enable FEDE as recommended by datasheet */
   912		return rv3028_update_cfg(rv3028, RV3028_BACKUP,
   913					 RV3028_BACKUP_BSM | RV3028_BACKUP_FEDE,
   914					 bsm_bits | RV3028_BACKUP_FEDE);
   915	}
   916	

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

  parent reply	other threads:[~2026-08-24 23:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-22  9:29 [PATCH] rtc: rv3028: configure backup switch mode from device tree Dhaval Shiroya
2026-08-22  9:39 ` sashiko-bot
2026-08-22 13:09 ` Alexandre Belloni
2026-08-24 23:05 ` kernel test robot [this message]
2026-08-25  1:34 ` kernel test robot

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=202608250645.zcZhAAz1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=dhaval.shiroya@siliconsignals.io \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --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