From: Jason Andryuk <jandryuk@gmail.com>
To: Juergen Gross <jgross@suse.com>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
Stefano Stabellini <sstabellini@kernel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
Bjorn Helgaas <bhelgaas@google.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] xen/pcifront: move xenstore config scanning into sub-function
Date: Thu, 6 Oct 2022 12:27:09 -0400 [thread overview]
Message-ID: <CAKf6xpvUat2HP_WO=LSxLC46=KN2exSmqn+DWHTN74HK6H2HLQ@mail.gmail.com> (raw)
In-Reply-To: <20221006153440.18049-1-jgross@suse.com>
On Thu, Oct 6, 2022 at 11:35 AM Juergen Gross <jgross@suse.com> wrote:
>
> pcifront_try_connect() and pcifront_attach_devices() share a large
> chunk of duplicated code for reading the config information from
> Xenstore, which only differs regarding calling pcifront_rescan_root()
> or pcifront_scan_root().
>
> Put that code into a new sub-function. It is fine to always call
> pcifront_rescan_root() from that common function, as it will fallback
> to pcifront_scan_root() if the domain/bus combination isn't known
> yet (and pcifront_scan_root() should never be called for an already
> kneon domain/bus combination anyway). In order to avoid duplicate
known
> messages for the fallback case move the check for domain/bus not knwon
known
> to the beginning of pcifront_rescan_root().
>
> While at it fix the error reporting in case the root-xx node had the
> wrong format.
>
> As the return value of pcifront_try_connect() and
> pcifront_attach_devices() are not used anywhere make those functions
> return void. As an additional bonus this removes the dubious return
> of -EFAULT in case of an unexpected driver state.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jason Andryuk <jandryuk@gmail.com>
prev parent reply other threads:[~2022-10-06 16:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 15:34 [PATCH v2] xen/pcifront: move xenstore config scanning into sub-function Juergen Gross
2022-10-06 16:27 ` Jason Andryuk [this message]
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='CAKf6xpvUat2HP_WO=LSxLC46=KN2exSmqn+DWHTN74HK6H2HLQ@mail.gmail.com' \
--to=jandryuk@gmail.com \
--cc=bhelgaas@google.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=oleksandr_tyshchenko@epam.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).