From patchwork Thu Jul 18 03:02:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 169174 Delivered-To: patch@linaro.org Received: by 2002:ac9:6410:0:0:0:0:0 with SMTP id r16csp1798427ock; Wed, 17 Jul 2019 20:14:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2DkZ6XUh/JMa2SBmn2yG5ZDf5SsmCqp3GDll3WLpv08713cRpge0Fb/GobOaoYUxWkPWp X-Received: by 2002:a17:902:4401:: with SMTP id k1mr23965215pld.193.1563419665376; Wed, 17 Jul 2019 20:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563419665; cv=none; d=google.com; s=arc-20160816; b=HGLcI5jyT7p/LE2FJa/rfvP4u5YZjHfrLl4+J90QehLEC4C/qCC55VfRSruvHRZP/7 e6vX34WhokCZnlo/zMzuopm9Q7ECMyyNSQxlQCB8MyMmyYXhQiXUQRBPEuHQofWpvJzw HLkdMTR9k+3GynWH/hrRc9xqHNMu/SPczPmEPo0Yj0wDZL5lZpAx3IqBYRZmRUA4NaEK giQIkXIvE7kD9yRN4z4BHdRR5HZFWR1vUXiny+Gh/Tn6l00EiUr/k8siUNKWX/iSd/hM nVh2jtBPNX7OTYVwCWnD5oY2Y9cATlpUgYHYpHRElIjjMLLWxsGWXgUZRbBgXuXcGJbJ +inQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EmIlpWmV4m8Ipk3hB6zZddLJ89pCBfmYDYBi/Pr8+h8=; b=Pv0Y9YZpddznTbxTyQvTiZ5HZ7CbotyXI+C/HijEUVyNFx3oiI07zyjAICoW5eUYr5 HUc9R3KgxzpCrf73iA4avhcADk8PXC7cIlcHN9FZVLhJSzctoz4vLaC5uR+Y9cjx/wqm xW9awxnCeFY4XbQ9kqmRaizPpod6RWww4WJMek/tXAQ+6/cs6cwc6i32+8Z3qKvx+JtP +zfzpIu2xgU+1/YUB56WrlWyHcf1O/cZBv6/SE+QJrot4mfSYaooF5JD32ade35cI+1r lh7CUGFEy8z+L0GoDgxjS2+WxQEBn6lJckFk2HSt7Gkqr/mUPxSd/MvO7AHKExWg7uhd lBgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v6TL5jlh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si439216pgl.323.2019.07.17.20.14.25; Wed, 17 Jul 2019 20:14:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v6TL5jlh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391773AbfGRDOY (ORCPT + 29 others); Wed, 17 Jul 2019 23:14:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:50114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391748AbfGRDOT (ORCPT ); Wed, 17 Jul 2019 23:14:19 -0400 Received: from localhost (115.42.148.210.bf.2iij.net [210.148.42.115]) (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 EB17121851; Thu, 18 Jul 2019 03:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563419658; bh=TlS8tz8H1kZrLczaaWRcbYa0MA4c8Uqfg5UsM/T03iY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v6TL5jlhQbabfW6viGiiohEWZvVk+mJsIZxKbeurhQhW36bVMZFoqp7gKMvnZ2ixH eILIdwr6upavNu1lySvoIH5cuxHzF+aH+in/We2AEb6zsEkjFaMCezbYsMC3/sA9mp Rml08fCIrAQKhCzoJufAXuOzWvJ28HteKtzvseVc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Ryusuke Konishi , Arnd Bergmann , Joe Perches , Andrew Morton , Linus Torvalds Subject: [PATCH 4.9 42/54] nilfs2: do not use unexported cpu_to_le32()/le32_to_cpu() in uapi header Date: Thu, 18 Jul 2019 12:02:12 +0900 Message-Id: <20190718030052.757659787@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190718030048.392549994@linuxfoundation.org> References: <20190718030048.392549994@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada commit c32cc30c0544f13982ee0185d55f4910319b1a79 upstream. cpu_to_le32/le32_to_cpu is defined in include/linux/byteorder/generic.h, which is not exported to user-space. UAPI headers must use the ones prefixed with double-underscore. Detected by compile-testing exported headers: include/linux/nilfs2_ondisk.h: In function `nilfs_checkpoint_set_snapshot': include/linux/nilfs2_ondisk.h:536:17: error: implicit declaration of function `cpu_to_le32' [-Werror=implicit-function-declaration] cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) | \ ^ include/linux/nilfs2_ondisk.h:552:1: note: in expansion of macro `NILFS_CHECKPOINT_FNS' NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot) ^~~~~~~~~~~~~~~~~~~~ include/linux/nilfs2_ondisk.h:536:29: error: implicit declaration of function `le32_to_cpu' [-Werror=implicit-function-declaration] cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) | \ ^ include/linux/nilfs2_ondisk.h:552:1: note: in expansion of macro `NILFS_CHECKPOINT_FNS' NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot) ^~~~~~~~~~~~~~~~~~~~ include/linux/nilfs2_ondisk.h: In function `nilfs_segment_usage_set_clean': include/linux/nilfs2_ondisk.h:622:19: error: implicit declaration of function `cpu_to_le64' [-Werror=implicit-function-declaration] su->su_lastmod = cpu_to_le64(0); ^~~~~~~~~~~ Link: http://lkml.kernel.org/r/20190605053006.14332-1-yamada.masahiro@socionext.com Fixes: e63e88bc53ba ("nilfs2: move ioctl interface and disk layout to uapi separately") Signed-off-by: Masahiro Yamada Acked-by: Ryusuke Konishi Cc: Arnd Bergmann Cc: Greg KH Cc: Joe Perches Cc: [4.9+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- include/uapi/linux/nilfs2_ondisk.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) --- a/include/uapi/linux/nilfs2_ondisk.h +++ b/include/uapi/linux/nilfs2_ondisk.h @@ -28,7 +28,7 @@ #include #include - +#include #define NILFS_INODE_BMAP_SIZE 7 @@ -532,19 +532,19 @@ enum { static inline void \ nilfs_checkpoint_set_##name(struct nilfs_checkpoint *cp) \ { \ - cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) | \ - (1UL << NILFS_CHECKPOINT_##flag)); \ + cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) | \ + (1UL << NILFS_CHECKPOINT_##flag)); \ } \ static inline void \ nilfs_checkpoint_clear_##name(struct nilfs_checkpoint *cp) \ { \ - cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) & \ + cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) & \ ~(1UL << NILFS_CHECKPOINT_##flag)); \ } \ static inline int \ nilfs_checkpoint_##name(const struct nilfs_checkpoint *cp) \ { \ - return !!(le32_to_cpu(cp->cp_flags) & \ + return !!(__le32_to_cpu(cp->cp_flags) & \ (1UL << NILFS_CHECKPOINT_##flag)); \ } @@ -594,20 +594,20 @@ enum { static inline void \ nilfs_segment_usage_set_##name(struct nilfs_segment_usage *su) \ { \ - su->su_flags = cpu_to_le32(le32_to_cpu(su->su_flags) | \ + su->su_flags = __cpu_to_le32(__le32_to_cpu(su->su_flags) | \ (1UL << NILFS_SEGMENT_USAGE_##flag));\ } \ static inline void \ nilfs_segment_usage_clear_##name(struct nilfs_segment_usage *su) \ { \ su->su_flags = \ - cpu_to_le32(le32_to_cpu(su->su_flags) & \ + __cpu_to_le32(__le32_to_cpu(su->su_flags) & \ ~(1UL << NILFS_SEGMENT_USAGE_##flag)); \ } \ static inline int \ nilfs_segment_usage_##name(const struct nilfs_segment_usage *su) \ { \ - return !!(le32_to_cpu(su->su_flags) & \ + return !!(__le32_to_cpu(su->su_flags) & \ (1UL << NILFS_SEGMENT_USAGE_##flag)); \ } @@ -618,15 +618,15 @@ NILFS_SEGMENT_USAGE_FNS(ERROR, error) static inline void nilfs_segment_usage_set_clean(struct nilfs_segment_usage *su) { - su->su_lastmod = cpu_to_le64(0); - su->su_nblocks = cpu_to_le32(0); - su->su_flags = cpu_to_le32(0); + su->su_lastmod = __cpu_to_le64(0); + su->su_nblocks = __cpu_to_le32(0); + su->su_flags = __cpu_to_le32(0); } static inline int nilfs_segment_usage_clean(const struct nilfs_segment_usage *su) { - return !le32_to_cpu(su->su_flags); + return !__le32_to_cpu(su->su_flags); } /**