summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2022-10-06 10:50:28 +0200
committerJuergen Gross <jgross@suse.com>2022-10-07 07:36:44 +0200
commit2849752f36848359034616eb70dfc7fb14eb3cd4 (patch)
tree3cc37f6738390fb96bf5eee88db81cf01d6be99e /drivers/xen
parent5c13a4a0291b30191eff9ead8d010e1ca43a4d0c (diff)
downloadlinux-2849752f36848359034616eb70dfc7fb14eb3cd4.tar.bz2
xen/pcifront: move xenstore config scanning into sub-function
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 known domain/bus combination anyway). In order to avoid duplicate messages for the fallback case move the check for domain/bus not 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> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen')
0 files changed, 0 insertions, 0 deletions