From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga02-in.huawei.com ([119.145.14.65]:8252 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755083Ab3GKCgw (ORCPT ); Wed, 10 Jul 2013 22:36:52 -0400 Message-ID: <51DE1A35.2030108@huawei.com> Date: Thu, 11 Jul 2013 10:36:37 +0800 From: Yijing Wang MIME-Version: 1.0 To: Bjorn Helgaas CC: "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , Rafael , Hanjun Guo , Jiang Liu , Oliver Neukum , Paul Bolle , Gu Zheng Subject: Re: [PATCH 1/2] PCI: introduce PCIe Device Serial NUmber Capability support References: <1373356545-45944-1-git-send-email-wangyijing@huawei.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Sender: linux-pci-owner@vger.kernel.org List-ID: >> + */ >> +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);