From patchwork Thu Jul 18 03:01:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 169168 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1776833ilk; Wed, 17 Jul 2019 20:03:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqztBi+arG5ZsZw2d0Jkd25mqCJx7TDk2CUSiRgOjzORNK+MWligHVZAxMZEocZJELKctQje X-Received: by 2002:a17:90a:898e:: with SMTP id v14mr48238384pjn.119.1563419005239; Wed, 17 Jul 2019 20:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563419005; cv=none; d=google.com; s=arc-20160816; b=MfPcgeoJfoUoIPu+gDlwssGMqStFibK4sbLQc7ZjhKfFHac35CdNb+HejFuoLWHqOE DhydOmjh9qoxlkKlupbnlRnliHFqAv8uVCRyshEET6O+P2bbtMgJY5rj+crhrjo3re1a fvaCnP8X4qD83T9Mio9qg9euGoDB/aVcyikqRbFgnMyQX2S8JjArbgb80qc4IvBrkf0N NSn/yRInAQgvx8Re22OjbHOXXVc165SGdjxg128Oo42XrssG+2CZWIwxLl9PeUbp5RHj zbMZwWvId+BtED6hxEGampMMlMO/zktiKbP+Z5aE8nnB8idFOqvFOWXay0o90GuI1Oh8 k9uQ== 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=defb9vYXsl6slBT5KAPAPSc+VdHRS9mkLt3iezwI1NHAIvIfgjQNmutP5m/pOOn0d/ D8TuoYFxsEoPaPlinv7k2KotGxIfFCpOm/LuiPQ2KgS+g8QGwF807AxQTK5gx/FSTXf5 Ey+daTXBTl5kjsY3Gmlt8A/qHmTm98NbdgjFyYoPljGW9E4jFcYuVjX0Y6M3n2t94eJm xjgfY4BwdnN9wL4DmemrtNgFrCm/nFfnc6bkVtBhLjG6aqRfHQeqdg25tG2EC69uVpxB UHirDKhPQYYFpZ7zqAT+JC/dO7hcmTL3cuNXb/QcnWc8RXRQNnNHG13IYwapSbhIgFbK STcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2HR06Fed; 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 l6si640735pgr.378.2019.07.17.20.03.24; Wed, 17 Jul 2019 20:03: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=2HR06Fed; 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 S2389297AbfGRDDX (ORCPT + 29 others); Wed, 17 Jul 2019 23:03:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:34014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389252AbfGRDDV (ORCPT ); Wed, 17 Jul 2019 23:03:21 -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 62E932173B; Thu, 18 Jul 2019 03:03:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563419000; bh=EOqjTyZARP8Mz1ivHyEMBzL8+5UqiihTHldWS5cAR2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2HR06FedZxaz7DJY0pBnjLjfnXIL+pSXL/k/Wg0iEkJqzBBha2aWgygD1hyHDB3Vf BPzKYmy5Kpqz20Sd25KagtOdZCDGdv6knRN82EoO5AZy55UUhQzCf/PEVopwr16DuW cW5CqChZW5C951D0Midxt+2YucTBrR/ZLbnwFRgM= 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 5.2 04/21] nilfs2: do not use unexported cpu_to_le32()/le32_to_cpu() in uapi header Date: Thu, 18 Jul 2019 12:01:22 +0900 Message-Id: <20190718030031.251273422@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190718030030.456918453@linuxfoundation.org> References: <20190718030030.456918453@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:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 169167 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1776465ilk; Wed, 17 Jul 2019 20:03:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOsrSMKXrKgJctx5NYGM7umMnL479SC52cgEPi4jkNdWyokzC7AxRB3PpHHhDRADu3sYGY X-Received: by 2002:a17:902:9897:: with SMTP id s23mr47050482plp.47.1563418986197; Wed, 17 Jul 2019 20:03:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563418986; cv=none; d=google.com; s=arc-20160816; b=QyOxUaL0NJvh/gLcCpXozFODhpPmgtykg3F6bU+B+dR/pwHehBFc8P2GHhIU7xOl/5 RULnOKuNRkDnoPDLJA97gaHRPsWMZK/PttbchScxLojhtKAnKKlNPPRoVLVTPVWd1gyx GCHfFkZ2ginZ/SYj4lCUMFyfZPbdEIG4u9o6KZ7lp8OjpgnzKX0lUXpvnqI8xt/ORDOh +LNhc9PtF+rXyZgOuTp1PLoWD/L9MKhIQd5IpJvV7hGxpuCgUwQKO7WeDRS8vuek36Pe HaOL2sHEctigreU1B4bZDK2brXs9eY1aa7eFDOWb/4eelrhvy2Nr9YcCuUAvFbaPFSKp CsgQ== 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=A/WQcwq+gxO0wTdAC0LLavNmjX8p3hIet6jIjxWAI14=; b=ijHNW4kVO6izLiY++oCET+VwrEbLz9uOvcUJb41oaZR4AA15hPL1shnFk9/5poYeFn GASQb1YSUBwM8Lt/KDTddNuR+oBYJSt+5UrWTyWIH9k2HHXMwWcVDLbsrr9ziSQdx133 HYLZK3XpouiaswvpRl8bMn6qr9SgOG6orVHnuPhmA2Ioj0QrpuENqIAdrCxPp++2rZFK MdVMUkmg7cQ/pStcD0Lkr/9rRcaIAM+/8WzeaCNtLtvWqmYtyf4YEsEhMOVW+FXhqiyS BPQNcftjViM+5q7OaV/6jCuTbsWilrDDNJtRmfr25C/aU9yxCUzSiiqkegYFCZFrXvmj 9ibQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gsqjaetd; 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 z191si26148499pgd.572.2019.07.17.20.03.05; Wed, 17 Jul 2019 20:03:06 -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=gsqjaetd; 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 S2389026AbfGRDDC (ORCPT + 29 others); Wed, 17 Jul 2019 23:03:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:33640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387984AbfGRDC7 (ORCPT ); Wed, 17 Jul 2019 23:02:59 -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 0670F21841; Thu, 18 Jul 2019 03:02:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563418978; bh=sCxTIgADXOgJ0ljuhRomr+2gskzHAK3o+DYnRwZQytM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gsqjaetd6he2mqA6TUm1sHKHoa9s8mNcot2x1ZegUAd6axE0BWhC7xbn0uLlbpHmD SvEOHe+n9L7yhIujaYCsTtlrhH33to/Tqoc984TNjUlzgYSQZeUMMGBekC35anKSzP I5sQNUy7D7qpHLfV46oRJtJHhV3tc5picrIt0Y4s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Vineet Gupta Subject: [PATCH 5.2 13/21] ARC: hide unused function unw_hdr_alloc Date: Thu, 18 Jul 2019 12:01:31 +0900 Message-Id: <20190718030033.826192040@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190718030030.456918453@linuxfoundation.org> References: <20190718030030.456918453@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 @@ -181,11 +181,6 @@ static void *__init unw_hdr_alloc_early( return memblock_alloc_from(sz, sizeof(unsigned int), 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, @@ -366,6 +361,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;