]> mj.ucw.cz Git - pciutils.git/commitdiff
Fix compile warnings about unused variables
authorPali Rohár <pali@kernel.org>
Sun, 10 Sep 2023 16:48:16 +0000 (18:48 +0200)
committerPali Rohár <pali@kernel.org>
Sun, 10 Sep 2023 16:48:16 +0000 (18:48 +0200)
sysfs.c: In function 'sysfs_read_vpd':
sysfs.c:569:43: warning: unused parameter 'd' [-Wunused-parameter]
 static int sysfs_read_vpd(struct pci_dev *d, int pos, byte *buf, int len)
                                           ^
sysfs.c:569:50: warning: unused parameter 'pos' [-Wunused-parameter]
 static int sysfs_read_vpd(struct pci_dev *d, int pos, byte *buf, int len)
                                                  ^~~
sysfs.c:569:61: warning: unused parameter 'buf' [-Wunused-parameter]
 static int sysfs_read_vpd(struct pci_dev *d, int pos, byte *buf, int len)
                                                             ^~~
sysfs.c:569:70: warning: unused parameter 'len' [-Wunused-parameter]
 static int sysfs_read_vpd(struct pci_dev *d, int pos, byte *buf, int len)
                                                                      ^~~

lib/sysfs.c

index 8cab869306894822344597ea7875c1e2416e8de3..1bb4ae91595b9a97cce656cd63c68db3145a5382 100644 (file)
@@ -566,7 +566,7 @@ static int sysfs_write(struct pci_dev *d, int pos, byte *buf, int len)
 
 /* pread() is not available and do_read() only works for a single fd, so we
  * cannot implement read_vpd properly. */
-static int sysfs_read_vpd(struct pci_dev *d, int pos, byte *buf, int len)
+static int sysfs_read_vpd(struct pci_dev *d UNUSED, int pos UNUSED, byte *buf UNUSED, int len UNUSED)
 {
   return 0;
 }