Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754282AbdFNHST (ORCPT ); Wed, 14 Jun 2017 03:18:19 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:58570 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750828AbdFNHSR (ORCPT ); Wed, 14 Jun 2017 03:18:17 -0400 X-IronPort-AV: E=Sophos;i="5.39,340,1493650800"; d="scan'208";a="246533500" From: Ramesh Shanmugasundaram To: Ian Arkver , "broonie@kernel.org" , "hverkuil@xs4all.nl" , "mattw@codeaurora.org" , "mitchelh@codeaurora.org" , "akpm@linux-foundation.org" , "yamada.masahiro@socionext.com" CC: "linux-renesas-soc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-media@vger.kernel.org" , Chris Paterson Subject: RE: [PATCH v2 0/2] Avoid namespace collision within macros & tidyup Thread-Topic: [PATCH v2 0/2] Avoid namespace collision within macros & tidyup Thread-Index: AQHS5EuQch6xHlSbTUW6E1FNMAjbuKIj68wAgAAGKIA= Date: Wed, 14 Jun 2017 07:18:09 +0000 Message-ID: References: <20170613133348.48044-1-ramesh.shanmugasundaram@bp.renesas.com> <293256b4-2477-e5f6-eca6-e5eaf9b14876@gmail.com> In-Reply-To: <293256b4-2477-e5f6-eca6-e5eaf9b14876@gmail.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=bp.renesas.com; x-originating-ip: [193.141.220.21] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;TY1PR06MB0702;7:FWx9TdUWfrenendeslx/TAiRlSOqpTlL/gT9f8XEAOMFUw0QHsQHxk212TyMyoXsFKzEYsX4oUW51QDQbeag5jubfxEx/bl4ExRADt0VHh7iu7Vyi0wSEc4AsCcUw5IN5xat9ErPMjU5AqEfB1ITiNp2J6ZledtVDie+mDwGUTbPIHqB2Aw2TyDY+lnAPqslB/Olo8EiKpPKWsS72T7wPJhV5pAtVYfVvwLKM0lD8eQUUAZPItzi9r1egiKDzz/G8m/KvC8WsDdzQecMQ/2gGFJ/QEOE+rh1tofyxQFavJk9mHlEgKWSZlxX1Ym9O8msCW9EnNnkqUCG0FbkF3kiFA==;20:y0SPnruk3JJOYdmG/XjhgcWzmKm+YcOahQdapoyvW8fFXGd4XWiY212yhFC9kPQhnDcyQ5QBgmF31vf1Zys6Ar87f/pB3PALnl3VQInjaUELMI01jlx7lVHt8ujnuIj3J6x8edNDDWM0Kv2whmVwitDoJrmM+PjJqf0fgnYNq68= x-ms-traffictypediagnostic: TY1PR06MB0702: x-ms-office365-filtering-correlation-id: fe7ffec5-2321-47c9-255a-08d4b2f582ce x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:TY1PR06MB0702; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(278021516957215); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:TY1PR06MB0702;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:TY1PR06MB0702; x-forefront-prvs: 033857D0BD x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39850400002)(39410400002)(39400400002)(39840400002)(39860400002)(39450400003)(24454002)(53754006)(50986999)(3846002)(5250100002)(6116002)(3660700001)(102836003)(6246003)(189998001)(107886003)(38730400002)(54356999)(53936002)(76176999)(33656002)(2501003)(8676002)(8936002)(5660300001)(2900100001)(81166006)(2906002)(25786009)(3280700002)(86362001)(42882006)(2950100002)(229853002)(39060400002)(66066001)(53546009)(7416002)(74316002)(2201001)(7696004)(55016002)(9686003)(6306002)(966005)(6436002)(99286003)(54906002)(478600001)(6506006)(7736002)(4326008)(305945005)(14454004)(21314002);DIR:OUT;SFP:1102;SCL:1;SRVR:TY1PR06MB0702;H:KL1PR0601MB2038.apcprd06.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jun 2017 07:18:09.5799 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR06MB0702 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v5E7IUFk013173 Content-Length: 1760 Lines: 53 > Subject: Re: [PATCH v2 0/2] Avoid namespace collision within macros & > tidyup > > On 13/06/17 14:33, Ramesh Shanmugasundaram wrote: > > Hi All, > > > > The readx_poll_timeout & similar macros defines local variable that > > can cause name space collision with the caller. Fixed this issue by > > prefixing them with underscores. > > The compound statement has a local variable scope, so these won't collide > with the caller I believe. But xxx_poll_timeout is a macro?? Usage regmap_read_poll_timeout(..., timeout) with variable name "timeout" in the caller results in include/linux/regmap.h:123:20: warning: 'timeout' is used uninitialized in this function [-Wuninitialized] ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \ > > > Also tidied couple of instances where the macro arguments are used in > > expressions without paranthesis. > > > > This patchset is based on top of today's linux-next repo. > > commit bc4c75f41a1c ("Add linux-next specific files for 20170613") > > > > Change history: > > > > v2: > > - iopoll.h: > > - Enclosed timeout_us & sleep_us arguments with paranthesis > > - regmap.h: > > - Enclosed timeout_us & sleep_us arguments with paranthesis > > - Renamed pollret to __ret > > > > Note: timeout_us cause spare check warning as identified here [1]. > > > > [1] > > https://www.mail-archive.com/linux-renesas-soc@vger.kernel.org/msg1513 > > 8.html > > > > Thanks, > > Ramesh > > > > Ramesh Shanmugasundaram (2): > > iopoll: Avoid namespace collision within macros & tidyup > > regmap: Avoid namespace collision within macro & tidyup > > > > include/linux/iopoll.h | 12 +++++++----- > > include/linux/regmap.h | 17 +++++++++-------- > > 2 files changed, 16 insertions(+), 13 deletions(-) > >