]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/proc.c
Squashed compiler warnings about code with no effect
[pciutils.git] / lib / proc.c
index 8afe7a3bd3197936d7b0b95485ed5045bddbb083..f493e491e771684c0ebd0e87843d3319bf89f7cb 100644 (file)
@@ -21,7 +21,7 @@
 static void
 proc_config(struct pci_access *a)
 {
 static void
 proc_config(struct pci_access *a)
 {
-  a->method_params[PCI_ACCESS_PROC_BUS_PCI] = PATH_PROC_BUS_PCI;
+  a->method_params[PCI_ACCESS_PROC_BUS_PCI] = PCI_PATH_PROC_BUS_PCI;
 }
 
 static int
 }
 
 static int
@@ -97,7 +97,6 @@ proc_scan(struct pci_access *a)
       d->func = PCI_FUNC(dfn & 0xff);
       d->vendor_id = vend >> 16U;
       d->device_id = vend & 0xffff;
       d->func = PCI_FUNC(dfn & 0xff);
       d->vendor_id = vend >> 16U;
       d->device_id = vend & 0xffff;
-      d->hdrtype = pci_read_byte(d, PCI_HEADER_TYPE) & 0x7f;
       known = PCI_FILL_IDENT;
       if (!a->buscentric)
        {
       known = PCI_FILL_IDENT;
       if (!a->buscentric)
        {
@@ -154,10 +153,7 @@ proc_read(struct pci_dev *d, int pos, byte *buf, int len)
       return 0;
     }
   else if (res != len)
       return 0;
     }
   else if (res != len)
-    {
-      d->access->warning("proc_read: tried to read %d bytes at %d, but got only %d", len, pos, res);
-      return 0;
-    }
+    return 0;
   return 1;
 }
 
   return 1;
 }
 
@@ -177,7 +173,7 @@ proc_write(struct pci_dev *d, int pos, byte *buf, int len)
     }
   else if (res != len)
     {
     }
   else if (res != len)
     {
-      d->access->warning("proc_write: tried to write %d bytes at %d, but got only %d", len, pos, res);
+      d->access->warning("proc_write: tried to write %d bytes at %d, but only %d succeeded", len, pos, res);
       return 0;
     }
   return 1;
       return 0;
     }
   return 1;