Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755477Ab3GKCgy (ORCPT ); Wed, 10 Jul 2013 22:36:54 -0400 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 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 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" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.135.76.69] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1019 Lines: 37 >> + */ >> +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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/