From patchwork Sun Sep 25 07:57:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76961 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp631299qgf; Sun, 25 Sep 2016 00:57:38 -0700 (PDT) X-Received: by 10.66.129.174 with SMTP id nx14mr27545702pab.167.1474790257944; Sun, 25 Sep 2016 00:57:37 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15si18175773pfg.53.2016.09.25.00.57.37; Sun, 25 Sep 2016 00:57:37 -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 S940957AbcIYH5f (ORCPT + 27 others); Sun, 25 Sep 2016 03:57:35 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:36453 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936118AbcIYH5d (ORCPT ); Sun, 25 Sep 2016 03:57:33 -0400 Received: by mail-pf0-f181.google.com with SMTP id q2so55207114pfj.3 for ; Sun, 25 Sep 2016 00:57: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; bh=a1yrnxNMjQeDiT+VBj8dOd7OmaxTduEWEkO0j5NFt2s=; b=a3tZUnmIQ9wX1zfraXZPP84Qi/KBCUX5qwRsm5dkuhPA20DFqf5GABbvm/1HGMgszP OsesAFRM07u16Jq0hp9ndCInZP/xPvoK+WIAX0NlGFMVI1v3oM0ZJozL5VmIopFsauqP Uv4GWEdoM0ToWIGZ3BWB1A8e+7dwGAIiSfzF4= 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; bh=a1yrnxNMjQeDiT+VBj8dOd7OmaxTduEWEkO0j5NFt2s=; b=HgI9yQiBjadyDAutEc7twH6mU5XTob/Vn9Ow3kHWYnRUlJDkG2ybvcAdre+lfrtjmM w2ntHgdsb+vz2J2VG+mYlAlI4ePmh/+GU6mhFGz+/eYwTBnb9g8dPldFk6gx9xUAlAqk Zm3fYqxnnBbv1xmiZHjWg7pRiXaYU9PwwzEjkC9kzXLPr6nV0mNssLLtSkDlJeN7k+8z k6JWSk+NKlOd4MBsqlcfKtrN+nt2b8aQrqPGMmO3C2eedKn404dBCbpjGtANHaBoWr2l mvdj87+HmtUjZEfYYlZBRg8kuLERiEsaLPXV5WT+R9669P2E4plsEg2nOcylISgRRkF6 UfrQ== X-Gm-Message-State: AE9vXwNrPGnb5azBVaywaHPA7QjXj7/08cGQiT4zdSG+AftYqiSMqJIxZ0zQne6rFa4E7Wwj X-Received: by 10.98.195.17 with SMTP id v17mr27328484pfg.56.1474790252949; Sun, 25 Sep 2016 00:57:32 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.164]) by smtp.gmail.com with ESMTPSA id bu15sm22501579pac.15.2016.09.25.00.57.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Sep 2016 00:57:32 -0700 (PDT) From: Baoyou Xie To: benjamin.gaignard@linaro.org, vincent.abriou@st.com, airlied@linux.ie Cc: dri-devel@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] drm/sti: mark symbols static where possible Date: Sun, 25 Sep 2016 15:57:20 +0800 Message-Id: <1474790240-12485-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get 6 warnings when building kernel with W=1: drivers/gpu/drm/sti/sti_mixer.c:361:6: warning: no previous prototype for 'sti_mixer_set_matrix' [-Wmissing-prototypes] drivers/gpu/drm/sti/sti_dvo.c:109:5: warning: no previous prototype for 'dvo_awg_generate_code' [-Wmissing-prototypes] drivers/gpu/drm/sti/sti_gdp.c:476:5: warning: no previous prototype for 'sti_gdp_field_cb' [-Wmissing-prototypes] drivers/gpu/drm/sti/sti_hqvdp.c:786:5: warning: no previous prototype for 'sti_hqvdp_vtg_cb' [-Wmissing-prototypes] drivers/gpu/drm/sti/sti_hqvdp.c:1292:5: warning: no previous prototype for 'sti_hqvdp_bind' [-Wmissing-prototypes] drivers/gpu/drm/sti/sti_drv.c:143:6: warning: no previous prototype for 'sti_drm_dbg_cleanup' [-Wmissing-prototypes] In fact, these 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/sti/sti_drv.c | 2 +- drivers/gpu/drm/sti/sti_dvo.c | 3 ++- drivers/gpu/drm/sti/sti_gdp.c | 2 +- drivers/gpu/drm/sti/sti_hqvdp.c | 5 +++-- drivers/gpu/drm/sti/sti_mixer.c | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index 7cd3804..e6f0706 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -140,7 +140,7 @@ static int sti_drm_dbg_init(struct drm_minor *minor) return ret; } -void sti_drm_dbg_cleanup(struct drm_minor *minor) +static void sti_drm_dbg_cleanup(struct drm_minor *minor) { drm_debugfs_remove_files(sti_drm_dbg_list, ARRAY_SIZE(sti_drm_dbg_list), minor); diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c index 00881eb..4545ad0 100644 --- a/drivers/gpu/drm/sti/sti_dvo.c +++ b/drivers/gpu/drm/sti/sti_dvo.c @@ -106,7 +106,8 @@ struct sti_dvo_connector { container_of(x, struct sti_dvo_connector, drm_connector) #define BLANKING_LEVEL 16 -int dvo_awg_generate_code(struct sti_dvo *dvo, u8 *ram_size, u32 *ram_code) +static int +dvo_awg_generate_code(struct sti_dvo *dvo, u8 *ram_size, u32 *ram_code) { struct drm_display_mode *mode = &dvo->mode; struct dvo_config *config = dvo->config; diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index b8d942c..4648d1b 100644 --- a/drivers/gpu/drm/sti/sti_gdp.c +++ b/drivers/gpu/drm/sti/sti_gdp.c @@ -473,7 +473,7 @@ static void sti_gdp_disable(struct sti_gdp *gdp) * RETURNS: * 0 on success. */ -int sti_gdp_field_cb(struct notifier_block *nb, +static int sti_gdp_field_cb(struct notifier_block *nb, unsigned long event, void *data) { struct sti_gdp *gdp = container_of(nb, struct sti_gdp, vtg_field_nb); diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c index b5ee783..7f0dea8 100644 --- a/drivers/gpu/drm/sti/sti_hqvdp.c +++ b/drivers/gpu/drm/sti/sti_hqvdp.c @@ -783,7 +783,8 @@ static void sti_hqvdp_disable(struct sti_hqvdp *hqvdp) * RETURNS: * 0 on success. */ -int sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data) +static int +sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data) { struct sti_hqvdp *hqvdp = container_of(nb, struct sti_hqvdp, vtg_nb); int btm_cmd_offset, top_cmd_offest; @@ -1289,7 +1290,7 @@ static struct drm_plane *sti_hqvdp_create(struct drm_device *drm_dev, return &hqvdp->plane.drm_plane; } -int sti_hqvdp_bind(struct device *dev, struct device *master, void *data) +static int sti_hqvdp_bind(struct device *dev, struct device *master, void *data) { struct sti_hqvdp *hqvdp = dev_get_drvdata(dev); struct drm_device *drm_dev = data; diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c index 7d9aea8..b78cec5 100644 --- a/drivers/gpu/drm/sti/sti_mixer.c +++ b/drivers/gpu/drm/sti/sti_mixer.c @@ -358,7 +358,7 @@ int sti_mixer_set_plane_status(struct sti_mixer *mixer, return 0; } -void sti_mixer_set_matrix(struct sti_mixer *mixer) +static void sti_mixer_set_matrix(struct sti_mixer *mixer) { unsigned int i;