From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755517AbdCTRHG (ORCPT ); Mon, 20 Mar 2017 13:07:06 -0400 Received: from mail-cys01nam02on0086.outbound.protection.outlook.com ([104.47.37.86]:35008 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753104AbdCTRHA (ORCPT ); Mon, 20 Mar 2017 13:07:00 -0400 From: "Challa, Mahipal" To: Jan Glauber , Dmitry Vyukov CC: Stephen Rothwell , Andrew Morton , Herbert Xu , "linux-next@vger.kernel.org" , LKML Subject: Re: linux-next: build warnings after merge of the akpm-current tree Thread-Topic: linux-next: build warnings after merge of the akpm-current tree Thread-Index: AQHSoTn885mNmcDD6U+Hd0CFEcko66Gdb+cAgAA5RoCAAEvIUQ== Date: Mon, 20 Mar 2017 17:06:55 +0000 Message-ID: References: <20170320162226.47c6e3ed@canb.auug.org.au> ,<20170320123053.GB11825@hardcore> In-Reply-To: <20170320123053.GB11825@hardcore> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: canb.auug.org.au; dkim=none (message not signed) header.d=none;canb.auug.org.au; dmarc=none action=none header.from=cavium.com; x-originating-ip: [106.220.47.195] x-microsoft-exchange-diagnostics: 1;CO2PR07MB2583;7:k7aMxsQlFbPVgSc17PGdcJrk2k4l0UoDBynq1k1eX42omdhB1L+41mbDfxT9ieslNaMEI1d5qlpIzVXCnsV+6AYDVDM+h6Dp5rfUyjv5NDslsq2+C87OnsKH80M5Bx0+lvt3Gap02kwxQxrRMLN2QuVRidMtyYcdmONGm/3eguKzy8ZXLMQkDmb0uTwSu6cy1OEXr+Otqtke0FioA+ekYSfunICdoAZqJI3PBAr1aOwZ0Mn7L8OPjBKXQMNrFXoSj5jU9XgVViTJQqoWgOmbJutzaXCl7rlFnqtEmi+roTORBY5V6XfH+lEgKyDh7eQaLViuGaB81m2qMcQO9dAqNg== x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10009020)(39450400003)(39410400002)(377454003)(24454002)(50986999)(76176999)(7736002)(77096006)(81166006)(86362001)(9686003)(54356999)(74316002)(189998001)(2900100001)(2906002)(4326008)(3660700001)(305945005)(7696004)(55016002)(3280700002)(2950100002)(5660300001)(33656002)(99286003)(102836003)(8936002)(122556002)(25786008)(53936002)(8676002)(6246003)(66066001)(38730400002)(3846002)(6116002)(229853002)(6506006)(53546008)(6436002);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR07MB2583;H:CY4PR07MB3143.namprd07.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; x-ms-office365-filtering-correlation-id: 03c0728e-862e-4c82-79a8-08d46fb38345 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075);SRVR:CO2PR07MB2583; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123564025)(20161123558025)(20161123562025)(20161123560025)(20161123555025)(6072148);SRVR:CO2PR07MB2583;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB2583; x-forefront-prvs: 02524402D6 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2017 17:06:55.5627 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2583 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 v2KH7BUU017701 From: Jan Glauber Sent: Monday, March 20, 2017 6:00 PM To: Dmitry Vyukov Cc: Stephen Rothwell; Andrew Morton; Herbert Xu; linux-next@vger.kernel.org; LKML; Challa, Mahipal Subject: Re: linux-next: build warnings after merge of the akpm-current tree   On Mon, Mar 20, 2017 at 10:05:54AM +0100, Dmitry Vyukov wrote: > On Mon, Mar 20, 2017 at 6:22 AM, Stephen Rothwell wrote: > > Hi Andrew, > > > > After merging the akpm-current tree, today's linux-next build (x86_64 > > allmodconfig) produced these warnings: > > > > drivers/crypto/cavium/zip/zip_main.c: In function 'zip_show_stats': > > drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'long long int' [-Wformat=] > >     seq_printf(s, "        ZIP Device %d Stats\n" > >                   ^ > > drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'long long int' [-Wformat=] > > drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'long long int' [-Wformat=] > > drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 7 has type 'long long int' [-Wformat=] > > drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 10 has type 'long long int' [-Wformat=] > > drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 11 has type 'long long int' [-Wformat=] > > drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 12 has type 'long long int' [-Wformat=] > > drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 13 has type 'long long int' [-Wformat=] > > drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 14 has type 'long long int' [-Wformat=] > > drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 15 has type 'long long int' [-Wformat=] > > > > Introduced by commit > > > >   09ae5d37e093 ("crypto: zip - Add Compression/Decompression statistics") > > > > from the crypto tree interacting with commit > > > >   3f4ca3d25e1a ("asm-generic, x86: wrap atomic operations") > > > > from the akpm-current tree. > > > > This latter commit changed atomic64read() from "long" to "long long" > > on x86_64. > > Hi, > > Previously atomic operations returned different types on 32/64 bits. I > think that was pretty unfortunate and could actually lead to lots of > such warnings (as there were no single format specifier that one could > use portably), and was difficult to wrap. So I used "unsigned long > long" for all operations. > I actually suspect that the new zip_main.c code would cause a similar > warning on 32 bits even without my change, because atomic ops already > returned unsigned long long there. >The driver depends on 64BIT (HW is 64 bit only). >> So I think we need to fix zip_main.c. >I'm not entirely sure, all drivers that are available for x86_64 and >arm64 and use atomic64_read will show such warnings. >One possible solution would be to disable COMPILE_TEST for the zip >driver, but that would just hide the issue. We found a decent solution to this issue and sent the patch to Herbert. Solution: Changing the format specifiers to %llu and adding a cast to u64 solves the problem on all the architectures. Thanks, Mahipal