From patchwork Sat Nov 21 21:48:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 330244 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90E19C388F9 for ; Sat, 21 Nov 2020 21:49:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D30C21D81 for ; Sat, 21 Nov 2020 21:49:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="S2vg9Kst" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728606AbgKUVsq (ORCPT ); Sat, 21 Nov 2020 16:48:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:47014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728599AbgKUVsq (ORCPT ); Sat, 21 Nov 2020 16:48:46 -0500 Received: from kicinski-fedora-PC1C0HJN.thefacebook.com (unknown [163.114.132.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E5D1521D7E; Sat, 21 Nov 2020 21:48:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605995326; bh=9xebCy/5h9a08NqCBUdtKx6/KbhB5sEnm1537FibNDY=; h=From:To:Cc:Subject:Date:From; b=S2vg9Kstz5Ia/EHqsNQHZTI3cmm6jxD3CQKyxBxXHWmQjqy1fjpIabD3u26iculdG Gb5KDYo28zOjWxUS7OCxcKWop8VtFkhFjadsVSO2Q6BoE+wcXyDod6U0a519G3l7r4 VDsjc83TXQMNe9GPjvpaWI0n1kPOvfxE2FgOg/sw= From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, hch@lst.de, arnd@arndb.de, Jakub Kicinski Subject: [PATCH net-next v2] compat: always include linux/compat.h from net/compat.h Date: Sat, 21 Nov 2020 13:48:44 -0800 Message-Id: <20201121214844.1488283-1-kuba@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We're about to do reshuffling in networking headers and eliminate some implicit includes. This results in: In file included from ../net/ipv4/netfilter/arp_tables.c:26: include/net/compat.h:60:40: error: unknown type name ‘compat_uptr_t’; did you mean ‘compat_ptr_ioctl’? struct sockaddr __user **save_addr, compat_uptr_t *ptr, ^~~~~~~~~~~~~ compat_ptr_ioctl include/net/compat.h:61:4: error: unknown type name ‘compat_size_t’; did you mean ‘compat_sigset_t’? compat_size_t *len); ^~~~~~~~~~~~~ compat_sigset_t Currently net/compat.h depends on linux/compat.h being included first. After the upcoming changes this would break the 32bit build. Signed-off-by: Jakub Kicinski Reviewed-by: Arnd Bergmann Reviewed-by: Christoph Hellwig --- v2: - correct the commit message - remove the ifdef completely (Arnd) --- include/net/compat.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/include/net/compat.h b/include/net/compat.h index 745db0d605b6..84805bdc4435 100644 --- a/include/net/compat.h +++ b/include/net/compat.h @@ -5,8 +5,6 @@ struct sock; -#if defined(CONFIG_COMPAT) - #include struct compat_msghdr { @@ -48,14 +46,6 @@ struct compat_rtentry { unsigned short rt_irtt; /* Initial RTT */ }; -#else /* defined(CONFIG_COMPAT) */ -/* - * To avoid compiler warnings: - */ -#define compat_msghdr msghdr -#define compat_mmsghdr mmsghdr -#endif /* defined(CONFIG_COMPAT) */ - int __get_compat_msghdr(struct msghdr *kmsg, struct compat_msghdr __user *umsg, struct sockaddr __user **save_addr, compat_uptr_t *ptr, compat_size_t *len);