Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1211578ybh; Thu, 16 Jul 2020 06:21:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMInumApK/YDjdnlqCbz8uPfNnoTudi4ew130WGLsYzu6CGjpN7KjJ6gc/Q7cCz+LIzFBM X-Received: by 2002:a17:906:8688:: with SMTP id g8mr3600472ejx.505.1594905702155; Thu, 16 Jul 2020 06:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594905702; cv=none; d=google.com; s=arc-20160816; b=oSPKGDG9ATCiL9Jhy1L3Xf6NMOVfdttImPFwHvvw0JQPZef7tONY4Wk9O3OjLvQGlS +Vd/8BqD6tPgXYzdXviFJOUyLRtKPdgg3ZBfttp65S+OQapXqZZo8GnFRNqnylyVLtLA Ir3kWfKN3h2YPjVGlkbY0jwxop5QaYz2554v/PgU6PTJVPkKSKhhm+dlR8lt0Tl7akeT P3jySurgryrF/B5UFLzM8z2H3vlSb7BvdSlpw8hpiTKTZy/X84zui1vODYZDWjrVtPr9 1POMABcrL0+T7Xk0l/b3WQ+YebcqfTzFRIAltrhXcj29kkmObZItoWNFLYEWwb3FseDr /8hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pfpSq4DvBlL0D7ejymaDz8bArWnsRIi88cDneCbu2y8=; b=EhBU23y6mHP1RUqnu2Of4SALTHI5q73Mb5Ae5mImZWmV4ftCGNXwSvcRm/8ydbkDa0 JGaZvimZ5mM3LZiwaDmzbCm6NpQc0UQNc2O20ni0xaM9GZSeHSAkqaJdVLL6XcVq+NK5 5EV6iagM6W7BZMBsG7omwmaypn2XZXhWSGt1S5JjIuIpU2rwziBjMUp/IVCiEk/xTM48 rnGGrioJgMCp8jBEY1yhwRN2dD9ZkSmlFstK299YEi+0IBD8vKBarWj1mL/L4ACp3dPd et7ZBZzC6q5jo6WJk28gfejwt9Rs3mh9A/KrVlDD+cHtiguqFkePHUTGPBYEeWnR24dD /HOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b="YAS31mZ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f22si3202264edy.17.2020.07.16.06.21.19; Thu, 16 Jul 2020 06:21:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b="YAS31mZ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728579AbgGPNUb (ORCPT + 99 others); Thu, 16 Jul 2020 09:20:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728150AbgGPNUa (ORCPT ); Thu, 16 Jul 2020 09:20:30 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C703C08C5C0 for ; Thu, 16 Jul 2020 06:20:30 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id j4so7009495wrp.10 for ; Thu, 16 Jul 2020 06:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pfpSq4DvBlL0D7ejymaDz8bArWnsRIi88cDneCbu2y8=; b=YAS31mZ/STKIbmeo2sBBPloQfilq26Uf4dTWQCS2bWyUHtZRLm2xpBxxXLF4fuj9f1 Wmo4WpB8a+hibAYAD8LrJVxMgJQqYfkiDjgOPxYJfrVyntyI/aqWXKvihxJTsOEQdug1 zobpXzlLehzzNhH9tloFP8WLI5hMkghNQGOQGaNThXI0cB4IufWue9wTdZDBHtVgH/KG 481nblD7Y/1/C5/uIeNqa4kZP8XpcYFRRBIDCpeEUO8UJyaV3NoKql4KEIRMi4GYUArK OYbESX2VcAc3b9E2YdzxiPLMq9DRhasta+A2+i4bbuEoVfFoJ9jxL3+VOSwwws1QHJQk HOvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pfpSq4DvBlL0D7ejymaDz8bArWnsRIi88cDneCbu2y8=; b=Hv9Gxs3dO57bX3N8tONTB/lz0SwQcweK0mjjmSfycuxhnS+qC16IUOgM1R7neaVFxr CcM/9BR0Xt4rIXSRsKyZGIhKwg6c7mv2P9FgLibiI/oNXlW+tWXtT266NEmm2OBYQ59s kB2XzfnksFRba0gZQzfZqBuvZ05WirKfFqR3O1j8SGuKgd41ZYLoEb/TsrZTEEMwR4/h LJyQWUV1seIuR6UaraZ4MH1JrFaJsUp5yYThvadMzU5hxIL3xZStGZrxFMu0sKrG3tL9 mKXngZIPgtTRkHY1mWA467Lmmt9JQ7f9ozKzL2caJ0/vHt+y8ltPoW9Vk6Klvhf6cKN+ F/JA== X-Gm-Message-State: AOAM533IhIP/ZgtbTbIA8V75gGHdg6NkG+9AIDyrjFTS/e/hZ5QYWsvt omxfgdZquUfmgkhImva6uhaSIU3bP78tGTyN2p3BmQ== X-Received: by 2002:adf:fcca:: with SMTP id f10mr4975330wrs.325.1594905629196; Thu, 16 Jul 2020 06:20:29 -0700 (PDT) MIME-Version: 1.0 References: <8691a6a78271c748a2f75f1430b36f304551838d.1594886530.git.zong.li@sifive.com> In-Reply-To: <8691a6a78271c748a2f75f1430b36f304551838d.1594886530.git.zong.li@sifive.com> From: Anup Patel Date: Thu, 16 Jul 2020 18:50:14 +0530 Message-ID: Subject: Re: [PATCH v2 2/2] riscv: Fix build warning for mm/pageattr To: Zong Li Cc: Palmer Dabbelt , Paul Walmsley , linux-riscv , "linux-kernel@vger.kernel.org List" , Pekka Enberg Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 16, 2020 at 6:36 PM Zong Li wrote: > > Add header for missing prototype. Also, static keyword should be at > beginning of declaration. > > The warning messages as follows (with W=1 build): > > arch/riscv/mm/pageattr.c:130:5: > warning: no previous prototype for 'set_memory_ro' [-Wmissing-prototypes] > > arch/riscv/mm/pageattr.c:136:5: > warning: no previous prototype for 'set_memory_rw' [-Wmissing-prototypes] > > arch/riscv/mm/pageattr.c:142:5: > warning: no previous prototype for 'set_memory_x' [-Wmissing-prototypes] > > arch/riscv/mm/pageattr.c:147:5: > warning: no previous prototype for 'set_memory_nx' [-Wmissing-prototypes] > > arch/riscv/mm/pageattr.c:152:5: > warning: no previous prototype for 'set_direct_map_invalid_noflush' [-Wmissing-prototypes] > > arch/riscv/mm/pageattr.c:169:5: > warning: no previous prototype for 'set_direct_map_default_noflush' [-Wmissing-prototypes] > > arch/riscv/mm/pageattr.c:97:1: > warning: 'static' is not at beginning of declaration [-Wold-style-declaration] > > Signed-off-by: Zong Li > Reviewed-by: Pekka Enberg > --- > arch/riscv/mm/pageattr.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/riscv/mm/pageattr.c b/arch/riscv/mm/pageattr.c > index 289a9a5ea5b5..19fecb362d81 100644 > --- a/arch/riscv/mm/pageattr.c > +++ b/arch/riscv/mm/pageattr.c > @@ -7,6 +7,7 @@ > #include > #include > #include > +#include > > struct pageattr_masks { > pgprot_t set_mask; > @@ -94,7 +95,7 @@ static int pageattr_pte_hole(unsigned long addr, unsigned long next, > return 0; > } > > -const static struct mm_walk_ops pageattr_ops = { > +static const struct mm_walk_ops pageattr_ops = { > .pgd_entry = pageattr_pgd_entry, > .p4d_entry = pageattr_p4d_entry, > .pud_entry = pageattr_pud_entry, > -- > 2.27.0 > Looks good to me. Reviewed-by: Anup Patel Regards, Anup