Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754065AbcKHRU5 (ORCPT ); Tue, 8 Nov 2016 12:20:57 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:63771 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751749AbcKHRUz (ORCPT ); Tue, 8 Nov 2016 12:20:55 -0500 X-IronPort-AV: E=Sophos;i="5.31,462,1473087600"; d="scan'208";a="224820841" From: Chris Brandt To: Arnd Bergmann , Mark Brown CC: Hiep Cao Minh , "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Geert Uytterhoeven Subject: RE: [PATCH] spi: rspi: avoid uninitialized variable access Thread-Topic: [PATCH] spi: rspi: avoid uninitialized variable access Thread-Index: AQHSOcaKSGkVVWGzn0mcLFsqF9jQL6DPT8iA Date: Tue, 8 Nov 2016 17:20:50 +0000 Message-ID: References: <20161108134624.1905209-1-arnd@arndb.de> In-Reply-To: <20161108134624.1905209-1-arnd@arndb.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chris.Brandt@renesas.com; x-originating-ip: [4.59.13.106] x-ms-office365-filtering-correlation-id: 9992e9ab-cd7f-425f-0ee3-08d407fb9648 x-microsoft-exchange-diagnostics: 1;SG2PR06MB1166;7:AJkXRVMjtgR45TZd8SXUY0aZPXex8MTnJHP3JPQ2E6T4A6o3CvR1qWe2J8HH63S3wzor8kPuqk3X4FQBgDneRcZQBxBug6bfKBQBdFUC4VpU4wgqxpSoftLTt2Eb3nKZpE4TMHL8B7Mie4OZt6iZhKbFTn8IVDfAd1wLkFpZ5kvd6HiXy8n7RwkvAtgUhkX95RiVeLztyhFxm4YKX9e3LX/abGV3Wh7zYTXnPf8nsCXnBnrvubjOH+nqebVfxTega0UqKdm+ZWOPdccGSvdadU0XOY7gxPC9+107c2KMxpn6PogQJPleeR/YCPTZWORTsMXkaV1XJ0a/WCmSsE8fxI3H11tOfwQF+sko/kPb+sQ=;20:2UtDHoB6ZPnbSlYCPZh5gxoaFjDEmVMSP8HWyYbWf97FjJOQ1GPVI3lGOICFdf6ype0LG9DsJZQ22jUvYogn0YKUDHU6g/0IG9TrITso6QetEkVCIzRMjQpq2rIJfdS5FxZjI6eLwf0CnFJD61ofACpG814vhnwz42h1lLvs3mk= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB1166; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026);SRVR:SG2PR06MB1166;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB1166; x-forefront-prvs: 01208B1E18 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(189002)(199003)(24454002)(3280700002)(8676002)(50986999)(3846002)(68736007)(3660700001)(4326007)(81156014)(54356999)(101416001)(76176999)(33656002)(2950100002)(76576001)(5660300001)(105586002)(122556002)(2906002)(102836003)(87936001)(74316002)(7696004)(9686002)(6116002)(97736004)(7736002)(106356001)(586003)(305945005)(5001770100001)(81166006)(2900100001)(77096005)(92566002)(86362001)(66066001)(106116001)(189998001)(7846002)(8936002);DIR:OUT;SFP:1102;SCL:1;SRVR:SG2PR06MB1166;H:SG2PR06MB1165.apcprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2016 17:20:50.3581 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1166 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 quoted-printable to 8bit by mail.home.local id uA8HL2fQ009231 Content-Length: 767 Lines: 21 Since I was CC-ed, I'll add in my opinion: While Geert already pointed out the spelling mistake (_in_or_our >> _in_or_out), since that function is only just for qspi versions, a better function name should have been "qspi_pio_transfer_in_or_out" However.... On 11/8/2016, Arnd Bergmann wrote: > This simplifies it again by keeping the two separate, which then ends up > avoiding that warning. I agree with Arnd's method of NOT adding a new "rspi_pio_transfer_in_or_our" function and instead just doing it in the existing qspi_transfer_ functions. Side note: The RSPI in the RZ/A1 devices also have FIFOs which can be used to reduce the number of interrupts in pio transfers, so maybe someday I'll make a similar change for non-qspi devices as well. Chris