Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1379859 > unrolled thread

[PATCH] rtc: ds1685: actually spin forever in poweroff path, part 2

Started byJosh Poimboeuf <jpoimboe@redhat.com>
First post2016-04-15 16:30 +0200
Last post2016-04-19 00:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] rtc: ds1685: actually spin forever in poweroff path, part 2 Josh Poimboeuf <jpoimboe@redhat.com> - 2016-04-15 16:30 +0200
    Re: [PATCH] rtc: ds1685: actually spin forever in poweroff path,  part 2 Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-04-19 00:40 +0200

#1379859 — [PATCH] rtc: ds1685: actually spin forever in poweroff path, part 2

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2016-04-15 16:30 +0200
Subject[PATCH] rtc: ds1685: actually spin forever in poweroff path, part 2
Message-ID<rocUW-4mc-13@gated-at.bofh.it>
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>
---
 drivers/rtc/rtc-ds1685.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c
index 1e6cfc8..0255808 100644
--- a/drivers/rtc/rtc-ds1685.c
+++ b/drivers/rtc/rtc-ds1685.c
@@ -2213,6 +2213,7 @@ ds1685_rtc_poweroff(struct platform_device *pdev)
 			   (ctrl4a | RTC_CTRL_4A_PAB));
 
 		/* Spin ... we do not switch back to bank0. */
+		while(1);
 		unreachable();
 	}
 }
-- 
2.4.11

[toc] | [next] | [standalone]


#1382091 — Re: [PATCH] rtc: ds1685: actually spin forever in poweroff path, part 2

FromAlexandre Belloni <alexandre.belloni@free-electrons.com>
Date2016-04-19 00:40 +0200
SubjectRe: [PATCH] rtc: ds1685: actually spin forever in poweroff path, part 2
Message-ID<rppZM-4Ug-25@gated-at.bofh.it>
In reply to#1379859
On 15/04/2016 at 09:21:10 -0500, Josh Poimboeuf wrote :
> 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>
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web