All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <jbeulich@suse.com>, Juergen Gross <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] xen/privcmd: fix error handling in mmap-resource processing
Date: Wed, 22 Sep 2021 09:29:17 -0400	[thread overview]
Message-ID: <c0c84258-c2ee-f58c-ae9a-5f8bdd75f0db@oracle.com> (raw)
In-Reply-To: <aa6d6a67-6889-338a-a910-51e889f792d5@suse.com>


On 9/22/21 6:17 AM, Jan Beulich wrote:
> @@ -817,7 +818,7 @@ static long privcmd_ioctl_mmap_resource(
>  			unsigned int i;
>  
>  			for (i = 0; i < num; i++) {
> -				rc = pfns[i];
> +				rc = errs[i];
>  				if (rc < 0)
>  					break;


Can the assignment be moved inside the 'if' statement?


I am also not sure I understand why we need error array at all. Don't we always look at the first error only? In fact, AFAICS this is the only place where we look at the value.


-boris


  reply	other threads:[~2021-09-22 13:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 10:14 [PATCH 0/3] xen/privcmd: misc corrections Jan Beulich
2021-09-22 10:16 ` [PATCH RFC 1/3] xen/privcmd: replace kcalloc() by kvcalloc() when allocating empty pages Jan Beulich
2021-09-23 12:30   ` Juergen Gross
2021-09-22 10:17 ` [PATCH 2/3] xen/privcmd: fix error handling in mmap-resource processing Jan Beulich
2021-09-22 13:29   ` Boris Ostrovsky [this message]
2021-09-22 13:39     ` Jan Beulich
2021-09-22 13:56       ` Boris Ostrovsky
2021-09-22 10:18 ` [PATCH 3/3] xen/privcmd: drop "pages" parameter from xen_remap_pfn() Jan Beulich
2021-09-22 14:02   ` Boris Ostrovsky
2021-10-05  6:39 ` [PATCH 0/3] xen/privcmd: misc corrections Juergen Gross

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=c0c84258-c2ee-f58c-ae9a-5f8bdd75f0db@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sstabellini@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 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.