|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/pcifront: move xenstore config scanning into sub-function
On 06.10.22 15:29, Jason Andryuk wrote: On Thu, Oct 6, 2022 at 5:29 AM Juergen Gross <jgross@xxxxxxxx> 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 a function call. Put that code into a new sub-function. 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@xxxxxxxx> --- drivers/pci/xen-pcifront.c | 133 +++++++++++-------------------------- 1 file changed, 40 insertions(+), 93 deletions(-) diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 689271c4245c..a68e47dcdd7e 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c @@ -819,76 +819,79 @@ static int pcifront_publish_info(struct pcifront_device *pdev) Hmm, with some more pcifront_rescan_root() adaption this will make it possible to drop even more code (i.e. the CONFIG_PCI_DOMAINS check in pcifront_rescan_root(), as the one in pcifront_scan_root() would be enough then). I'll send out V2 soon. Regardless of the above idea: Reviewed-by: Jason Andryuk <jandryuk@xxxxxxxxx> Thanks. As I'm about to change the patch, I'll drop the R-b. Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |