From: Yu Watanabe Date: Tue, 1 Aug 2023 02:08:43 +0000 (+0900) Subject: udev-builtin-net_id: drop unused arguments X-Git-Tag: v255-rc1~849^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc999c0346e27683c3e38487386d307071af4f85;p=thirdparty%2Fsystemd.git udev-builtin-net_id: drop unused arguments --- diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index e538fc7d941..64215834cb7 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -266,13 +266,12 @@ static int pci_get_onboard_index(sd_device *dev, unsigned *ret) { return 0; } -static int dev_pci_onboard(sd_device *dev, const LinkInfo *info, NetNames *names) { +static int dev_pci_onboard(sd_device *dev, NetNames *names) { _cleanup_free_ char *port = NULL; unsigned idx = 0; /* avoid false maybe-uninitialized warning */ int r; assert(dev); - assert(info); assert(names); /* retrieve on-board index number and label from firmware */ @@ -563,13 +562,12 @@ static int get_pci_slot_specifiers( return 0; } -static int dev_pci_slot(sd_device *dev, const LinkInfo *info, NetNames *names) { +static int dev_pci_slot(sd_device *dev, NetNames *names) { _cleanup_free_ char *domain = NULL, *bus_and_slot = NULL, *func = NULL, *port = NULL; uint32_t hotplug_slot = 0; /* avoid false maybe-uninitialized warning */ int r; assert(dev); - assert(info); assert(names); r = get_pci_slot_specifiers(names->pcidev, &domain, &bus_and_slot, &func); @@ -847,7 +845,7 @@ static int names_devicetree(sd_device *dev, const char *prefix, bool test) { return -ENOENT; } -static int names_pci(sd_device *dev, const LinkInfo *info, NetNames *names) { +static int names_pci(sd_device *dev, NetNames *names) { _cleanup_(sd_device_unrefp) sd_device *physfn_pcidev = NULL; _cleanup_free_ char *virtfn_suffix = NULL; sd_device *parent; @@ -855,7 +853,6 @@ static int names_pci(sd_device *dev, const LinkInfo *info, NetNames *names) { int r; assert(dev); - assert(info); assert(names); r = sd_device_get_parent(dev, &parent); @@ -884,8 +881,8 @@ static int names_pci(sd_device *dev, const LinkInfo *info, NetNames *names) { /* If this is an SR-IOV virtual device, get base name using physical device and add virtfn suffix. */ vf_names.pcidev = physfn_pcidev; - dev_pci_onboard(dev, info, &vf_names); - dev_pci_slot(dev, info, &vf_names); + dev_pci_onboard(dev, &vf_names); + dev_pci_slot(dev, &vf_names); if (vf_names.pci_onboard[0]) if (strlen(vf_names.pci_onboard) + strlen(virtfn_suffix) < sizeof(names->pci_onboard)) @@ -900,8 +897,8 @@ static int names_pci(sd_device *dev, const LinkInfo *info, NetNames *names) { strscpyl(names->pci_path, sizeof(names->pci_path), vf_names.pci_path, virtfn_suffix, NULL); } else { - dev_pci_onboard(dev, info, names); - dev_pci_slot(dev, info, names); + dev_pci_onboard(dev, names); + dev_pci_slot(dev, names); } return 0; @@ -1343,7 +1340,7 @@ static int builtin_net_id(UdevEvent *event, int argc, char *argv[], bool test) { (void) names_xen(dev, prefix, test); /* get PCI based path names */ - r = names_pci(dev, &info, &names); + r = names_pci(dev, &names); if (r < 0) { /* * check for usb devices that are not off pci interfaces to