Commit e5f12a3
rtc: rv3028: Fix codestyle errors
Compiler warnings:
drivers/rtc/rtc-rv3028.c: In function 'rv3028_param_set':
drivers/rtc/rtc-rv3028.c:559:20: warning: statement will never be executed [-Wswitch-unreachable]
559 | u8 mode;
| ^~~~
drivers/rtc/rtc-rv3028.c: In function 'rv3028_param_get':
drivers/rtc/rtc-rv3028.c:526:21: warning: statement will never be executed [-Wswitch-unreachable]
526 | u32 value;
| ^~~~~
Fix it by moving the variable declaration to the beginning of the function.
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-rtc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: Ke Sun <sunke@kylinos.cn>
Link: https://lore.kernel.org/r/20221008071321.1799971-1-sunke@kylinos.cn
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>1 parent 4919d3e commit e5f12a3
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| 524 | + | |
524 | 525 | | |
525 | 526 | | |
526 | | - | |
527 | | - | |
528 | 527 | | |
529 | 528 | | |
530 | 529 | | |
| |||
554 | 553 | | |
555 | 554 | | |
556 | 555 | | |
| 556 | + | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | 559 | | |
561 | 560 | | |
562 | 561 | | |
| |||
0 commit comments