Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754014AbdGCJ4D (ORCPT ); Mon, 3 Jul 2017 05:56:03 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:43674 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753694AbdGCJ4A (ORCPT ); Mon, 3 Jul 2017 05:56:00 -0400 X-IronPort-AV: E=Sophos;i="5.40,302,1496070000"; d="scan'208";a="249727996" From: Ramesh Shanmugasundaram To: Geert Uytterhoeven CC: Mark Brown , Hans Verkuil , "mattw@codeaurora.org" , Mitchel Humpherys , Andrew Morton , Masahiro Yamada , Linux-Renesas , "linux-kernel@vger.kernel.org" , Linux Media Mailing List , Chris Paterson Subject: RE: [PATCH v2 1/2] iopoll: Avoid namespace collision within macros & tidyup Thread-Topic: [PATCH v2 1/2] iopoll: Avoid namespace collision within macros & tidyup Thread-Index: AQHS5EuSlTBqz/XHTUO46r4B5fNYWqIi1lIAgB8kTJA= Date: Mon, 3 Jul 2017 09:55:55 +0000 Message-ID: References: <20170613133348.48044-1-ramesh.shanmugasundaram@bp.renesas.com> <20170613133348.48044-2-ramesh.shanmugasundaram@bp.renesas.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux-m68k.org; dkim=none (message not signed) header.d=none;linux-m68k.org; 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;SIXPR06MB0699;20:T/SWeYb9QTtwPZK/1KIHraDLYOZN43uz0fdCnjlQXoEK2e7oDK7nJvzT94B43Qqq92v06O1PgBeC810nJsJIsxqaQUDtwCv0LwcZ2VKABBlkXiiDkKc0AYQSlW/a0/NenJcH0V/JMfMz6Qc+Zk9N2Kt4jZE+RTUzPmvFG0dEVAU= x-ms-office365-filtering-correlation-id: 00bb6cfe-7da5-49b5-cc56-08d4c1f9b2de x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:SIXPR06MB0699; x-ms-traffictypediagnostic: SIXPR06MB0699: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(236129657087228)(48057245064654)(167848164394848); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123562025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:SIXPR06MB0699;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:SIXPR06MB0699; x-forefront-prvs: 035748864E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39410400002)(39850400002)(39860400002)(39840400002)(39450400003)(377454003)(24454002)(51914003)(305945005)(3660700001)(7736002)(8676002)(76176999)(50986999)(54356999)(189998001)(8936002)(107886003)(110136004)(55016002)(33656002)(81166006)(54906002)(99286003)(3280700002)(6436002)(25786009)(38730400002)(6246003)(9686003)(7416002)(4326008)(14454004)(229853002)(6506006)(7696004)(66066001)(5250100002)(3846002)(6116002)(102836003)(53546010)(5660300001)(53936002)(2906002)(2900100001)(74316002)(6916009)(478600001)(42882006)(86362001)(2950100002);DIR:OUT;SFP:1102;SCL:1;SRVR:SIXPR06MB0699;H:KL1PR0601MB2038.apcprd06.prod.outlook.com;FPR:;SPF:None;MLV:sfv;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: 03 Jul 2017 09:55:55.6170 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB0699 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 v639udjL005758 Content-Length: 1744 Lines: 53 Hi Geert, Thanks for the review. Replying to the thread to update what we discussed in IRC sometime back. > On Tue, Jun 13, 2017 at 3:33 PM, Ramesh Shanmugasundaram > wrote: > > Renamed variable "timeout" to "__timeout" to avoid namespace collision. > > Tidy up macro arguments with paranthesis. > > > > Signed-off-by: Ramesh Shanmugasundaram > > > > Thanks for your patches! > > > --- a/include/linux/iopoll.h > > +++ b/include/linux/iopoll.h > > @@ -42,18 +42,19 @@ > > */ > > #define readx_poll_timeout(op, addr, val, cond, sleep_us, timeout_us) > > \ ({ \ > > - ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \ > > + ktime_t __timeout = ktime_add_us(ktime_get(), timeout_us); \ > > I think timeout_us should be within parentheses, too. It is not required as it is passed as an function (ktime_add_us) argument. > > > might_sleep_if(sleep_us); \ > > for (;;) { \ > > (val) = op(addr); \ > > if (cond) \ > > break; \ > > - if (timeout_us && ktime_compare(ktime_get(), timeout) > > 0) { \ > > + if ((timeout_us) && \ > > + ktime_compare(ktime_get(), __timeout) > 0) { \ > > (val) = op(addr); \ > > break; \ > > } \ > > if (sleep_us) \ > > - usleep_range((sleep_us >> 2) + 1, sleep_us); \ > > + usleep_range(((sleep_us) >> 2) + 1, sleep_us); > > + \ > > Same for sleep_us. > > Also in readx_poll_timeout_atomic(), and in your second patch. Same as the above comment. Thanks, Ramesh