From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752009AbdB1KhG (ORCPT ); Tue, 28 Feb 2017 05:37:06 -0500 Received: from mail-ve1eur01on0047.outbound.protection.outlook.com ([104.47.1.47]:15148 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751026AbdB1KhC (ORCPT ); Tue, 28 Feb 2017 05:37:02 -0500 From: Laurentiu Tudor To: Arnd Bergmann , Stuart Yoder , "Greg Kroah-Hartman" CC: "devicetree@vger.kernel.org" , Rob Herring , Frank Rowand , "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" , German Rivera , Itai Katz , Ramiro Oliveira , "linux-kernel@vger.kernel.org" , "devel@driverdev.osuosl.org" Subject: Re: [PATCH] staging: fsl-mc: fix warning in DT ranges parser Thread-Topic: [PATCH] staging: fsl-mc: fix warning in DT ranges parser Thread-Index: AQHSkToR40jNGIC9pkC76JvyGCR3yqF+OeWA Date: Tue, 28 Feb 2017 10:34:02 +0000 Message-ID: <58B55219.4070509@nxp.com> References: <20170227204235.3547639-1-arnd@arndb.de> In-Reply-To: <20170227204235.3547639-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=laurentiu.tudor@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [192.88.146.1] x-ms-office365-filtering-correlation-id: 50e955b7-0c44-4ea5-9a5f-08d45fc5500d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:VI1PR0401MB1856; x-microsoft-exchange-diagnostics: 1;VI1PR0401MB1856;7:3j/FAe/RMKeaaopow+5sFpkkjprI353YlaMltXO/LUP/PIXRegZTyQYBKC1EpKxsZ5iZqcwLGCkAm4XnTUb+SHFzryLAFEVDpg92DNUDzCeMh7ywrg1j55RmrUKheIAhl5CtUwTiIZ7ATOX05Pw8Rn8/PKTLie81PXRuTcgPYZLSECsuHKwhzlREMNVeVcBMkEiyta9G7cWTW49ytLAFCoTa4YprGDKo4ipfeDQ2/nn6qtrxawZ2kAsTwcvvGtNgH1z1fAcihmRvRManI2htfgyw/AbbgHcJ6xPx3deBwzLCBi+BqJoZyyiszAxfZgDdVMG0EgVe4J7WabYTe7bvCQ== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123558025)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148);SRVR:VI1PR0401MB1856;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0401MB1856; x-forefront-prvs: 0232B30BBC x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39850400002)(39860400002)(39450400003)(39410400002)(39840400002)(189002)(199003)(24454002)(377454003)(77096006)(3846002)(6116002)(53546006)(39060400002)(105586002)(106356001)(102836003)(106116001)(25786008)(5660300001)(54906002)(2900100001)(6486002)(2950100002)(6512007)(189998001)(38730400002)(6436002)(86362001)(68736007)(6506006)(97736004)(99286003)(92566002)(229853002)(6246003)(36756003)(81166006)(81156014)(8676002)(66066001)(53936002)(87266999)(65816999)(54356999)(80316001)(76176999)(50986999)(101416001)(8936002)(3280700002)(3660700001)(59896002)(7416002)(4326007)(2906002)(122556002)(33656002)(7736002)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0401MB1856;H:VI1PR0401MB1856.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-ID: <093B06925677204A8B48A614EC3103E3@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2017 10:34:02.0941 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB1856 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 v1SAbAi9009089 Hi Arnd, On 02/27/2017 10:42 PM, Arnd Bergmann wrote: > The fsl-mc-bus driver in staging contains a copy of the standard > 'ranges' property parsing algorithm with a hack to treat a missing > property the same way as an empty one. This code produces false-positive > warnings for me in an allmodconfig build: > > drivers/staging/fsl-mc/bus/fsl-mc-bus.c: In function 'fsl_mc_bus_probe': > drivers/staging/fsl-mc/bus/fsl-mc-bus.c:645:6: error: 'mc_size_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized] > drivers/staging/fsl-mc/bus/fsl-mc-bus.c:682:8: error: 'mc_addr_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized] > drivers/staging/fsl-mc/bus/fsl-mc-bus.c:644:6: note: 'mc_addr_cells' was declared here > drivers/staging/fsl-mc/bus/fsl-mc-bus.c:684:8: error: 'paddr_cells' may be used uninitialized in this function [-Werror=maybe-uninitialized] > drivers/staging/fsl-mc/bus/fsl-mc-bus.c:643:6: note: 'paddr_cells' was declared here > > To avoid the warnings, I'm simplifying the argument handling to pass > the number of valid ranges in the property as the function return code > rather than passing it by reference. With this change, gcc can see that > we don't evaluate the cell numbers for an missing ranges property. > > Signed-off-by: Arnd Bergmann Looks good to me, i've tested it and did not see any issues, so here's an: Acked-by: Laurentiu Tudor --- Thanks & Best Regards, Laurentiu