From patchwork Tue Nov 3 19:46:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 7546721 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8AA53BEEA4 for ; Tue, 3 Nov 2015 19:52:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1A3F205E3 for ; Tue, 3 Nov 2015 19:52:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA1A720431 for ; Tue, 3 Nov 2015 19:52:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756077AbbKCTwU (ORCPT ); Tue, 3 Nov 2015 14:52:20 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:33286 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932291AbbKCTqr (ORCPT ); Tue, 3 Nov 2015 14:46:47 -0500 Received: by pabfh17 with SMTP id fh17so27162775pab.0 for ; Tue, 03 Nov 2015 11:46:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt_com.20150623.gappssmtp.com; s=20150623; h=from:to:to:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:subject :date:message-id:in-reply-to:references; bh=axA68vqbmCVFaM1rOzsDoQi3ccFxtuANKNqBJvBMtU4=; b=jQUiOCLkPW2+6DMx9Phbcn3JH125KhtsitJcqRr9hq51RczU1t53emsksnCD3xDx0f oWLCqGhQb5eriNZWc0UQZ8+jU8OhUcvQZMdFc8QOKLb5QO1v0Ip6xobzsuOO8mKR66Jp 9UiXlMS9F1oa55IMkBxp245T/kgOJjbL9/jNC+OP25FGDo6oItIj1lCVJPWzqGwPSjXB V4AcYhBLGU/SF+sDUjoDnpSv18kO6bKnC8zGDMYtvQiTaYqCuMjkIucIeTz1XR56EJwk 1R7dOOQM4MVnilmT4QzZSy+dQnRC6VPDZyirb3ydPERq7XVJvXa8/9rykOlw6TQwcrvU G+Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:to:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:cc:cc:subject:date:message-id:in-reply-to:references; bh=axA68vqbmCVFaM1rOzsDoQi3ccFxtuANKNqBJvBMtU4=; b=hWq92qSuG1ajOfmf8fX2HfguWeVwVIbt421ekrfM55iIi1FwaQ4SdLA8+Og8OfR62y rOdO6edA7XpaLIxG3C9N1FkfvqkKFVfwPiRG8q8p/w11AZsAUrw08Y2mlOVf5Qip5HCQ 5YCCVk5eYmEywMWvkWfbYTGNdyAuNZ3OqysviEw7KWyWhEfLZS0SymkoTh61cIKGoWIh 4GACmH5jJeoqgWXvOM7xNay8+9Sw21f6xwf2xonClzGzvEg/eh9VSKYgVSPakgmCtEvW R2k+etu5XALYCjAj+PmihxipMMo24iMx9yT0CdF+su0guI/aWdUt3Y/lQWewZxFHwRea 58DQ== X-Gm-Message-State: ALoCoQlsuqCzlqnjHQgygjVb9P0frHf9cqFr7uaIkDs5LCeEMD535i7CYYpAbjZskrPZvvrSiIqE X-Received: by 10.66.218.198 with SMTP id pi6mr36073418pac.139.1446580007162; Tue, 03 Nov 2015 11:46:47 -0800 (PST) Received: from localhost (dhcp-39-103.EECS.Berkeley.EDU. [128.32.39.103]) by smtp.gmail.com with ESMTPSA id ou3sm30968439pbb.44.2015.11.03.11.46.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Nov 2015 11:46:46 -0800 (PST) From: Palmer Dabbelt To: arnd@arndb.de To: dhowells@redhat.com Cc: viro@zeniv.linux.org.uk Cc: ast@plumgrid.com Cc: aishchuk@linux.vnet.ibm.com Cc: aarcange@redhat.com Cc: akpm@linux-foundation.org Cc: luto@kernel.org Cc: acme@kernel.org Cc: bhe@redhat.com Cc: 3chas3@gmail.com Cc: chris@zankel.net Cc: dave@sr71.net Cc: dyoung@redhat.com Cc: drysdale@google.com Cc: davem@davemloft.net Cc: ebiederm@xmission.com Cc: geoff@infradead.org Cc: gregkh@linuxfoundation.org Cc: hpa@zytor.com Cc: mingo@kernel.org Cc: iulia.manda21@gmail.com Cc: plagnioj@jcrosoft.com Cc: jikos@kernel.org Cc: josh@joshtriplett.org Cc: kexec@lists.infradead.org Cc: linux-api@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-xtensa@linux-xtensa.org Cc: mathieu.desnoyers@efficios.com Cc: jcmvbkbc@gmail.com Cc: paulmck@linux.vnet.ibm.com Cc: a.p.zijlstra@chello.nl Cc: tglx@linutronix.de Cc: tomi.valkeinen@ti.com Cc: vgoyal@redhat.com Cc: x86@kernel.org Cc: Palmer Dabbelt Subject: [PATCH 01/13] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h Date: Tue, 3 Nov 2015 11:46:22 -0800 Message-Id: <1446579994-9937-2-git-send-email-palmer@dabbelt.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1446579994-9937-1-git-send-email-palmer@dabbelt.com> References: <1442271047-4908-1-git-send-email-palmer@dabbelt.com> <1446579994-9937-1-git-send-email-palmer@dabbelt.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When working on the RISC-V port I noticed that F_SETLK64 was being defined on our 64-bit platform, despite our port being so new that we've only ever had the 64-bit file ops. Since there's not compat layer for these, this causes fcntl to bail out. It turns out that one of the ways in with F_SETLK64 was being defined (there's some more in glibc, but that's a whole different story... :)) is the result of CONFIG_64BIT showing up in this user-visible header. confirms this isn't sane, so I replaced it with a __BITS_PER_LONG check. Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou --- include/uapi/asm-generic/fcntl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h index e063eff..14a5c82 100644 --- a/include/uapi/asm-generic/fcntl.h +++ b/include/uapi/asm-generic/fcntl.h @@ -1,6 +1,7 @@ #ifndef _ASM_GENERIC_FCNTL_H #define _ASM_GENERIC_FCNTL_H +#include #include /* @@ -115,7 +116,7 @@ #define F_GETSIG 11 /* for sockets. */ #endif -#ifndef CONFIG_64BIT +#if (__BITS_PER_LONG == 32) #ifndef F_GETLK64 #define F_GETLK64 12 /* using 'struct flock64' */ #define F_SETLK64 13