* [PATCH] rtc: simplify the return expression of rx8025_set_offset()
@ 2022-05-05 2:23 cgel.zte
2022-05-10 13:48 ` Nobuhiro Iwamatsu
2022-05-17 22:18 ` Alexandre Belloni
0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-05-05 2:23 UTC (permalink / raw)
To: a.zummo
Cc: alexandre.belloni, linux-rtc, linux-kernel, Minghao Chi, Zeal Robot
From: Minghao Chi <chi.minghao@zte.com.cn>
Simplify the return expression.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
drivers/rtc/rtc-rx8025.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c
index 5bfdd34a72ff..b32117ccd74b 100644
--- a/drivers/rtc/rtc-rx8025.c
+++ b/drivers/rtc/rtc-rx8025.c
@@ -436,7 +436,6 @@ static int rx8025_set_offset(struct device *dev, long offset)
{
struct i2c_client *client = to_i2c_client(dev);
u8 digoff;
- int err;
offset /= RX8025_ADJ_RESOLUTION;
if (offset > RX8025_ADJ_DATA_MAX)
@@ -449,11 +448,7 @@ static int rx8025_set_offset(struct device *dev, long offset)
offset += 128;
digoff = offset;
- err = rx8025_write_reg(client, RX8025_REG_DIGOFF, digoff);
- if (err)
- return err;
-
- return 0;
+ return rx8025_write_reg(client, RX8025_REG_DIGOFF, digoff);
}
static const struct rtc_class_ops rx8025_rtc_ops = {
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rtc: simplify the return expression of rx8025_set_offset()
2022-05-05 2:23 [PATCH] rtc: simplify the return expression of rx8025_set_offset() cgel.zte
@ 2022-05-10 13:48 ` Nobuhiro Iwamatsu
2022-05-17 22:18 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Nobuhiro Iwamatsu @ 2022-05-10 13:48 UTC (permalink / raw)
To: cgel.zte
Cc: Alessandro Zummo, Alexandre Belloni, linux-rtc,
Linux Kernel Mailing List, Minghao Chi, Zeal Robot
Hi,
2022年5月5日(木) 11:23 <cgel.zte@gmail.com>:
>
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Simplify the return expression.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
> drivers/rtc/rtc-rx8025.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Best regards,
Nobuhiro
--
Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org / kernel.org}
GPG ID: 40AD1FA6
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rtc: simplify the return expression of rx8025_set_offset()
2022-05-05 2:23 [PATCH] rtc: simplify the return expression of rx8025_set_offset() cgel.zte
2022-05-10 13:48 ` Nobuhiro Iwamatsu
@ 2022-05-17 22:18 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2022-05-17 22:18 UTC (permalink / raw)
To: a.zummo, cgel.zte; +Cc: linux-kernel, linux-rtc, Minghao Chi, Zeal Robot
On Thu, 5 May 2022 02:23:14 +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Simplify the return expression.
>
>
Applied, thanks!
[1/1] rtc: simplify the return expression of rx8025_set_offset()
commit: bce7a01ada6456d00c69cd816357ded268ad780c
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-17 22:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 2:23 [PATCH] rtc: simplify the return expression of rx8025_set_offset() cgel.zte
2022-05-10 13:48 ` Nobuhiro Iwamatsu
2022-05-17 22:18 ` Alexandre Belloni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.