Skip to content

Commit 03d7a73

Browse files
Tom Rixalexandrebelloni
authored andcommitted
rtc: mpfs: remove 'pending' variable from mpfs_rtc_wakeup_irq_handler()
cppcheck reports [drivers/rtc/rtc-mpfs.c:219]: (style) Variable 'pending' is assigned a value that is never used. The fetched CONTROL_REG stored in pending is unused and partially duplicates the functionality of the later call to mpfs_rtc_clear(). This looks like leftover development code, so remove pending. Fixes: 0b31d70 ("rtc: Add driver for Microchip PolarFire SoC") Signed-off-by: Tom Rix <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent bb42b7e commit 03d7a73

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/rtc/rtc-mpfs.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,7 @@ static inline struct clk *mpfs_rtc_init_clk(struct device *dev)
213213
static irqreturn_t mpfs_rtc_wakeup_irq_handler(int irq, void *dev)
214214
{
215215
struct mpfs_rtc_dev *rtcdev = dev;
216-
unsigned long pending;
217216

218-
pending = readl(rtcdev->base + CONTROL_REG);
219-
pending &= CONTROL_ALARM_ON_BIT;
220217
mpfs_rtc_clear_irq(rtcdev);
221218

222219
rtc_update_irq(rtcdev->rtc, 1, RTC_IRQF | RTC_AF);

0 commit comments

Comments
 (0)