From patchwork Sat Oct 22 09:41:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 78787 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp1703574qge; Sat, 22 Oct 2016 02:44:58 -0700 (PDT) X-Received: by 10.98.80.2 with SMTP id e2mr9824139pfb.183.1477129498340; Sat, 22 Oct 2016 02:44:58 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l123si6257661pfl.162.2016.10.22.02.44.58; Sat, 22 Oct 2016 02:44:58 -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=@linaro.org; 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965003AbcJVJop (ORCPT + 27 others); Sat, 22 Oct 2016 05:44:45 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:33015 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938554AbcJVJod (ORCPT ); Sat, 22 Oct 2016 05:44:33 -0400 Received: by mail-pf0-f171.google.com with SMTP id 128so70855124pfz.0 for ; Sat, 22 Oct 2016 02:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+e1rbLVW3onVvIqR2k164C08LhFG3mKWEsuQNsSy8c4=; b=DrlW6NuicyYRWExU0tm+GsOo7wuVWAQK1zaEhkhw45+2UHXvPIsXDJmLFzKc4cRefQ ovlEIQnw8qAQ4+SljzJ0GjdOkrnPUX87YIxOv2I2jL11Ckh8qffBJ1yoR6ZsjJinbBdz 8mcuTugmCnRcj0xJ4tnHruGeeDLTvp9ovDvFY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+e1rbLVW3onVvIqR2k164C08LhFG3mKWEsuQNsSy8c4=; b=UryJ7GFEPGoVNot7IMg3Yj2sCHrvAesRmS+7Sw2ZEZlObx4bLPsdX3MRwU/LUUDV3D vjGwFRLjVn5rLG99f8s6+bSH6MUK8cAcYTKF3UHQJVkf2TN9CWjO+Uy225TZK+fbxQq3 3Ne5471RiAme62FRb00uMBMclamLgyTemjr/RmybtmA+Vpn6mqLtJUEr4VF8mP88a0uK 7dM3nDSrqqz8KNLseRfwwOw6JGcaOepb3qUeD5odT8D4rB3iJU1Z2bDK+SZOBR1MzyMh nruWawVJvHE+7ZoWk9GI+gtLc35fd9XbZXJzw4k0/2lD2meYc2enZRh+cPw1DzWZiVc+ d9HA== X-Gm-Message-State: ABUngvfNyrjAK4iP9pn4rHYgrHoZ7BCEQarovqbySWY6vwEB9d1OLocvFVOC6tUmgPQmrfml X-Received: by 10.99.167.15 with SMTP id d15mr8200345pgf.104.1477129473202; Sat, 22 Oct 2016 02:44:33 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.92]) by smtp.gmail.com with ESMTPSA id g9sm10923953paw.40.2016.10.22.02.44.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 22 Oct 2016 02:44:32 -0700 (PDT) From: Baoyou Xie To: bskeggs@redhat.com, airlied@linux.ie, acourbot@nvidia.com, imirkin@alum.mit.edu, Julia.Lawall@lip6.fr, martin.peres@free.fr, rspliet@eclipso.eu, nouveau@karolherbst.de Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn, han.fei@zte.com.cn, tang.qiang007@zte.com.cn Subject: [PATCH 14/17] drm/nouveau/gr: mark symbols static where possible Date: Sat, 22 Oct 2016 17:41:55 +0800 Message-Id: <1477129318-29677-14-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477129318-29677-1-git-send-email-baoyou.xie@linaro.org> References: <1477129318-29677-1-git-send-email-baoyou.xie@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get 5 warnings when building kernel with W=1: drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:1388:1: warning: no previous prototype for 'gf100_gr_init_fw' [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:1705:1: warning: no previous prototype for 'gf100_gr_init_' [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c:312:1: warning: no previous prototype for 'gm107_gr_init' [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c:222:1: warning: no previous prototype for 'gf117_grctx_generate_main' [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c:937:1: warning: no previous prototype for 'gm107_grctx_generate_tpcid' [-Wmissing-prototypes] In fact, both functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie --- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c index c925ade..74a64e3 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c @@ -218,7 +218,7 @@ gf117_grctx_generate_attrib(struct gf100_grctx *info) } } -void +static void gf117_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info) { struct nvkm_device *device = gr->base.engine.subdev.device; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c index 6d3c501..4c4b5ab 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c @@ -933,7 +933,7 @@ gm107_grctx_generate_attrib(struct gf100_grctx *info) } } -void +static void gm107_grctx_generate_tpcid(struct gf100_gr *gr) { struct nvkm_device *device = gr->base.engine.subdev.device; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c index 157919c..eccdee0 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c @@ -1384,7 +1384,7 @@ gf100_gr_intr(struct nvkm_gr *base) nvkm_fifo_chan_put(device->fifo, flags, &chan); } -void +static void gf100_gr_init_fw(struct gf100_gr *gr, u32 fuc_base, struct gf100_gr_fuc *code, struct gf100_gr_fuc *data) { @@ -1701,7 +1701,7 @@ gf100_gr_oneinit(struct nvkm_gr *base) return 0; } -int +static int gf100_gr_init_(struct nvkm_gr *base) { struct gf100_gr *gr = gf100_gr(base); diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c index 45f965f..2c67fac 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c @@ -308,7 +308,7 @@ gm107_gr_init_bios(struct gf100_gr *gr) } } -int +static int gm107_gr_init(struct gf100_gr *gr) { struct nvkm_device *device = gr->base.engine.subdev.device;