From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70580C433F5 for ; Tue, 11 Jan 2022 09:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3pDHvpiCrqPeiZZM3I8mVt3JHnwej/E9deeWgAMvP+A=; b=vA1h8+vYYc3OgH /L9K5ftzcuC0wUxQpuIbmKIyhX6yp+oIW4GxprnLcv3myLP6yxmjOHXzF6O8VuyPc92W6THLtzzLe jV5p8EG4A0enjZBx2CpduyiSg2evVn2wi/q5+uwiwHNyUDiisarZTDopVkzwQL27rReYaeN3qKhZx TN6StFIIws06t/Jk+d3//izWyb6kgGoWsg4E9sT4Hm6e6AWc0z57YyLqSzXcuxkvZemMlOH1ddk/0 TpgP/+14opwmGVURaRHUODDgVlR37I19h48TgXU5X1B0sZMTlRB1MUOkFQotus6+rM/0Y/VA9p6Cs iSA5pOjyy1j6wUiJFNng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7DpK-00FfAD-KQ; Tue, 11 Jan 2022 09:52:26 +0000 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7DpG-00Ff8s-MX for linux-arm-kernel@lists.infradead.org; Tue, 11 Jan 2022 09:52:24 +0000 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-405-rXUlX-ehMDyIXirCKi7aCg-1; Tue, 11 Jan 2022 09:52:18 +0000 X-MC-Unique: rXUlX-ehMDyIXirCKi7aCg-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Tue, 11 Jan 2022 09:52:18 +0000 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.026; Tue, 11 Jan 2022 09:52:17 +0000 From: David Laight To: 'Christoph Hellwig' , Arnd Bergmann CC: Guo Ren , "x86@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-mips@vger.kernel.org" , "linux-parisc@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-s390@vger.kernel.org" , "sparclinux@vger.kernel.org" , "linux-arch@vger.kernel.org" Subject: RE: [PATCH 5/5] compat: consolidate the compat_flock{,64} definition Thread-Topic: [PATCH 5/5] compat: consolidate the compat_flock{, 64} definition Thread-Index: AQHYBsZBTBglXUWeOki+cPQc77mslqxdkbpw Date: Tue, 11 Jan 2022 09:52:17 +0000 Message-ID: References: <20220111083515.502308-1-hch@lst.de> <20220111083515.502308-6-hch@lst.de> In-Reply-To: <20220111083515.502308-6-hch@lst.de> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220111_015223_030737_F9EB9749 X-CRM114-Status: GOOD ( 12.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Christoph Hellwig > Sent: 11 January 2022 08:35 > > Provide a single common definition for the compat_flock and > compat_flock64 structures using the same tricks as for the native > variants. Another extra define is added for the packing required on > x86. > ... > /* > - * IA32 uses 4 byte alignment for 64 bit quantities, > - * so we need to pack this structure. > + * IA32 uses 4 byte alignment for 64 bit quantities, so we need to pack the > + * compat flock64 structure. > */ ... > +#define __ARCH_NEED_COMPAT_FLOCK64_PACKED Maybe: #define __ARCH_COMPAT_FLOCK64_ATTR (packed),(aligned(4) ... Delete this bit: > +#ifdef __ARCH_NEED_COMPAT_FLOCK64_PACKED > +#define __ARCH_COMPAT_FLOCK64_PACK __attribute__((packed)) > +#else > +#define __ARCH_COMPAT_FLOCK64_PACK > +#endif ... > +struct compat_flock64 { > + short l_type; > + short l_whence; > + compat_loff_t l_start; > + compat_loff_t l_len; > + compat_pid_t l_pid; > +#ifdef __ARCH_COMPAT_FLOCK64_PAD > + __ARCH_COMPAT_FLOCK64_PAD > +#endif > +} __ARCH_COMPAT_FLOCK64_PACK; then: #ifdef __ARCH_COMPAT_FLOCK64_ATTR } __attribute__(__ARCH_COMPAT_FLOCK64_ATTR); #else }; #endif Makes it a bit more like the xxx_PAD bits. Although the trailing ; does cause a bit of grief. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel