From patchwork Tue Jul 15 07:39:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 4551711 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7E3249F3BC for ; Tue, 15 Jul 2014 07:41:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8932E2012B for ; Tue, 15 Jul 2014 07:41:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5BDE720122 for ; Tue, 15 Jul 2014 07:41:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X6xKy-0005LS-O0; Tue, 15 Jul 2014 07:39:44 +0000 Received: from [2001:41c8:1:628a::89] (helo=benson.vm.bytemark.co.uk) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X6xKu-0005AI-MP for linux-arm-kernel@lists.infradead.org; Tue, 15 Jul 2014 07:39:41 +0000 Received: from cpc22-cmbg14-2-0-cust482.5-4.cable.virginm.net ([86.6.25.227] helo=celaeno.hellion.org.uk) by benson.vm.bytemark.co.uk with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1X6xKR-0002t0-H9; Tue, 15 Jul 2014 08:39:11 +0100 Received: from dagon.hellion.org.uk ([192.168.1.7]) by celaeno.hellion.org.uk with smtp (Exim 4.80) (envelope-from ) id 1X6xKM-0005U6-I3; Tue, 15 Jul 2014 08:39:07 +0100 Received: by dagon.hellion.org.uk (sSMTP sendmail emulation); Tue, 15 Jul 2014 08:39:06 +0100 From: Ian Campbell To: linux-arm-kernel@vger.kernel.org Subject: [PATCH] arm64: Move struct stat64 to uapi. Date: Tue, 15 Jul 2014 08:39:06 +0100 Message-Id: <1405409946-1790-1-git-send-email-ijc@hellion.org.uk> X-Mailer: git-send-email 2.0.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140715_003941_092250_8C1867FB X-CRM114-Status: GOOD ( 16.00 ) X-Spam-Score: 1.3 (+) Cc: David Howells , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, Ian Campbell X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 This struct is part of the user API for compat tasks so I think it belongs in uapi and should use the __uFOO types. This was exposed by the Debian kernel's application of the aufs patches which led to: In file included from /«PKGBUILDDIR»/include/linux/mm.h:23:0, from /«PKGBUILDDIR»/include/linux/pid_namespace.h:6, from /«PKGBUILDDIR»/include/linux/ptrace.h:9, from /«PKGBUILDDIR»/arch/arm64/include/asm/compat.h:26, from /«PKGBUILDDIR»/arch/arm64/include/asm/stat.h:23, from /«PKGBUILDDIR»/include/linux/stat.h:5, from /«PKGBUILDDIR»/include/linux/module.h:10, from /«PKGBUILDDIR»/init/main.c:15: /«PKGBUILDDIR»/include/linux/fs.h:1575:64: warning: 'struct kstat' declared inside parameter list [enabled by default] int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); ^ /«PKGBUILDDIR»/include/linux/fs.h:1575:64: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] This is due to an extra fs.h include added to mm.h. arm64 was the only arch built by Debian which had an issue with this, so I think it is an issue with the arm64 headers rather than the aufs patches. Full logs in http://buildd.debian-ports.org/status/fetch.php?pkg=linux&arch=arm64&ver=3.14.12-1&stamp=1405234443 Signed-off-by: Ian Campbell Cc: Catalin Marinas Cc: Will Deacon Cc: David Howells Cc: linux-arm-kernel@lists.infradead.org --- arch/arm64/include/asm/stat.h | 61 -------------------------------------- arch/arm64/include/uapi/asm/stat.h | 42 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 61 deletions(-) delete mode 100644 arch/arm64/include/asm/stat.h diff --git a/arch/arm64/include/asm/stat.h b/arch/arm64/include/asm/stat.h deleted file mode 100644 index 15e3559..0000000 --- a/arch/arm64/include/asm/stat.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef __ASM_STAT_H -#define __ASM_STAT_H - -#include - -#ifdef CONFIG_COMPAT - -#include - -/* - * struct stat64 is needed for compat tasks only. Its definition is different - * from the generic struct stat64. - */ -struct stat64 { - compat_u64 st_dev; - unsigned char __pad0[4]; - -#define STAT64_HAS_BROKEN_ST_INO 1 - compat_ulong_t __st_ino; - compat_uint_t st_mode; - compat_uint_t st_nlink; - - compat_ulong_t st_uid; - compat_ulong_t st_gid; - - compat_u64 st_rdev; - unsigned char __pad3[4]; - - compat_s64 st_size; - compat_ulong_t st_blksize; - compat_u64 st_blocks; /* Number of 512-byte blocks allocated. */ - - compat_ulong_t st_atime; - compat_ulong_t st_atime_nsec; - - compat_ulong_t st_mtime; - compat_ulong_t st_mtime_nsec; - - compat_ulong_t st_ctime; - compat_ulong_t st_ctime_nsec; - - compat_u64 st_ino; -}; - -#endif -#endif diff --git a/arch/arm64/include/uapi/asm/stat.h b/arch/arm64/include/uapi/asm/stat.h index eeb702e..4bc1f59 100644 --- a/arch/arm64/include/uapi/asm/stat.h +++ b/arch/arm64/include/uapi/asm/stat.h @@ -13,4 +13,46 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#ifndef __ASM_STAT_H +#define __ASM_STAT_H + +#include + #include + +/* + * struct stat64 is needed for compat tasks only. Its definition is different + * from the generic struct stat64. + */ +struct stat64 { + __u64 st_dev; + __u8 __pad0[4]; + +#define STAT64_HAS_BROKEN_ST_INO 1 + __u32 __st_ino; + __u32 st_mode; + __u32 st_nlink; + + __u32 st_uid; + __u32 st_gid; + + __u64 st_rdev; + __u8 __pad3[4]; + + __s64 st_size; + __u32 st_blksize; + __u64 st_blocks; /* Number of 512-byte blocks allocated. */ + + __u32 st_atime; + __u32 st_atime_nsec; + + __u32 st_mtime; + __u32 st_mtime_nsec; + + __u32 st_ctime; + __u32 st_ctime_nsec; + + __u64 st_ino; +}; + +#endif