From: Julia Lawall <julia.lawall@lip6.fr>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: a.zummo@towertech.it, alexandre.belloni@free-electrons.com,
rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] rtc: pcf2123: Add missing error code assignment before test
Date: Tue, 9 Aug 2016 14:03:35 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.10.1608091403050.2911@hadrien> (raw)
In-Reply-To: <1470743907-11498-1-git-send-email-christophe.jaillet@wanadoo.fr>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1764 bytes --]
On Tue, 9 Aug 2016, Christophe JAILLET wrote:
> It is likely that checking the result of 'pcf2123_write_reg' is expected
> here.
> Also fix a small style issue. The '{' at the beginning of the function
> is misplaced.
They shouldn't be in the same patch. If you are wrong about the ret
issue, the { should still be moved.
julia
>
> Fixes: 809b453b76e15 ("rtc: pcf2123: clean up writes to the rtc chip")
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/rtc/rtc-pcf2123.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c
> index b4478cc92b55..8895f77726e8 100644
> --- a/drivers/rtc/rtc-pcf2123.c
> +++ b/drivers/rtc/rtc-pcf2123.c
> @@ -182,7 +182,8 @@ static ssize_t pcf2123_show(struct device *dev, struct device_attribute *attr,
> }
>
> static ssize_t pcf2123_store(struct device *dev, struct device_attribute *attr,
> - const char *buffer, size_t count) {
> + const char *buffer, size_t count)
> +{
> struct pcf2123_sysfs_reg *r;
> unsigned long reg;
> unsigned long val;
> @@ -199,7 +200,7 @@ static ssize_t pcf2123_store(struct device *dev, struct device_attribute *attr,
> if (ret)
> return ret;
>
> - pcf2123_write_reg(dev, reg, val);
> + ret = pcf2123_write_reg(dev, reg, val);
> if (ret < 0)
> return -EIO;
> return count;
> --
> 2.7.4
>
>
> ---
> L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
> https://www.avast.com/antivirus
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2016-08-09 12:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-09 11:58 Christophe JAILLET
2016-08-09 12:03 ` Julia Lawall [this message]
2016-08-09 12:17 ` [rtc-linux] " Alexandre Belloni
2016-08-09 12:05 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.10.1608091403050.2911@hadrien \
--to=julia.lawall@lip6.fr \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®