rtc: ds1685: actually spin forever in poweroff path
authorJosh Poimboeuf <jpoimboe@redhat.com>
Fri, 15 Apr 2016 14:21:10 +0000 (09:21 -0500)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Fri, 20 May 2016 10:33:51 +0000 (12:33 +0200)
objtool reports the following warning:

  drivers/rtc/rtc-ds1685.o: warning: objtool: ds1685_rtc_poweroff() falls through to next function ds1685_rtc_work_queue()

Similar to commit 361c6ed6b153 ("rtc: ds1685: actually spin forever in
poweroff error path"), there's another unreachable() annotation which is
actually reachable, which we missed the first time.

Actually spin forever to be consistent with the comment and to make the
unreachable() annotation guaranteed to be unreachable.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-ds1685.c

index 2698d8ffe4fdb6d332a7716b2ac191953ad3b3b7..b3ce3c652fcd0a9211690533ed9a940978fa67f8 100644 (file)
@@ -2211,6 +2211,7 @@ ds1685_rtc_poweroff(struct platform_device *pdev)
                           (ctrl4a | RTC_CTRL_4A_PAB));
 
                /* Spin ... we do not switch back to bank0. */
+               while(1);
                unreachable();
        }
 }
This page took 0.02742 seconds and 5 git commands to generate.