From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <JBeulich@suse.com>,
David Vrabel <david.vrabel@citrix.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] xen/manage: correct return value check on xenbus_scanf()
Date: Tue, 8 Nov 2016 08:51:11 +0100 [thread overview]
Message-ID: <e2f00464-7570-0c40-7401-6bc99ae54ee2@suse.com> (raw)
In-Reply-To: <58219077020000780011CF59@suse.com>
On 08/11/16 08:44, Jan Beulich wrote:
> A negative return value indicates an error; in fact the function at
> present won't ever return zero.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
> ---
> v2: For consistency with other code don't consider zero an error
> (utilizing that xenbus_scanf() at present won't return zero).
> Adjust commit message accordingly.
> ---
> drivers/xen/manage.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- 4.9-rc4/drivers/xen/manage.c
> +++ 4.9-rc4-xen-manage-xenbus_scanf/drivers/xen/manage.c
> @@ -277,7 +277,7 @@ static void sysrq_handler(struct xenbus_
> err = xenbus_transaction_start(&xbt);
> if (err)
> return;
> - if (!xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key)) {
> + if (xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key) < 0) {
> pr_err("Unable to read sysrq code in control/sysrq\n");
> xenbus_transaction_end(xbt, 1);
> return;
>
>
next parent reply other threads:[~2016-11-08 7:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <58219077020000780011CF59@suse.com>
2016-11-08 7:51 ` Juergen Gross [this message]
2016-11-08 7:44 Jan Beulich
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=e2f00464-7570-0c40-7401-6bc99ae54ee2@suse.com \
--to=jgross@suse.com \
--cc=JBeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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®