From patchwork Wed Sep 9 21:08:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 7149141 Return-Path: X-Original-To: patchwork-linux-fbdev@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 AF6BFBEEC1 for ; Wed, 9 Sep 2015 21:16:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E145620989 for ; Wed, 9 Sep 2015 21:16:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 182F420991 for ; Wed, 9 Sep 2015 21:16:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755797AbbIIVQk (ORCPT ); Wed, 9 Sep 2015 17:16:40 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:36049 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752868AbbIIVIq (ORCPT ); Wed, 9 Sep 2015 17:08:46 -0400 Received: by padhk3 with SMTP id hk3so20673226pad.3 for ; Wed, 09 Sep 2015 14:08:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc:cc :cc:cc:subject:date:message-id:in-reply-to:references; bh=iH9FcTOfeMwKgzm38B458bNB7utbwGnlKfk9E1aedmg=; b=AA5q64dLjaOmXpJKOdkSQvMnzkThyTfLz23a7SrlLo8Gmv4w9FT4xpOisJDXBwsve2 ciUG+d/5++Se35ceN98B4ZEiG0geFc7OV57zk5MdlJYRynkXCY90j9kZKD2CwU/oEs9M cHQ4DGv5SPrhaUHeCqSEv0V69qlPLNnrO+lTNqUZwUr7oE1yfFxIgWMLBEiMNyYmqUE5 XiX/XT2QYMJh1QonDhdoYEPv0uAKr6pKh7nbA2mMcip0WqKfL+1s1AR/hxmQJbEvIWEk /uBfQUdpGCfhwpvop1BwPec1d8xVEf7r6CCluLJGQ/BPD/DwzaxMNvc8UmSzUXg+3LPd E74w== X-Gm-Message-State: ALoCoQmiZul4WDQ0cNTKQpCafV4ZbyUG2DPKgpAuWDstuBMF9qymCGP+TBWP1MegMplK+1b6lBQX X-Received: by 10.68.89.35 with SMTP id bl3mr75760880pbb.69.1441832926230; Wed, 09 Sep 2015 14:08:46 -0700 (PDT) Received: from localhost (wap-cal.CS.Berkeley.EDU. [128.32.35.228]) by smtp.gmail.com with ESMTPSA id e1sm8031568pda.30.2015.09.09.14.08.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2015 14:08:45 -0700 (PDT) From: Palmer Dabbelt To: arnd@arndb.de Cc: 3chas3@gmail.com Cc: hpa@zytor.com Cc: mingo@redhat.com Cc: plagnioj@jcrosoft.com Cc: jikos@kernel.org Cc: linux-api@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-atm-general@lists.sourceforge.net Cc: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Cc: tglx@linutronix.de Cc: tomi.valkeinen@ti.com Cc: x86@kernel.org Cc: Palmer Dabbelt Subject: [PATCH 01/13] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h Date: Wed, 9 Sep 2015 14:08:10 -0700 Message-Id: <1441832902-28993-2-git-send-email-palmer@dabbelt.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1441832902-28993-1-git-send-email-palmer@dabbelt.com> References: <2644177.lVCYzIBfPW@wuerfel> <1441832902-28993-1-git-send-email-palmer@dabbelt.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 e063effe0cc1..14a5c8237d84 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