* [PATCH] drm/mediatek: mark symbols static where possible
@ 2016-09-18 14:02 ` Baoyou Xie
0 siblings, 0 replies; 9+ messages in thread
From: Baoyou Xie @ 2016-09-18 14:02 UTC (permalink / raw)
To: ck.hu, p.zabel, airlied, matthias.bgg
Cc: dri-devel, linux-arm-kernel, linux-mediatek, linux-kernel, arnd,
baoyou.xie, xie.baoyou
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 <baoyou.xie@linaro.org>
---
drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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);
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] drm/mediatek: mark symbols static where possible
@ 2016-09-18 14:02 ` Baoyou Xie
0 siblings, 0 replies; 9+ messages in thread
From: Baoyou Xie @ 2016-09-18 14:02 UTC (permalink / raw)
To: linux-arm-kernel
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 <baoyou.xie@linaro.org>
---
drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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);
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/mediatek: mark symbols static where possible
2016-09-25 7:41 ` Baoyou Xie
(?)
@ 2016-09-27 16:34 ` Sean Paul
-1 siblings, 0 replies; 9+ messages in thread
From: Sean Paul @ 2016-09-27 16:34 UTC (permalink / raw)
To: Baoyou Xie
Cc: CK HU, p.zabel, Dave Airlie, Matthias Brugger,
姚智情,
Heiko Stübner, dri-devel, Linux ARM Kernel, linux-mediatek,
Linux Kernel Mailing List, linux-rockchip, Arnd Bergmann,
Baoyou Xie, han.fei, tang.qiang007
On Sun, Sep 25, 2016 at 3:41 AM, Baoyou Xie <baoyou.xie@linaro.org> wrote:
> 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 <baoyou.xie@linaro.org>
Applied to -misc, thanks.
Sean
> ---
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> 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);
>
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/mediatek: mark symbols static where possible
@ 2016-09-27 16:34 ` Sean Paul
0 siblings, 0 replies; 9+ messages in thread
From: Sean Paul @ 2016-09-27 16:34 UTC (permalink / raw)
To: Baoyou Xie
Cc: Arnd Bergmann, linux-rockchip, tang.qiang007, Baoyou Xie,
Linux Kernel Mailing List, dri-devel, Matthias Brugger,
linux-mediatek, han.fei, Linux ARM Kernel
On Sun, Sep 25, 2016 at 3:41 AM, Baoyou Xie <baoyou.xie@linaro.org> wrote:
> 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 <baoyou.xie@linaro.org>
Applied to -misc, thanks.
Sean
> ---
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> 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);
>
> --
> 2.7.4
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] drm/mediatek: mark symbols static where possible
@ 2016-09-27 16:34 ` Sean Paul
0 siblings, 0 replies; 9+ messages in thread
From: Sean Paul @ 2016-09-27 16:34 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Sep 25, 2016 at 3:41 AM, Baoyou Xie <baoyou.xie@linaro.org> wrote:
> 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 <baoyou.xie@linaro.org>
Applied to -misc, thanks.
Sean
> ---
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> 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);
>
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] drm/mediatek: mark symbols static where possible
@ 2016-09-25 7:41 ` Baoyou Xie
0 siblings, 0 replies; 9+ messages in thread
From: Baoyou Xie @ 2016-09-25 7:41 UTC (permalink / raw)
To: ck.hu, p.zabel, airlied, matthias.bgg, mark.yao, heiko
Cc: dri-devel, linux-arm-kernel, linux-mediatek, linux-kernel,
linux-rockchip, arnd, baoyou.xie, xie.baoyou, han.fei,
tang.qiang007
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 <baoyou.xie@linaro.org>
---
drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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);
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] drm/mediatek: mark symbols static where possible
@ 2016-09-25 7:41 ` Baoyou Xie
0 siblings, 0 replies; 9+ messages in thread
From: Baoyou Xie @ 2016-09-25 7:41 UTC (permalink / raw)
To: linux-arm-kernel
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 <baoyou.xie@linaro.org>
---
drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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);
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] drm/mediatek: mark symbols static where possible
2016-09-25 7:38 [PATCH 1/2] drm/rockchip: add missing header dependencies Baoyou Xie
@ 2016-09-25 7:38 ` Baoyou Xie
0 siblings, 0 replies; 9+ messages in thread
From: Baoyou Xie @ 2016-09-25 7:38 UTC (permalink / raw)
To: ck.hu, p.zabel, airlied, matthias.bgg, mark.yao, heiko
Cc: dri-devel, linux-arm-kernel, linux-mediatek, linux-kernel,
linux-rockchip, arnd, baoyou.xie, xie.baoyou, han.fei,
tang.qiang007
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 <baoyou.xie@linaro.org>
---
drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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);
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] drm/mediatek: mark symbols static where possible
@ 2016-09-25 7:38 ` Baoyou Xie
0 siblings, 0 replies; 9+ messages in thread
From: Baoyou Xie @ 2016-09-25 7:38 UTC (permalink / raw)
To: linux-arm-kernel
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 <baoyou.xie@linaro.org>
---
drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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);
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-09-27 16:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-18 14:02 [PATCH] drm/mediatek: mark symbols static where possible Baoyou Xie
2016-09-18 14:02 ` Baoyou Xie
2016-09-25 7:38 [PATCH 1/2] drm/rockchip: add missing header dependencies Baoyou Xie
2016-09-25 7:38 ` [PATCH] drm/mediatek: mark symbols static where possible Baoyou Xie
2016-09-25 7:38 ` Baoyou Xie
2016-09-25 7:41 Baoyou Xie
2016-09-25 7:41 ` Baoyou Xie
2016-09-27 16:34 ` Sean Paul
2016-09-27 16:34 ` Sean Paul
2016-09-27 16:34 ` Sean Paul
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.