From: kernel test robot <lkp@intel.com>
To: Dhaval Shiroya <dhaval.shiroya@siliconsignals.io>,
alexandre.belloni@bootlin.com
Cc: 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 09:34:32 +0800 [thread overview]
Message-ID: <202608250920.y0Rb4vg9-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: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20260825/202608250920.y0Rb4vg9-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260825/202608250920.y0Rb4vg9-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/202608250920.y0Rb4vg9-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/acpi.h:15,
from include/linux/i2c.h:13,
from drivers/rtc/rtc-rv3028.c:15:
drivers/rtc/rtc-rv3028.c: In function 'rv3028_set_bsm_from_dt':
>> drivers/rtc/rtc-rv3028.c:906:18: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'long unsigned int' [-Wformat=]
906 | "setting backup switch mode to %u (reg 0x37: 0x%02x -> 0x%02x)\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:160:58: note: in expansion of macro 'dev_fmt'
160 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/rtc/rtc-rv3028.c:905:9: note: in expansion of macro 'dev_info'
905 | dev_info(&client->dev,
| ^~~~~~~~
drivers/rtc/rtc-rv3028.c:906:78: note: format string is defined here
906 | "setting backup switch mode to %u (reg 0x37: 0x%02x -> 0x%02x)\n",
| ~~~^
| |
| unsigned int
| %02lx
vim +906 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
prev parent reply other threads:[~2026-08-25 1:35 UTC|newest]
Thread overview: 7+ 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-26 6:37 ` Dhaval Shiroya
2026-08-26 6:57 ` Alexandre Belloni
2026-08-24 23:05 ` kernel test robot
2026-08-25 1:34 ` kernel test robot [this message]
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=202608250920.y0Rb4vg9-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=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 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.