浏览代码

rtc: ds1685: actually spin forever in poweroff path

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>
Josh Poimboeuf 9 年之前
父节点
当前提交
19105f424b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/rtc/rtc-ds1685.c

+ 1 - 0
drivers/rtc/rtc-ds1685.c

@@ -2211,6 +2211,7 @@ ds1685_rtc_poweroff(struct platform_device *pdev)
 			   (ctrl4a | RTC_CTRL_4A_PAB));
 			   (ctrl4a | RTC_CTRL_4A_PAB));
 
 
 		/* Spin ... we do not switch back to bank0. */
 		/* Spin ... we do not switch back to bank0. */
+		while(1);
 		unreachable();
 		unreachable();
 	}
 	}
 }
 }