Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp25704imc; Fri, 15 Mar 2019 15:40:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrNKrabsbLbezmLwZO3k2syv+O1jpXbFjwuvTXeR+7JdLuFmaXiTCvgLcO2KFeC14nMKQv X-Received: by 2002:a63:f146:: with SMTP id o6mr5614852pgk.360.1552689628236; Fri, 15 Mar 2019 15:40:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552689628; cv=none; d=google.com; s=arc-20160816; b=rsWUTlS9UDCyRsbluUUferOalDluUETBUmesbEvO2x5UShwGK/m6kGF5k6XIqgXbF4 cPmiYR3JZB62GQKLSe688onfqTrcNGTu0NRZapjL/+sQVZA5i2i7/EUv8iXOeNoQV5gN Y915K4b2zoRigwbjOPZi5H1Yhcf8zyuHmt3S+SzxQEy6J/PS7pcdb72cf/hw2hY+2Mq8 I+Pn9pG2d0eBJprDcBaNgDwO3whBim5XZNNq0hyIYTemS4sIuNTfv3HfY1tzSmojWMiM u4qnqY2uo8z84S94JBvEXcyJcB1vO+T1YQb+nptlBz4DtKWBrLuLDpwcrBmI8l19UCF0 Tdgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=47EaxmveNyBYGMWYVIEfDovV1FbA+ktZcNuqUEqqiQw=; b=oYKME8ySeGEbxTUIvWPOF3QxdRGh6dCrVkIvxE+tqxKI/TcVJ2pM82IX03SnA/cdWR S5TRCdErtkW6zvlHPij10fAcuLH44mf+jZamd12x1rIoWis2vFaOnHIFBV1npFKpFWUh AIpkQxhA0DKBTi8BqURWllxN6X5NQ+z9IX/dVj6yyr90hS9gX849sxXvjb/Eq0V0iKHe 5bV0s514nOiFrxrijSZLQ420nWB9b6NcJStCZ+FcsL79tY+aJp2hYcddENPGDKctr+v7 nw5j5KETaD2iVXQR82uwCf3wBAYaNChspdiUdsOLYyv1UMGBYIqFAK6gmwOK4Gp8UIzC x/IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wavesemi.onmicrosoft.com header.s=selector1-wavecomp-com header.b=mS+iM9kz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c141si3006333pfb.199.2019.03.15.15.40.10; Fri, 15 Mar 2019 15:40:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@wavesemi.onmicrosoft.com header.s=selector1-wavecomp-com header.b=mS+iM9kz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727495AbfCOWjS (ORCPT + 99 others); Fri, 15 Mar 2019 18:39:18 -0400 Received: from mail-eopbgr680090.outbound.protection.outlook.com ([40.107.68.90]:26431 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726130AbfCOWjS (ORCPT ); Fri, 15 Mar 2019 18:39:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wavesemi.onmicrosoft.com; s=selector1-wavecomp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=47EaxmveNyBYGMWYVIEfDovV1FbA+ktZcNuqUEqqiQw=; b=mS+iM9kzLz7uMi3lkDQ0bzmIFxB2+dCFCMx8ldhVI0FJVsCZbd/BF4rHEwheOtR7ivRjwLgNuik+bWLxH8EmrPZdq7ORo6EahxEuHvwNm/hpKdzCKd8S1ZFZcW+1IICFczqvq7B9BicXULTLueIOHdxvUbDSl9QyNdgSEKj6to4= Received: from MWHPR2201MB1277.namprd22.prod.outlook.com (10.174.162.17) by MWHPR2201MB1213.namprd22.prod.outlook.com (10.174.161.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Fri, 15 Mar 2019 22:39:13 +0000 Received: from MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::b8d4:8f0d:d6d1:4018]) by MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::b8d4:8f0d:d6d1:4018%3]) with mapi id 15.20.1709.011; Fri, 15 Mar 2019 22:39:13 +0000 From: Paul Burton To: Paul Burton CC: "linux-mips@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Paul Burton , Amir Goldstein , Arnd Bergmann , Jan Kara , "linux-arch@vger.kernel.org" , "linux-mips@vger.kernel.org" Subject: Re: [PATCH] MIPS: Remove custom MIPS32 __kernel_fsid_t type Thread-Topic: [PATCH] MIPS: Remove custom MIPS32 __kernel_fsid_t type Thread-Index: AQHU2oz8biJKb9VnB02dJhiRtaA496YNSreA Date: Fri, 15 Mar 2019 22:39:12 +0000 Message-ID: References: <20190314173900.25454-1-paul.burton@mips.com> In-Reply-To: <20190314173900.25454-1-paul.burton@mips.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BY5PR13CA0019.namprd13.prod.outlook.com (2603:10b6:a03:180::32) To MWHPR2201MB1277.namprd22.prod.outlook.com (2603:10b6:301:24::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=pburton@wavecomp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [67.207.99.198] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 905d3472-5029-49f7-065a-08d6a9970c03 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:MWHPR2201MB1213; x-ms-traffictypediagnostic: MWHPR2201MB1213: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-forefront-prvs: 09778E995A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39850400004)(396003)(376002)(346002)(136003)(366004)(52314003)(189003)(199004)(55016002)(14444005)(7736002)(256004)(8676002)(7696005)(74316002)(305945005)(71200400001)(446003)(5660300002)(11346002)(81156014)(76176011)(71190400001)(81166006)(9686003)(53936002)(25786009)(229853002)(52116002)(6246003)(99286004)(6306002)(68736007)(478600001)(966005)(6436002)(52536014)(106356001)(8936002)(102836004)(26005)(42882007)(2906002)(44832011)(4326008)(6862004)(14454004)(66066001)(97736004)(476003)(486006)(54906003)(105586002)(316002)(3846002)(6116002)(386003)(33656002)(186003)(6506007);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR2201MB1213;H:MWHPR2201MB1277.namprd22.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: wavecomp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: JDFRGvGkVVDQk1TdFewiNXZ0lahcN2CL4FdzwWscZTELIRVQwcaQ4VG7zRRSKsUbJfJC6KQ64N0UHL7HQ21phJzAcTO2t+8sBnXc/9vFwWQQwkL+ZUKDJevhLmBRZbEfSU59/A3ajS0ATXwQvR+dqulA3zcF3zZ9zS4WvSDLsMFmL5/Ob0zTv3PNggmRKuyafEwGMkMu7nHLAyvC6eEKfiPvZTlIn9QWsm0Ep0YW6eDcil9hBmuu/XU4+UDnZqm/Lsv57Y5Ra0Eoc4AmvXcdC7ASd4dfuGWj9Dn9x1zspREERdYZPOoR1I04On6PiTT6fvX7Y4o4bAEB3NLCNob0U4k5iAPcjZAI/7CgWic7PiGnyNpHCACuDMQU+BiSLxTXRbAo8+hN7BG7ILfsRfFIqoGa1Ifi5ETZqB6QBNJgtMs= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: mips.com X-MS-Exchange-CrossTenant-Network-Message-Id: 905d3472-5029-49f7-065a-08d6a9970c03 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2019 22:39:13.0157 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 463607d3-1db3-40a0-8a29-970c56230104 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR2201MB1213 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Paul Burton wrote: > For MIPS32 kernels we have a custom definition of __kernel_fsid_t. This > differs from the asm-generic version used by all other architectures & > MIPS64 in one way - it declares the val field as an array of long, > rather than an array of int. Since int & long have identical size & > alignment when targeting MIPS32 anyway, this makes little sense. >=20 > Beyond the pointlessness this causes problems for code which prints > entries from the val array, for example the fanotify_encode_fid() > function [1]. If such code uses a format specified suited to an int then > it encounters compiler warnings when building for MIPS32, such as: >=20 > In file included from include/linux/kernel.h:14:0, > from include/linux/list.h:9, > from include/linux/preempt.h:11, > from include/linux/spinlock.h:51, > from include/linux/fdtable.h:11, > from fs/notify/fanotify/fanotify.c:3: > fs/notify/fanotify/fanotify.c: In function 'fanotify_encode_fid': > include/linux/kern_levels.h:5:18: warning: format '%x' expects argument > of type 'unsigned int', but argument 2 has type 'long int' [-Wformat=3D] >=20 > Remove the custom __kernel_fsid_t definition & make use of the > asm-generic version which will have an identical layout in memory > anyway, in order to remove the inconsistency with other architectures. >=20 > One possible regression this could cause if is any code is attempting to > print entries from the val array with a long-sized format specifier, in > which case it would begin seeing compiler warnings when built against > kernel headers including this change. Since such code is exceedingly > rare, and would have to be MIPS32-specific to expect a long, this seems > to be a problem that it's extremely unlikely anyone will encounter. >=20 > [1] https://lore.kernel.org/linux-mips/CAOQ4uxiEkczB7PNCXegFC-eYb9zAGaio_= o=3DOgHAJHFd7eavBxA@mail.gmail.com/T/#mb43103277c79ef06b884359209e817db1c13= 6140 >=20 > Signed-off-by: Paul Burton > Cc: Amir Goldstein > Cc: Arnd Bergmann > Cc: Jan Kara > Cc: linux-arch@vger.kernel.org > Cc: linux-mips@vger.kernel.org Applied to mips-fixes. Thanks, Paul [ This message was auto-generated; if you believe anything is incorrect then please email paul.burton@mips.com to report it. ]