From patchwork Sun Sep 25 07:38:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76955 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp627070qgf; Sun, 25 Sep 2016 00:39:11 -0700 (PDT) X-Received: by 10.98.97.7 with SMTP id v7mr27862644pfb.49.1474789151322; Sun, 25 Sep 2016 00:39:11 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ft3si18087428pad.98.2016.09.25.00.39.11; Sun, 25 Sep 2016 00:39:11 -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 S1422795AbcIYHjI (ORCPT + 27 others); Sun, 25 Sep 2016 03:39:08 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34070 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031643AbcIYHjF (ORCPT ); Sun, 25 Sep 2016 03:39:05 -0400 Received: by mail-pa0-f44.google.com with SMTP id zl8so2560568pac.1 for ; Sun, 25 Sep 2016 00:39: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=qGINNA9trQCGMMHZ/ojEHR4RLQgMZui7eBY3PAT7c2U=; b=WPjeZpK42+A2WCIcs8JIF/bYZt5rxTnKWiMV0uqytgqgPU4HQcwcP03cePx9imJoib vU9ZIHnvUR6vQXGPb6sFTk0ReW8XoHE92Mf+cjS5CLcgGAX7ohHDxT75GNMuM5A/R5Lq FtRy6JDpjngJeerE0JbVdgTiTMyPZc8UkuFRc= 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=qGINNA9trQCGMMHZ/ojEHR4RLQgMZui7eBY3PAT7c2U=; b=TkW6d8TnhYMkNsGwnrQBsdT3qrzsuYs3BCJ5kM/I2h90OD6bZ5muUSfLOoDSqoIeKJ mUjRwmIF6O7gC08v245RbPpKjBotEBvbjY86qyUaUnPCmr/PlAVmm1N4Z+xvkvRpIFOk J0qRGIRNdx4s9wCHWGuBtL09Imvqz5g/JdEGUsSX5oA7X/FQs+wi0kX01aIhczz38Kjk ZTvjySdNJbc/+vAZk/PwpgGji/hGjJ14j0v1hi8UoyQu68KZoEqpEofEhBJdZ3Ugw8g3 xeKEcl2tnf6LPA97sCO2AG6+5uBNXVfWrzsAM/NgiUWGhdLUQbkdbIO2tGTmA1OgxuRu 5jxg== X-Gm-Message-State: AA6/9RlaBbO+RYj6Qg5AynevHy2lUa4geteKJWn2YzfFHyQhGVN3b2fBIOA1hBBg8OO2PBxD X-Received: by 10.66.163.227 with SMTP id yl3mr14011399pab.0.1474789145223; Sun, 25 Sep 2016 00:39:05 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.164]) by smtp.gmail.com with ESMTPSA id c145sm22373978pfb.15.2016.09.25.00.38.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Sep 2016 00:39:04 -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:38:29 +0800 Message-Id: <1474789109-22010-2-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474789109-22010-1-git-send-email-baoyou.xie@linaro.org> References: <1474789109-22010-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 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);