Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1612253pxb; Mon, 12 Apr 2021 02:19:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypIL4u55fDTBjqOrcVPCsoeBNVOEB05izbrnsdQEo2SSmB+exx3i7Jq3810R35QnB0r7LO X-Received: by 2002:a05:6a00:23c5:b029:249:c2d7:b7d1 with SMTP id g5-20020a056a0023c5b0290249c2d7b7d1mr9223131pfc.81.1618219159084; Mon, 12 Apr 2021 02:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618219159; cv=none; d=google.com; s=arc-20160816; b=QoDUODUSq6zjNvKIiZt5ibikevL2tpjbGThhiBdPcq9DFk5oo/MLKU9MOwhYjUrp7R PJMIzBaaOfHQqo09cHDtMEt2esYlkZGmSRjG/NvtuSeD+FbOFvX/GPQgkI83CPjVlZN2 LPwI4jjbc9g50E4q08iwYiGXUeu3pfzelG8XErUnf6uDC0Pqzgfr5ATbkWjQ+D9xtAcp 5/uz96qsifMJ1vW5IGicGK1VIXUXsNE3tr5EbAIZvYgw6ey7ULy+/1Se4mBZfrOpdm4n W6V56M7FVcNHm+nerPdwmbaZvoL8qvUehLKcVzzHhnDMxU57xfVUuwOQPF7I62UFc/U3 kubQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2i9k3XnPRqvmbHX7dvelQqL0adEzvQYNCM38u+lMXro=; b=WPaPJpT7dTbiuf+XK8THj78xNiNDMPigmxqJJJpWpVXsfBxm6mN3ToskMPUes9VBCP T9kS7ncjoVGtxTyq6Geb0QB76NZ3/5OE0oW5WNGurZ0F5t7NF5u82GaNL2zhNrNglA25 thZ72e8KxLLgneoScWaOi+JJ+WffuXvFFy1uTbzI8XsxvU+vxXoO2+6I9QSoBERKJ2EK FAlTm2qSNxTQpTaNQ/q+/HQrwqalVNUEH5ALnUy1BgvpNQqRfleoNuHIv5auheqjv7jn yT81H++0fcet679LN2TQz9zHAo5fvBxSTVy76kelr9kGQTBeWHJcT0MufifiH9+AfqJp DhBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="RS/E5cUe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s139si13445586pfc.9.2021.04.12.02.19.04; Mon, 12 Apr 2021 02:19:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="RS/E5cUe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241429AbhDLJQM (ORCPT + 99 others); Mon, 12 Apr 2021 05:16:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238799AbhDLI7A (ORCPT ); Mon, 12 Apr 2021 04:59:00 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C107C061357; Mon, 12 Apr 2021 01:56:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=2i9k3XnPRqvmbHX7dvelQqL0adEzvQYNCM38u+lMXro=; b=RS/E5cUeXPW58MpDtNE/QxGjun IlLHXJ5FINhY8bwvOHzpCY/lZPTxBNnPotxjtFD5UtSX5qtfJ2IkT5EN4cWxNKNS80SuvLGHS8Wrt XUEatITql0aChxpiGvL4a39jU9XOPZJEL687v5P6Xzxtb47r46fd8xqcOy23mlcmAOK0GIQUjDPXL Suy9otxF9ewgxNYkzyyrHYpXdtgc4lu95Yi9zyOGnSEhLCa2LV51x4ycZ+WixvreJwaa12LgPKocp 0W/6FKcEqL4idUEu89STvrmRIbtMe2l3MKRKHyBaptpL2EoINsT3RbOqPkiCbvi3s2W6tmHHQvfXN G/uqREwQ==; Received: from [2001:4bb8:199:e2bd:3218:1918:85d1:2852] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lVsMK-0060Dt-T7; Mon, 12 Apr 2021 08:55:53 +0000 From: Christoph Hellwig To: Catalin Marinas , Will Deacon , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , "David S. Miller" , x86@kernel.org, Arnd Bergmann Cc: 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: [PATCH 2/5] uapi: simplify __ARCH_FLOCK{,64}_PAD a little Date: Mon, 12 Apr 2021 10:55:42 +0200 Message-Id: <20210412085545.2595431-3-hch@lst.de> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210412085545.2595431-1-hch@lst.de> References: <20210412085545.2595431-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't bother to define emtpty versions of the macros if the architecture doesn't define them. Signed-off-by: Christoph Hellwig --- include/uapi/asm-generic/fcntl.h | 12 ++++-------- tools/include/uapi/asm-generic/fcntl.h | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h index fb454bb629d114..df7ad6962dff71 100644 --- a/include/uapi/asm-generic/fcntl.h +++ b/include/uapi/asm-generic/fcntl.h @@ -189,22 +189,16 @@ struct f_owner_ex { #define F_LINUX_SPECIFIC_BASE 1024 #ifndef HAVE_ARCH_STRUCT_FLOCK -#ifndef __ARCH_FLOCK_PAD -#define __ARCH_FLOCK_PAD -#endif - struct flock { short l_type; short l_whence; __kernel_off_t l_start; __kernel_off_t l_len; __kernel_pid_t l_pid; +#ifdef __ARCH_FLOCK_PAD __ARCH_FLOCK_PAD -}; #endif - -#ifndef __ARCH_FLOCK64_PAD -#define __ARCH_FLOCK64_PAD +}; #endif struct flock64 { @@ -213,7 +207,9 @@ struct flock64 { __kernel_loff_t l_start; __kernel_loff_t l_len; __kernel_pid_t l_pid; +#ifdef __ARCH_FLOCK64_PAD __ARCH_FLOCK64_PAD +#endif }; #endif /* _ASM_GENERIC_FCNTL_H */ diff --git a/tools/include/uapi/asm-generic/fcntl.h b/tools/include/uapi/asm-generic/fcntl.h index 4a49d33ca4d55d..82054502b9748d 100644 --- a/tools/include/uapi/asm-generic/fcntl.h +++ b/tools/include/uapi/asm-generic/fcntl.h @@ -188,22 +188,16 @@ struct f_owner_ex { #define F_LINUX_SPECIFIC_BASE 1024 #ifndef HAVE_ARCH_STRUCT_FLOCK -#ifndef __ARCH_FLOCK_PAD -#define __ARCH_FLOCK_PAD -#endif - struct flock { short l_type; short l_whence; __kernel_off_t l_start; __kernel_off_t l_len; __kernel_pid_t l_pid; +#ifdef __ARCH_FLOCK_PAD __ARCH_FLOCK_PAD -}; #endif - -#ifndef __ARCH_FLOCK64_PAD -#define __ARCH_FLOCK64_PAD +}; #endif struct flock64 { @@ -212,7 +206,9 @@ struct flock64 { __kernel_loff_t l_start; __kernel_loff_t l_len; __kernel_pid_t l_pid; +#ifdef __ARCH_FLOCK64_PAD __ARCH_FLOCK64_PAD +#endif }; #endif /* _ASM_GENERIC_FCNTL_H */ -- 2.30.1