Skip to content

Commit bf3159c

Browse files
committed
clocksource/drivers/imx: Fix -Wunused-but-set-variable warning
All warnings (new ones prefixed by >>): drivers/clocksource/timer-imx-gpt.c: In function 'mxc_timer_interrupt': >> drivers/clocksource/timer-imx-gpt.c:279:18: warning: variable 'tstat' set but not used [-Wunused-but-set-variable] 279 | uint32_t tstat; | ^~~~~ vim +/tstat +279 drivers/clocksource/timer-imx-gpt.c The change remove the tstats assignment but not the reading of the register, assuming the register may be a ROR (Reset On Read) which happens in the driver's interrupt registers. Fixes: df181e3 ("clocksource/drivers/imx-gpt: Add support for ARM64") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 71fee48 commit bf3159c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/clocksource/timer-imx-gpt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,8 @@ static irqreturn_t mxc_timer_interrupt(int irq, void *dev_id)
258258
{
259259
struct clock_event_device *ced = dev_id;
260260
struct imx_timer *imxtm = to_imx_timer(ced);
261-
uint32_t tstat;
262261

263-
tstat = readl_relaxed(imxtm->base + imxtm->gpt->reg_tstat);
262+
readl_relaxed(imxtm->base + imxtm->gpt->reg_tstat);
264263

265264
imxtm->gpt->gpt_irq_acknowledge(imxtm);
266265

0 commit comments

Comments
 (0)