From patchwork Sun Sep 25 07:41:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76956 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp627649qgf; Sun, 25 Sep 2016 00:41:24 -0700 (PDT) X-Received: by 10.66.191.135 with SMTP id gy7mr8678874pac.21.1474789284011; Sun, 25 Sep 2016 00:41:24 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si15706652par.163.2016.09.25.00.41.23; Sun, 25 Sep 2016 00:41: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=@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 S1422916AbcIYHlV (ORCPT + 27 others); Sun, 25 Sep 2016 03:41:21 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:35367 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422790AbcIYHlT (ORCPT ); Sun, 25 Sep 2016 03:41:19 -0400 Received: by mail-pf0-f182.google.com with SMTP id s13so20860377pfd.2 for ; Sun, 25 Sep 2016 00:41:19 -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=qGINNA9trQCGMMHZ/ojEHR4RLQgMZui7eBY3PAT7c2U=; b=YKsBQ1SWjTFwoy+oYQNXwPpReZ7oIDDCCfNECSif2TllYKyE1lXrWsQS6cLcdaLjBp U/bEm70Ks10iJn5k90O1fH/lK5Re1Z1g4XVqVQ/nXHgaoI5WcR6JBBil1v+P8LcDYPYp HUZ16ta3eJSXgt1CcYL3OogLBfH8wBpvuLqjs= 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=qGINNA9trQCGMMHZ/ojEHR4RLQgMZui7eBY3PAT7c2U=; b=hqUA2BoIXdHtPCewYMK40kbOW76hVc6/ahpIqR0I9oBhi/c+6QX8NgjKrCmAvo8cQk cWgs6VwLyI6xZBxg7UocgWIyjGkmaZRtZuLEl/AE3As/2zOPvacW3kyT2xydKSq3tQEQ DsHzYf+wFzntv+FfQHNH9vBE6KClmai6BIaZjTZPZAXebpfqrU4S8sXSF2fazJsqwxcS cIPn6IBwavFkE/Lsh0wUo6A/CRsZK2zHzymxeki8kSICFhzZBEwyQWEVJft/+mmI3D9Z YYH+0Bwt8BZ18D3+p+DnG275hOgqYnc4YKWqcSGg/F4QYfSUWb8nvP7Yt29/kU31zhMe hVzg== X-Gm-Message-State: AE9vXwOMei6FMjFPNRAxYDppyBGRAB3/rOZaYkK0jw7nszKeqK+uz6Hot43aKZuEOV9zyyio X-Received: by 10.98.204.207 with SMTP id j76mr27489504pfk.6.1474789279234; Sun, 25 Sep 2016 00:41:19 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.164]) by smtp.gmail.com with ESMTPSA id c66sm22370012pfd.24.2016.09.25.00.41.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Sep 2016 00:41:18 -0700 (PDT) From: Baoyou Xie To: ck.hu@mediatek.com, p.zabel@pengutronix.de, airlied@linux.ie, matthias.bgg@gmail.com, mark.yao@rock-chips.com, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.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/mediatek: mark symbols static where possible Date: Sun, 25 Sep 2016 15:41:05 +0800 Message-Id: <1474789265-30142-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 4 warnings when building kernel with W=1: drivers/gpu/drm/mediatek/mtk_hdmi.c:1089:6: warning: no previous prototype for 'mtk_hdmi_audio_enable' [-Wmissing-prototypes] drivers/gpu/drm/mediatek/mtk_hdmi.c:1095:6: warning: no previous prototype for 'mtk_hdmi_audio_disable' [-Wmissing-prototypes] drivers/gpu/drm/mediatek/mtk_hdmi.c:1101:5: warning: no previous prototype for 'mtk_hdmi_audio_set_param' [-Wmissing-prototypes] drivers/gpu/drm/mediatek/mtk_hdmi.c:1627:5: warning: no previous prototype for 'mtk_hdmi_audio_digital_mute' [-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 both functions with 'static'. Signed-off-by: Baoyou Xie --- drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index 334562d..be4e19c 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -1086,19 +1086,19 @@ static int mtk_hdmi_output_init(struct mtk_hdmi *hdmi) return 0; } -void mtk_hdmi_audio_enable(struct mtk_hdmi *hdmi) +static void mtk_hdmi_audio_enable(struct mtk_hdmi *hdmi) { mtk_hdmi_aud_enable_packet(hdmi, true); hdmi->audio_enable = true; } -void mtk_hdmi_audio_disable(struct mtk_hdmi *hdmi) +static void mtk_hdmi_audio_disable(struct mtk_hdmi *hdmi) { mtk_hdmi_aud_enable_packet(hdmi, false); hdmi->audio_enable = false; } -int mtk_hdmi_audio_set_param(struct mtk_hdmi *hdmi, +static int mtk_hdmi_audio_set_param(struct mtk_hdmi *hdmi, struct hdmi_audio_param *param) { if (!hdmi->audio_enable) { @@ -1624,7 +1624,8 @@ static void mtk_hdmi_audio_shutdown(struct device *dev, void *data) mtk_hdmi_audio_disable(hdmi); } -int mtk_hdmi_audio_digital_mute(struct device *dev, void *data, bool enable) +static int +mtk_hdmi_audio_digital_mute(struct device *dev, void *data, bool enable) { struct mtk_hdmi *hdmi = dev_get_drvdata(dev);