From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755810AbcBCXPR (ORCPT ); Wed, 3 Feb 2016 18:15:17 -0500 Received: from mail-bn1bon0131.outbound.protection.outlook.com ([157.56.111.131]:35054 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751600AbcBCXPL convert rfc822-to-8bit (ORCPT ); Wed, 3 Feb 2016 18:15:11 -0500 X-Greylist: delayed 1030 seconds by postgrey-1.27 at vger.kernel.org; Wed, 03 Feb 2016 18:15:10 EST From: Jake Oshins To: Marc Zyngier , Bjorn Helgaas CC: "gregkh@linuxfoundation.org" , KY Srinivasan , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , Haiyang Zhang , "bhelgaas@google.com" , "linux-pci@vger.kernel.org" Subject: RE: [PATCH RESEND 1/3] PCI: Add fwnode_handle to pci_sysdata Thread-Topic: [PATCH RESEND 1/3] PCI: Add fwnode_handle to pci_sysdata Thread-Index: AQHRXeELU3+EfNJ/XEC3Odalyky2DJ8apMEAgAABNHCAAAYOgIAAAamAgAA+IRA= Date: Wed, 3 Feb 2016 22:42:00 +0000 Message-ID: References: <1454434903-1680-1-git-send-email-jakeo@microsoft.com> <1454434903-1680-2-git-send-email-jakeo@microsoft.com> <20160203182528.GB10879@localhost> <20160203185127.GE10879@localhost> <56B24D93.4040202@arm.com> In-Reply-To: <56B24D93.4040202@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [2001:4898:80e8:f::dd] x-ms-office365-filtering-correlation-id: a57916a6-cb47-4b85-12d9-08d32ceb3b36 x-microsoft-exchange-diagnostics: 1;DM2PR0301MB1232;5:8on0kkNnMeZ5LnfLAkIwHdp9XU5JyN3ln81ZPUXBglAfbrgT+Qn4gFWuIYcxeUCR2nEaWsq5PobUBeSXpSCv19DwpCRFBY4ovkvZNqcfbohk92IXZrqpERSPVv6SS7EOIwH1r/lkBGjB/QpFiQwTAg==;24:KcShS31PvbK8FIX/wBaPwJVQmS4CxZZ2quKgl2hsmtGeDF/AIasYdO17oTBDo34cEbgkXZ+h3g9QoDmVPqIHxQdk5cmJ3osrdzejlgoPU40= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1232; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(61426038)(61427038);SRVR:DM2PR0301MB1232;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1232; x-forefront-prvs: 08417837C5 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(479174004)(164054003)(13464003)(24454002)(377454003)(33656002)(1096002)(102836003)(2906002)(5002640100001)(586003)(5008740100001)(1220700001)(4326007)(54356999)(50986999)(10400500002)(5890100001)(10290500002)(189998001)(6116002)(5005710100001)(5003600100002)(76176999)(99286002)(2950100001)(19580395003)(76576001)(40100003)(19580405001)(8990500004)(74316001)(77096005)(86362001)(5001770100001)(10090500001)(93886004)(5001960100002)(122556002)(106116001)(87936001)(92566002)(5004730100002)(86612001)(3826002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB1232;H:DM2PR0301MB1232.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2016 22:42:00.9364 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB1232 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Marc Zyngier [mailto:marc.zyngier@arm.com] > Sent: Wednesday, February 3, 2016 10:57 AM > To: Bjorn Helgaas ; Jake Oshins > > Cc: gregkh@linuxfoundation.org; KY Srinivasan ; linux- > kernel@vger.kernel.org; devel@linuxdriverproject.org; Haiyang Zhang > ; bhelgaas@google.com; linux- > pci@vger.kernel.org > Subject: Re: [PATCH RESEND 1/3] PCI: Add fwnode_handle to pci_sysdata > > On 03/02/16 18:51, Bjorn Helgaas wrote: > > On Wed, Feb 03, 2016 at 06:32:20PM +0000, Jake Oshins wrote: > >>> -----Original Message----- > >>> From: Bjorn Helgaas [mailto:helgaas@kernel.org] > >>> Sent: Wednesday, February 3, 2016 10:25 AM > >>> To: Jake Oshins [snip] > >>>> > >>>> +#ifndef pci_root_bus_fwnode > >>>> +#define pci_root_bus_fwnode(bus) ((void)(bus), NULL) > >>> > >>> Huh, interesting. This is new for me; I guess the idea is that we at least > >>> evaluate "bus" even when pci_root_bus_fwnode isn't defined, so the > >>> compiler can catch egregious errors? > >>> > >> > >> This was a suggestion by Mark Zyngier. It made the non-x86 architectures > build benignly. If you'd like it done differently, I'm open to suggestion. > > I don't remember suggesting the use of the comma operator, but just to > check that pci_root_bus_fwnode wasn't previously defined. > > > Something like "#define pci_root_bus_fwnode(bus) NULL" would be > > typical. What I'm curious about is the use of the comma operator. > > I'm not opposed to it; I'm just trying to understand why it makes a > > difference. > > I guess it flags the variable as used, and prevents an overly sensitive > compiler from being loud and obnoxious... Just a guess though. > > M. > -- I was just copying the form that was in the code that Marc pointed out, somewhere else. I have no particular attachment to this construct. Honestly, since I'm still relatively new to the Linux codebase, I just assumed that was a common form that I should follow suit on. If you tell me that the simpler NULL is more typical, I prefer that. I'll simplify this when I resend the patch series. Thanks, Jake