Re: [PATCH 1/2] PCI: introduce PCIe Device Serial NUmber Capability support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> + */
>> +void pci_get_dsn(struct pci_dev *dev, u64 *sn)
> 
> How about:
> 
>     u64 pci_device_serial_number(struct pci_dev *dev)
> 
> "get" suggests reference counting, which isn't happening here.  And
> why pass a pointer to a return value when we can just as easily return
> it directly?

Yes, u64 pci_device_serial_number(struct pci_dev *dev) is better, thanks!

> 
id pci_init_capabilities(struct pci_dev *dev)
>>         /* Power Management */
>>         pci_pm_init(dev);
>>
>> +       /* Device Serial Number */
>> +       pci_dsn_init(dev);
> 
>     dev->sn = pci_serial_number(dev);
> 
> Obvious, no comment or wrapper function needed.

OK, will remove the unnecessary comment.

> 
>> +
>>         /* Vital Product Data */
>>         pci_vpd_pci22_init(dev);

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux