Hi Heiner, Thank you for cleaning this up! On 21-02-03 09:48:03, Heiner Kallweit wrote: > Since 104daa71b396 ("PCI: Determine actual VPD size on first access") > attribute size is set to 0 (unlimited). So let's remove this now > dead code. > > Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx> > --- > v2: > - no changes > --- > drivers/pci/vpd.c | 14 -------------- > 1 file changed, 14 deletions(-) > > diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c > index 35559ead2..2096530ce 100644 > --- a/drivers/pci/vpd.c > +++ b/drivers/pci/vpd.c > @@ -403,13 +403,6 @@ static ssize_t read_vpd_attr(struct file *filp, struct kobject *kobj, > { > struct pci_dev *dev = to_pci_dev(kobj_to_dev(kobj)); > > - if (bin_attr->size > 0) { > - if (off > bin_attr->size) > - count = 0; > - else if (count > bin_attr->size - off) > - count = bin_attr->size - off; > - } > - > return pci_read_vpd(dev, off, count, buf); > } > > @@ -419,13 +412,6 @@ static ssize_t write_vpd_attr(struct file *filp, struct kobject *kobj, > { > struct pci_dev *dev = to_pci_dev(kobj_to_dev(kobj)); > > - if (bin_attr->size > 0) { > - if (off > bin_attr->size) > - count = 0; > - else if (count > bin_attr->size - off) > - count = bin_attr->size - off; > - } > - > return pci_write_vpd(dev, off, count, buf); > } > > -- > 2.30.0 > Reviewed-by: Krzysztof Wilczyński <kw@xxxxxxxxx> Krzysztof