From patchwork Tue Nov 10 01:30:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 7587561 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 711CA9F2F7 for ; Tue, 10 Nov 2015 01:38:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 94A6B205DF for ; Tue, 10 Nov 2015 01:38:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A755F205DD for ; Tue, 10 Nov 2015 01:38:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752338AbbKJBi1 (ORCPT ); Mon, 9 Nov 2015 20:38:27 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36004 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbbKJBbq (ORCPT ); Mon, 9 Nov 2015 20:31:46 -0500 Received: by pacdm15 with SMTP id dm15so192686044pac.3 for ; Mon, 09 Nov 2015 17:31:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt_com.20150623.gappssmtp.com; s=20150623; h=from:to: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:subject :date:message-id:in-reply-to:references; bh=EYiC6QdQph5CknkYHQqD5x14YSkXt1YJXCd/bP8CvFk=; b=uWqW6hlayF0z7Eq95flWzPozzD/ZOxha9qDawoo+AAkVdcVpBwBElpqqdSeY036XD7 aBrpAGwoedkC/7AzprDzHWnBgmu9fTd2p1ysq1w+cffwlfVNT1XoK+T8wQ9Dvu5x1Eht 0f4PNguJpLYpwbprjX3yDmiiSV9QXsdgZ+gs3k/L8HXysnwjDLKwo224lMCyWl49JAVs zSwNS0aD4JoVPmby/cw4PUaTolBqaC9NeHsTEB8mxC/8cb6uV/LIJ47ZeF1Ub5GurvB8 WScZO2PA5M4Hb9s3JuCWnX7eL2d/4zvlEvsCa95xs/B1lke4mX0STZC8C7GAnui+K3ug QLpA== 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: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:subject:date:message-id:in-reply-to:references; bh=EYiC6QdQph5CknkYHQqD5x14YSkXt1YJXCd/bP8CvFk=; b=BxE5svbh4uAQUytkOzzts6x8ZLACiPfhpyMaZVJPI9Vapc+a44s7m1wKXDAhiGOlZg zYQ41QwCiVYvEHh2THbDFjp1NkAm1evkUDnJpfPwEs5tBN2BKvwJbPtweQLnaGzeK60A loQX2HKQXljB35oU3Xk2ZLZHDd/167gCvyr2Wuw0MSz7hMRThwz+H4SGWIF1YAXLEc4G TIquVsRK2TwUJePHOznF1ltGCt4O1OuaEmxYYDcXtLFXTZ9IWWsgJO+Ut5lbN/+nOYkw snL7EtHcHb/4EPiE2w6mHssJOhq9t4hhJ9wFvExrJ0NaEg2Mt6XY8bAoZUhyJ0RDWLAG iXtw== X-Gm-Message-State: ALoCoQmKQs1wDmmR86QMRGm8Zu5+v6FmvzMQNpIAs9EG1NVCGqtbTVcKsocwt8dfZy/h+x1G6/hP X-Received: by 10.66.62.138 with SMTP id y10mr1446042par.129.1447119106283; Mon, 09 Nov 2015 17:31:46 -0800 (PST) Received: from localhost (wap-cal.CS.Berkeley.EDU. [128.32.35.228]) by smtp.gmail.com with ESMTPSA id yq2sm605289pbb.39.2015.11.09.17.31.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Nov 2015 17:31:45 -0800 (PST) From: Palmer Dabbelt To: arnd@arndb.de To: dhowells@redhat.com To: peterz@infradead.org 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: 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/14] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h Date: Mon, 9 Nov 2015 17:30:58 -0800 Message-Id: <1447119071-19392-2-git-send-email-palmer@dabbelt.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1447119071-19392-1-git-send-email-palmer@dabbelt.com> References: <1446579994-9937-1-git-send-email-palmer@dabbelt.com> <1447119071-19392-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=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Reviewed-by: Arnd Bergmann --- 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