REG_OFFSET is defined both here and in arch/arm/mach-ixp4xx/, which causes a build warning, so rename this macro in the RTC driver. ../drivers/rtc/rtc-pcf8523.c:44: warning: "REG_OFFSET" redefined 44 | #define REG_OFFSET 0x0e ../arch/arm/mach-ixp4xx/include/mach/platform.h:25: note: this is the location of the previous definition 25 | #define REG_OFFSET 3 Fixes: bc3bee025272 ("rtc: pcf8523: add support for trimming the RTC oscillator") Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Reported-by: kernel test robot <lkp@xxxxxxxxx> Cc: Russell King <rmk+kernel@xxxxxxxxxxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Cc: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx> Cc: linux-rtc@xxxxxxxxxxxxxxx --- drivers/rtc/rtc-pcf8523.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- linux-next-20210604.orig/drivers/rtc/rtc-pcf8523.c +++ linux-next-20210604/drivers/rtc/rtc-pcf8523.c @@ -41,7 +41,7 @@ #define REG_WEEKDAY_ALARM 0x0d #define ALARM_DIS BIT(7) -#define REG_OFFSET 0x0e +#define REG_OFFSET_TUNE 0x0e /* offset register is used for tuning */ #define REG_OFFSET_MODE BIT(7) #define REG_TMR_CLKOUT_CTRL 0x0f @@ -442,7 +442,7 @@ static int pcf8523_rtc_read_offset(struc u8 value; s8 val; - err = pcf8523_read(client, REG_OFFSET, &value); + err = pcf8523_read(client, REG_OFFSET_TUNE, &value); if (err < 0) return err; @@ -467,7 +467,7 @@ static int pcf8523_rtc_set_offset(struct else value = (reg_m1 & 0x7f) | REG_OFFSET_MODE; - return pcf8523_write(client, REG_OFFSET, value); + return pcf8523_write(client, REG_OFFSET_TUNE, value); } static const struct rtc_class_ops pcf8523_rtc_ops = {