Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4023981ybg; Fri, 25 Oct 2019 12:14:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqycGJard2iHWEslobNXABo9Xfab/75UoO4z/tP2OYD9AqJkjrjMydgEIhuY00TivF2AbY5o X-Received: by 2002:a50:9254:: with SMTP id j20mr6045907eda.0.1572030864948; Fri, 25 Oct 2019 12:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572030864; cv=none; d=google.com; s=arc-20160816; b=OAeXWFYrNxF3wcJxRKKbZMvseStQZ6eMC5All5BV7NAV4HjLxdsEno22agiZg2/7p0 CZ75y1M9/qLbRqS/WR3VlQsAZ2dBtfduhLX1/mi3ileyECglD3DfemdY7Oc7JyneM0sS x10bAYaZP7DUO6vdIsLvRpeM4LPjrh4mTwwrIan7EIv1Md/IRNxbEjuH3LEAUPFbwkED BZQ2DG+CthSxFrMxvkxSC6WwH/2WRzayobBN/SZaaiKykw2gDbEvDvdj8heqGW+qulJy dfSVvcwLyrmuE6smQH0to9NZgDGLU8AugSAwPkWQ7toYuP0Dd6Gk03JVivM00Oq2GHFf dYGQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hIAFt5NPNEcTJjheJJ7IFoP1QwOV2b47sLZxfo5ML0c=; b=HOXuXSPUfuDML5ZCMRTSLAnegUjkiVxV4DO4xuog5ArGeNvcX0cg5SJLcOUx+SwwPa a+lN99aRldw1Ljvswhm89fL8X2td1WP0CEBz7i1gQG+YVxZbmO1kFsIv3LlB22hgp/c5 2OGu+5H2pZkrdk3dKjeG7fXyfQIXCpqgmZIdF22Wlmqa2YsDNgmYUQuFm/hF0CqmpgA0 SQ/L88do5sfaRvlO/QshU1bmxvz8+JWlbTOB9XEP749/lp+dmhNCnZTbX/qiLaO4x+zE SxPLP7AOSz78ultA6oxvg6p6bZilgW7YvFrkSBoei2rf5YkU5/078IGS9UxydM1bM11e J+xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=ajFk24nn; 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 e56si1957789edb.355.2019.10.25.12.14.01; Fri, 25 Oct 2019 12:14:24 -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=@sifive.com header.s=google header.b=ajFk24nn; 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 S1733056AbfJXW67 (ORCPT + 99 others); Thu, 24 Oct 2019 18:58:59 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:45313 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732966AbfJXW65 (ORCPT ); Thu, 24 Oct 2019 18:58:57 -0400 Received: by mail-io1-f65.google.com with SMTP id c25so177481iot.12 for ; Thu, 24 Oct 2019 15:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hIAFt5NPNEcTJjheJJ7IFoP1QwOV2b47sLZxfo5ML0c=; b=ajFk24nn7MaVF1UXN3SYe+082t8H3p1T+unPsMnYo5MLGiysAPhdHHBqSNcAs9Dj7g M74uQnxp9Al/Ibh40zpDUgicdCCRj9a14WULDZzfwbbuBlhLHpalRhh86On02pJR1Lno 5laMI1GF6hgzE0EjAI5jdvSZPUvCIkt/U3/7CM6WgfCyE2PDQahhk4VyD31Bakaa/xiJ z1KQ8VW73KY/7dvy6e166XjtiJvw0kaclFDfIhovqEoceOBWZjMTm5bVYD4i6NY0UTFL IcHxyadIJOonendiqIAZd+vdeOwJNGA1jGCKzQFPCnFlel4TVKykHJTZxRFWJABXMup1 884A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hIAFt5NPNEcTJjheJJ7IFoP1QwOV2b47sLZxfo5ML0c=; b=EYP70jtfJdnI+PlieLDNDDRQPGNILYRLEhajMldU5lYZlccUcaYsvi+h6NlPZGC7sj N9kqtYWQ9Znb91/24GWPWsCegpO7SBgbwJVbsoFaYAo7UZk3VP2hkh4odMclptRJSQh/ dStYw8rs3hZ7rTkRr0wID+yqXlxez1dOQXUAkMglw37TfpYOL+Xk2k5GcY51yrcAPGnB 6co9wVs3F+4F3TDGZL8tY4+ufLk4rRMI3A4Goox9mDh1/uVzdTtPOdGs1DmuL9LuSUEk rlIx0km+JrDTzptChTND+rWWAl0WsFhgjIGGmrmBr41rzYFK1hxkUsUWukwvZGCmUqtB b1cQ== X-Gm-Message-State: APjAAAVKI+y6msaH/IsPPwxG+CJp1gwYOoB8GVRHHxFpcGEWaoDAOXrm hTwDVy12igm5KghfdGKoYpBToA== X-Received: by 2002:a02:950b:: with SMTP id y11mr808962jah.100.1571957934933; Thu, 24 Oct 2019 15:58:54 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id b18sm58112ilo.70.2019.10.24.15.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 15:58:54 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Cc: linux-kernel@vger.kernel.org, hch@lst.dev, greentime.hu@sifive.com, luc.vanoostenryck@gmail.com, Christoph Hellwig Subject: [PATCH v4 3/6] riscv: mark some code and data as file-static Date: Thu, 24 Oct 2019 15:58:35 -0700 Message-Id: <20191024225838.27743-4-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.24.0.rc0 In-Reply-To: <20191024225838.27743-1-paul.walmsley@sifive.com> References: <20191024225838.27743-1-paul.walmsley@sifive.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Several functions and arrays which are only used in the files in which they are declared are missing "static" qualifiers. Warnings for these symbols are reported by sparse: arch/riscv/kernel/vdso.c:28:18: warning: symbol 'vdso_data' was not declared. Should it be static? arch/riscv/mm/sifive_l2_cache.c:145:12: warning: symbol 'sifive_l2_init' was not declared. Should it be static? Resolve these warnings by marking them as static. This version incorporates feedback from Greentime Hu . Signed-off-by: Paul Walmsley Reviewed-by: Christoph Hellwig Cc: Greentime Hu --- arch/riscv/kernel/vdso.c | 2 +- arch/riscv/mm/sifive_l2_cache.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c index c9c21e0d5641..e24fccab8185 100644 --- a/arch/riscv/kernel/vdso.c +++ b/arch/riscv/kernel/vdso.c @@ -25,7 +25,7 @@ static union { struct vdso_data data; u8 page[PAGE_SIZE]; } vdso_data_store __page_aligned_data; -struct vdso_data *vdso_data = &vdso_data_store.data; +static struct vdso_data *vdso_data = &vdso_data_store.data; static int __init vdso_init(void) { diff --git a/arch/riscv/mm/sifive_l2_cache.c b/arch/riscv/mm/sifive_l2_cache.c index 2e637ad71c05..a9ffff3277c7 100644 --- a/arch/riscv/mm/sifive_l2_cache.c +++ b/arch/riscv/mm/sifive_l2_cache.c @@ -142,7 +142,7 @@ static irqreturn_t l2_int_handler(int irq, void *device) return IRQ_HANDLED; } -int __init sifive_l2_init(void) +static int __init sifive_l2_init(void) { struct device_node *np; struct resource res; -- 2.24.0.rc0