From patchwork Sat Oct 22 09:41:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 78784 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp1703460qge; Sat, 22 Oct 2016 02:44:27 -0700 (PDT) X-Received: by 10.99.166.17 with SMTP id t17mr8107556pge.102.1477129467675; Sat, 22 Oct 2016 02:44:27 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z68si6291138pgz.5.2016.10.22.02.44.27; Sat, 22 Oct 2016 02:44:27 -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 S938550AbcJVJoK (ORCPT + 27 others); Sat, 22 Oct 2016 05:44:10 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:34060 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936506AbcJVJoF (ORCPT ); Sat, 22 Oct 2016 05:44:05 -0400 Received: by mail-pf0-f182.google.com with SMTP id r16so70651626pfg.1 for ; Sat, 22 Oct 2016 02:44:05 -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=W4P689lePDaTYonT8W1VFRd5BOzN4xI4jYwsjsBewNM=; b=g1pivNC2yogbkm0/gh8t8PFkd4CZTP71j11w1A8HNi7YtDaFYbbqf0Mmom/A3sB9FL Y/TdB9nLmdz4C6jOoStI4plsBW2E+Zmyf/fJSesHFf1HDsTJ+6suVO0kVcYBt1+blvip 8eiLg7JLIMLbC1LGbfSf2M7I0hYgJVJxMAj6g= 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=W4P689lePDaTYonT8W1VFRd5BOzN4xI4jYwsjsBewNM=; b=gJm8L8E4O8A3yfsZVU6EusvUx8fY60rctUt/Fs7fBO0cHv03mEH/NL+Uk+TLai5Yiz JnJXbeWMgXipmf7x/1U9jaRwK/WgwJrpcMxBzGNNBoNNE8I2ywYQN2BWV7trCITeiXJM /WUxi595IcJMY159r/rrJywCd8nwI5KzWKGaY3jXNf6jQD8iztdmsfCpIqadqsXb0Gq4 Xbx3YRttYoSKDO7dimDBp+wFGGaIYnKeJvWbOLJHlsi8rWoDEo9kUjbsdfVUUhqk3MvK gK0E60T6nXTO+Kw9RdXAUC2qaTdH3YXFbJyePb9GWCjjC7gOA3mA2wSvSS1xi6VrH7cr oS4w== X-Gm-Message-State: ABUngvfmO0VriDc8//AGN1E08d8WfSXPrjQbJx1i/6OdqyvEU/xfasdtCCMYOxC4s19JIiMV X-Received: by 10.99.167.15 with SMTP id d15mr8198203pgf.104.1477129444740; Sat, 22 Oct 2016 02:44:04 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.92]) by smtp.gmail.com with ESMTPSA id g9sm10923953paw.40.2016.10.22.02.43.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 22 Oct 2016 02:44:04 -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 11/17] drm/nouveau/disp: mark symbols static where possible Date: Sat, 22 Oct 2016 17:41:52 +0800 Message-Id: <1477129318-29677-11-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/disp/rootnv50.c:70:1: warning: no previous prototype for 'nv50_disp_root_mthd_' [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c:157:1: warning: no previous prototype for 'nv50_disp_chan_rd32' [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c:167:1: warning: no previous prototype for 'nv50_disp_chan_wr32' [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c:177:1: warning: no previous prototype for 'nv50_disp_chan_ntfy' [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c:193:1: warning: no previous prototype for 'nv50_disp_chan_map' [-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/disp/channv50.c | 8 ++++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c index dd2953b..26990d4 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c @@ -153,7 +153,7 @@ nv50_disp_chan_uevent = { .fini = nv50_disp_chan_uevent_fini, }; -int +static int nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data) { struct nv50_disp_chan *chan = nv50_disp_chan(object); @@ -163,7 +163,7 @@ nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data) return 0; } -int +static int nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data) { struct nv50_disp_chan *chan = nv50_disp_chan(object); @@ -173,7 +173,7 @@ nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data) return 0; } -int +static int nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type, struct nvkm_event **pevent) { @@ -189,7 +189,7 @@ nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type, return -EINVAL; } -int +static int nv50_disp_chan_map(struct nvkm_object *object, u64 *addr, u32 *size) { struct nv50_disp_chan *chan = nv50_disp_chan(object); diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c index 2f9cecd..6424b39 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c @@ -66,7 +66,7 @@ nv50_disp_root_scanoutpos(NV50_DISP_MTHD_V0) return 0; } -int +static int nv50_disp_root_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size) { union {