2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 08:44:14 +08:00

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: 0b31d70359 ("rtc: Add driver for Microchip PolarFire SoC")
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220627205943.2075043-1-trix@redhat.com
This commit is contained in:
Tom Rix 2022-06-27 16:59:43 -04:00 committed by Alexandre Belloni
parent bb42b7e9e3
commit 03d7a73281

View File

@ -213,10 +213,7 @@ static inline struct clk *mpfs_rtc_init_clk(struct device *dev)
static irqreturn_t mpfs_rtc_wakeup_irq_handler(int irq, void *dev)
{
struct mpfs_rtc_dev *rtcdev = dev;
unsigned long pending;
pending = readl(rtcdev->base + CONTROL_REG);
pending &= CONTROL_ALARM_ON_BIT;
mpfs_rtc_clear_irq(rtcdev);
rtc_update_irq(rtcdev->rtc, 1, RTC_IRQF | RTC_AF);