From patchwork Thu Jul 18 03:01:18 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: 169177 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1796160ilk; Wed, 17 Jul 2019 20:24:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDz7jJj0Od0B/u/jTZMtaiXDNGjhzeEcogdxkGQUYCDUCmoS2t/IDI1JzFWbsCIKc4nui5 X-Received: by 2002:a63:c008:: with SMTP id h8mr41939009pgg.427.1563420277803; Wed, 17 Jul 2019 20:24:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563420277; cv=none; d=google.com; s=arc-20160816; b=sVnaG4DU5Q3qvy+9qh/6gXRNM3PbnJNF7I08kAFsuW8xin1o0aywzntGbvDQbCLkYN UhkBj0kJ4HIMFOM2buZIxT15XG/dDLFUAtIsRjxGDoO0PHjX2XZIcNBXuejJ1zr5TV1k L+WaT1VKYpyiG4C5sv5oRZJpsA/WZLHT0+svMBE2KuEycppYFKBM5cTrSdcxxph0Iu+j sy6M4qI/bTVzdFg8VVYttcMH3Ech2ZYI0BxawnsmHDGknMJnFlNyhVIW/gcBTkOLHSVu NWE6KpHcWv8MrVHjtMRTYpbppXhO8pALsjnQ/kkFVtwP9w6+Ziers6KxpCEtdBhM9eRq RA5g== 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=Zsereugi3+y+qjNmeWHAXxLSaUS1+J3JkinraHyabDU=; b=paCuRzwuoDcK7F/lAdYhE1O7rnHLnV42bc7iAmETRaOZ3YN8RRYf/F5RHu2VPVgRlh YexGqJLafXKV/P3tLapf+yO022YO4w2XWR19CTgGmGhkxcCMez3Wr0VfI9g8O1S4Zvv8 6gEbV1G8cB6e6nn7wYm65E8SuGU8A+w043hzS3Ee4bp7SDCmLmhBoqpBgQEXh5AROerN opPnmLJFdl/MR8yFSM1Q1imG0HFO854/cJ9qybyHjcTEfSLaNpey95dTn/feeP9qAmLA 4nWsboU8bgd9JL60szprG1iRzayUV58H5IEgKpkUZ9jOkqL9Qy4eLhyO11WRhI9Phghr CuUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DULQb40W; 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 k11si1502145pfi.3.2019.07.17.20.24.37; Wed, 17 Jul 2019 20:24:37 -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=DULQb40W; 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 S2390793AbfGRDYg (ORCPT + 29 others); Wed, 17 Jul 2019 23:24:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:37948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389193AbfGRDGk (ORCPT ); Wed, 17 Jul 2019 23:06:40 -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 396C3204EC; Thu, 18 Jul 2019 03:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563419198; bh=EOqjTyZARP8Mz1ivHyEMBzL8+5UqiihTHldWS5cAR2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DULQb40Wa5sSt4PLsVnNQUfpDkne3gWjCgcet6WMaUANYrQmmEmGf2W4dgdYsOIOM hBbDrf0pXrgK0zYR4fdi700NrIyD5j/OXw2n4IwjcW+xg+1UIiFlgOXjsX8Gg2cLX5 ZMSM1VEtvsPS+9E8y7ELITFK/NUkY3IXYV+xegS0= 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.19 04/47] nilfs2: do not use unexported cpu_to_le32()/le32_to_cpu() in uapi header Date: Thu, 18 Jul 2019 12:01:18 +0900 Message-Id: <20190718030047.398047851@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190718030045.780672747@linuxfoundation.org> References: <20190718030045.780672747@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 @@ -29,7 +29,7 @@ #include #include - +#include #define NILFS_INODE_BMAP_SIZE 7 @@ -533,19 +533,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)); \ } @@ -595,20 +595,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)); \ } @@ -619,15 +619,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); } /** From patchwork Thu Jul 18 03:01:50 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: 169170 Delivered-To: patch@linaro.org Received: by 2002:ac9:6410:0:0:0:0:0 with SMTP id r16csp1792174ock; Wed, 17 Jul 2019 20:07:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyUiyHJI1QYcJ4rYEQp4ryrwBGmD1B9zQiQ2ZTyg5eE1xXCJ1H25fEj9TJ1FPQv9MDyLMG X-Received: by 2002:a63:4845:: with SMTP id x5mr43930155pgk.155.1563419268982; Wed, 17 Jul 2019 20:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563419268; cv=none; d=google.com; s=arc-20160816; b=IwhVnxjWsEiEuOl0WCYNEglaRCjp6FQSNyTJ1kZqFlGfdjVVwqYqFFGzWrLTpTtk08 eiq5z1m6UWY1VRhjZUBm/nau7XWSDhPuB4P+PFXF3ExqUyIX3c57Ia0SpxrBN5kpTf0+ t9Ach2DVdwi+dasbktumB+yzIjaQbSpZNG0kszzov+48ar73RTpo07TcoDU1N+IYf2qo rmFN7dX+/vc/zxYDNbWQUa6K1idMXaF91agcGpMCd9TahyBlA7oJJWdK13YWPieZRU4V IUJ5Tgcxw+3R6/pYPkD0B+585UschhVoj02shm5fu3MLss2DDoAIHsc5eySgGCu1++rL s5wQ== 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=tw4HKsuEnMQYGDl0ytTXg6FE49BzgogHiTN0btdqeW8=; b=tCYxnGaJoh3vwf1Vi4GMxAT+iqkzU8cQjDzJ/kHmwixsNSE4tKjVw12QIMt4mvQUfV jpyjL7qyGM81mv1FeGLBaaKIf6BPgibHPESnXZgMsSeoQ8vlvEEtDTzkYIPExZCid4Kx qSgFJ4ArZm44ilWtj7+P8D3AkfmxXG5F7olVuerP2yJ9zP7p5hXdQOmQDiEtbKIaEKzl ICPUNwRKvTBgBhDGVZE6CcS72SdMZS5ZZrms8TAsdmMX4Pljh5ITMua6q3SK3JMdYJEC FODu9A0SNWZFteqUnIXdS1LD3gRXirHadjI2gnnTA/j9YGiDRuQ33Wr8TBHCwAFhMmWX 5rVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ryx4VF8m; 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 u12si25482416pgg.87.2019.07.17.20.07.48; Wed, 17 Jul 2019 20:07:48 -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=ryx4VF8m; 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 S2390549AbfGRDHr (ORCPT + 29 others); Wed, 17 Jul 2019 23:07:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:39464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390513AbfGRDHm (ORCPT ); Wed, 17 Jul 2019 23:07:42 -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 EF19B2173E; Thu, 18 Jul 2019 03:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563419261; bh=6TvLc+s1Z5B/h1l3/U0Pe2FamVxtuWOhIhEnM7zXQp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ryx4VF8mZCxLzgYAN6epACOtx1BkSrnpK0C+gcxdKTAYVhOWQ0KOoCCSwCRO2G++o cbrAWTpTSRNZ3dbZH9ssTD7lKLY6PJ+v3AWoHKrnJJvYRlZP2wJmQg7KVrxUzI0Qqt +vlMTYDuh12YNm/q9NDyIeMyihtNZstx7sOX7ucY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Vineet Gupta Subject: [PATCH 4.19 36/47] ARC: hide unused function unw_hdr_alloc Date: Thu, 18 Jul 2019 12:01:50 +0900 Message-Id: <20190718030051.825109263@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190718030045.780672747@linuxfoundation.org> References: <20190718030045.780672747@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: Arnd Bergmann commit fd5de2721ea7d16e2b16c4049ac49f229551b290 upstream. As kernelci.org reports, this function is not used in vdk_hs38_defconfig: arch/arc/kernel/unwind.c:188:14: warning: 'unw_hdr_alloc' defined but not used [-Wunused-function] Fixes: bc79c9a72165 ("ARC: dw2 unwind: Reinstante unwinding out of modules") Link: https://kernelci.org/build/id/5d1cae3f59b514300340c132/logs/ Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Vineet Gupta Signed-off-by: Greg Kroah-Hartman --- arch/arc/kernel/unwind.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- a/arch/arc/kernel/unwind.c +++ b/arch/arc/kernel/unwind.c @@ -185,11 +185,6 @@ static void *__init unw_hdr_alloc_early( MAX_DMA_ADDRESS); } -static void *unw_hdr_alloc(unsigned long sz) -{ - return kmalloc(sz, GFP_KERNEL); -} - static void init_unwind_table(struct unwind_table *table, const char *name, const void *core_start, unsigned long core_size, const void *init_start, unsigned long init_size, @@ -370,6 +365,10 @@ ret_err: } #ifdef CONFIG_MODULES +static void *unw_hdr_alloc(unsigned long sz) +{ + return kmalloc(sz, GFP_KERNEL); +} static struct unwind_table *last_table;