Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1612205pxb; Mon, 12 Apr 2021 02:19:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMwnm3RxZM1A1NyvE4No44byjhr0FbLPBXyRxeUPTUXCM9X2NJcNBV8foXsTVolxlN3lmF X-Received: by 2002:a17:90b:380c:: with SMTP id mq12mr7221511pjb.109.1618219153064; Mon, 12 Apr 2021 02:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618219153; cv=none; d=google.com; s=arc-20160816; b=GuN3YRG3HWhzn+TbJwrTCNyKy8rk4e8CTXUipwTplE+TpyP8IFJk9OHxUi1eK1saec ZUaBffkDR2IbOE8FuAH6Sa3FU7HxfuGYXPhUuiKRCWQTZo/moab1XfYcX/gRWKuj95p7 3E/moyDKByFhyREBTLFYEdMH7J75/CQjUuRiPgnBVerSK6CceuioWsIaAAd48COnDELg NJc9XgDSz7Nvt9OxrSSTVEnf3UxrGgBas1NF8WFCazd8ThGCfXAg4x36oRrow6u8zDDk +SJWt3rIP5cgGODSLxNSjbFUAtBtYaaWFHR+zJKqfIDTrkeFrYhWHfS5KRfDXhvy7Ew8 BPYA== 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=fgQRdEagpaZNMUiuJhh4HzfGVzVozqLdJZdOWxKQU1Q=; b=HCBQ/cyq2K/h/yCW9aFXaqsmFTbuyAmMLuLLeSxXiuKKQCmW2yOFRHNTWpyZusX/OM S8AWMoTzutSPMyp36YC7xcKK0P3VDmaXigMlFk0MPyKYnh/W3ei7wBr8TU7ZMRNAUJio BA5qUS/6Pumuhz2KoAqy+Dv8719QcOBKml4/chlDtZPt4Xveh2+dJn/BLXRPQQ75pKfJ N9UujkgGNQmE3DL9IjYmZF8Sop1b6wggc5TockhuuxZsdHX7rntUgt3nE/lxtzw+zKRp va4Zc6wng83Zdv7eqPRQ8YRbtBrdQ9POuo+5Ww53D2Z5K/YmsVe51qpKxtVp44ZJfLQb KZuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=cjDfmbji; 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 t26si12800675pgu.197.2021.04.12.02.19.01; Mon, 12 Apr 2021 02:19:13 -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=cjDfmbji; 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 S241495AbhDLJQW (ORCPT + 99 others); Mon, 12 Apr 2021 05:16:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239031AbhDLI7A (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 7D917C06135A; Mon, 12 Apr 2021 01:56:14 -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=fgQRdEagpaZNMUiuJhh4HzfGVzVozqLdJZdOWxKQU1Q=; b=cjDfmbjibw3FJuZW9g7tculTQg X5UvjE9IN7RhJyE/cV0JXLAPTzZytj4G7rKj403Lyboz+4QxvrO1a89CTwjn+bZeCtnPPitmpmBSC AsDZ/qwwP7pWoQMpmV+BZf6km/T1Hy/Mmc5r3ZoODDHFLULPIZn9jE/iENE1oTYHtL1wkxHb098rS jG58BQ7+YiChH1rk9FP2yyQc2lAjiaJjOrAIwngUci9JvxWqMYeecrSSvI0FhOk3arbLv9SIFfEK3 n4f19h/Um9lfBoZv5EstKKZVj+tNBKGTWgaeDgytQikNo8F74AjvZX+I5mXCjY0cu2XoNFMTUXrl2 brfnNDXQ==; 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 1lVsMN-0060EC-J3; Mon, 12 Apr 2021 08:55:56 +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 3/5] uapi: merge the 32-bit mips struct flock into the generic one Date: Mon, 12 Apr 2021 10:55:43 +0200 Message-Id: <20210412085545.2595431-4-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 Add a new __ARCH_FLOCK_EXTRA_SYSID macro following the style of __ARCH_FLOCK_PAD to avoid having a separate definition just for one architecture. Signed-off-by: Christoph Hellwig --- arch/mips/include/uapi/asm/fcntl.h | 26 +++----------------------- include/uapi/asm-generic/fcntl.h | 5 +++-- tools/include/uapi/asm-generic/fcntl.h | 5 +++-- 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/arch/mips/include/uapi/asm/fcntl.h b/arch/mips/include/uapi/asm/fcntl.h index 42e13dead54319..9e44ac810db94d 100644 --- a/arch/mips/include/uapi/asm/fcntl.h +++ b/arch/mips/include/uapi/asm/fcntl.h @@ -50,30 +50,10 @@ #define F_SETLKW64 35 #endif -/* - * The flavours of struct flock. "struct flock" is the ABI compliant - * variant. Finally struct flock64 is the LFS variant of struct flock. As - * a historic accident and inconsistence with the ABI definition it doesn't - * contain all the same fields as struct flock. - */ - #if _MIPS_SIM != _MIPS_SIM_ABI64 - -#include - -struct flock { - short l_type; - short l_whence; - __kernel_off_t l_start; - __kernel_off_t l_len; - long l_sysid; - __kernel_pid_t l_pid; - long pad[4]; -}; - -#define HAVE_ARCH_STRUCT_FLOCK - -#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ +#define __ARCH_FLOCK_EXTRA_SYSID long l_sysid; +#define __ARCH_FLOCK_PAD long pad[4]; +#endif #include diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h index df7ad6962dff71..7e714443a8d2e3 100644 --- a/include/uapi/asm-generic/fcntl.h +++ b/include/uapi/asm-generic/fcntl.h @@ -188,18 +188,19 @@ struct f_owner_ex { #define F_LINUX_SPECIFIC_BASE 1024 -#ifndef HAVE_ARCH_STRUCT_FLOCK struct flock { short l_type; short l_whence; __kernel_off_t l_start; __kernel_off_t l_len; +#ifdef __ARCH_FLOCK_EXTRA_SYSID + __ARCH_FLOCK_EXTRA_SYSID +#endif __kernel_pid_t l_pid; #ifdef __ARCH_FLOCK_PAD __ARCH_FLOCK_PAD #endif }; -#endif struct flock64 { short l_type; diff --git a/tools/include/uapi/asm-generic/fcntl.h b/tools/include/uapi/asm-generic/fcntl.h index 82054502b9748d..bf961a71802e0e 100644 --- a/tools/include/uapi/asm-generic/fcntl.h +++ b/tools/include/uapi/asm-generic/fcntl.h @@ -187,18 +187,19 @@ struct f_owner_ex { #define F_LINUX_SPECIFIC_BASE 1024 -#ifndef HAVE_ARCH_STRUCT_FLOCK struct flock { short l_type; short l_whence; __kernel_off_t l_start; __kernel_off_t l_len; +#ifdef __ARCH_FLOCK_EXTRA_SYSID + __ARCH_FLOCK_EXTRA_SYSID +#endif __kernel_pid_t l_pid; #ifdef __ARCH_FLOCK_PAD __ARCH_FLOCK_PAD #endif }; -#endif struct flock64 { short l_type; -- 2.30.1