Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1490843 > unrolled thread
| Started by | Baoyou Xie <baoyou.xie@linaro.org> |
|---|---|
| First post | 2016-09-25 10:00 +0200 |
| Last post | 2016-09-29 11:30 +0200 |
| Articles | 5 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH] drm/sti: mark symbols static where possible Baoyou Xie <baoyou.xie@linaro.org> - 2016-09-25 10:00 +0200
Re: [PATCH] drm/sti: mark symbols static where possible Sean Paul <seanpaul@chromium.org> - 2016-09-27 18:40 +0200
Re: [PATCH] drm/sti: mark symbols static where possible Benjamin Gaignard <benjamin.gaignard@linaro.org> - 2016-09-27 21:10 +0200
Re: [PATCH] drm/sti: mark symbols static where possible Vincent ABRIOU <vincent.abriou@st.com> - 2016-09-28 09:30 +0200
Re: [PATCH] drm/sti: mark symbols static where possible Daniel Vetter <daniel@ffwll.ch> - 2016-09-29 11:30 +0200
| From | Baoyou Xie <baoyou.xie@linaro.org> |
|---|---|
| Date | 2016-09-25 10:00 +0200 |
| Subject | [PATCH] drm/sti: mark symbols static where possible |
| Message-ID | <slcvU-3Mo-17@gated-at.bofh.it> |
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 <baoyou.xie@linaro.org>
---
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(-)
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;
--
2.7.4
[toc] | [next] | [standalone]
| From | Sean Paul <seanpaul@chromium.org> |
|---|---|
| Date | 2016-09-27 18:40 +0200 |
| Message-ID | <sm3Ae-3oW-29@gated-at.bofh.it> |
| In reply to | #1490843 |
On Sun, Sep 25, 2016 at 3:57 AM, Baoyou Xie <baoyou.xie@linaro.org> wrote:
> 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 <baoyou.xie@linaro.org>
Applied to -misc, thanks.
Sean
> ---
> 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(-)
>
> 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;
>
> --
> 2.7.4
>
[toc] | [prev] | [next] | [standalone]
| From | Benjamin Gaignard <benjamin.gaignard@linaro.org> |
|---|---|
| Date | 2016-09-27 21:10 +0200 |
| Message-ID | <sm5Vn-4Z0-1@gated-at.bofh.it> |
| In reply to | #1492024 |
I think that create conflicts with what is already in Vincent pull
request where we have fix the problem reported by coccicheck and
sparse.
https://lists.freedesktop.org/archives/dri-devel/2016-September/118892.html
Benjamin
2016-09-27 18:35 GMT+02:00 Sean Paul <seanpaul@chromium.org>:
> On Sun, Sep 25, 2016 at 3:57 AM, Baoyou Xie <baoyou.xie@linaro.org> wrote:
>> 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 <baoyou.xie@linaro.org>
>
> Applied to -misc, thanks.
>
> Sean
>
>> ---
>> 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(-)
>>
>> 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;
>>
>> --
>> 2.7.4
>>
--
Benjamin Gaignard
Graphic Study Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
[toc] | [prev] | [next] | [standalone]
| From | Vincent ABRIOU <vincent.abriou@st.com> |
|---|---|
| Date | 2016-09-28 09:30 +0200 |
| Message-ID | <smhtv-3Lu-7@gated-at.bofh.it> |
| In reply to | #1492103 |
Yes true, patch from Ville
https://lists.freedesktop.org/archives/dri-devel/2016-September/118631.html"
already fix patches sent by Baoyou.
Vincent
On 09/27/2016 09:07 PM, Benjamin Gaignard wrote:
> I think that create conflicts with what is already in Vincent pull
> request where we have fix the problem reported by coccicheck and
> sparse.
>
> https://lists.freedesktop.org/archives/dri-devel/2016-September/118892.html
>
> Benjamin
>
> 2016-09-27 18:35 GMT+02:00 Sean Paul <seanpaul@chromium.org>:
>> On Sun, Sep 25, 2016 at 3:57 AM, Baoyou Xie <baoyou.xie@linaro.org> wrote:
>>> 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 <baoyou.xie@linaro.org>
>>
>> Applied to -misc, thanks.
>>
>> Sean
>>
>>> ---
>>> 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(-)
>>>
>>> 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;
>>>
>>> --
>>> 2.7.4
>>>
>
>
>
[toc] | [prev] | [next] | [standalone]
| From | Daniel Vetter <daniel@ffwll.ch> |
|---|---|
| Date | 2016-09-29 11:30 +0200 |
| Message-ID | <smFPc-2bi-13@gated-at.bofh.it> |
| In reply to | #1492297 |
On Wed, Sep 28, 2016 at 09:27:13AM +0200, Vincent ABRIOU wrote:
> Yes true, patch from Ville
> https://lists.freedesktop.org/archives/dri-devel/2016-September/118631.html"
> already fix patches sent by Baoyou.
Yeah, I resolved those conflicts by simply taking the code from the sti
tree. I'll send a pull request for drm-misc with that merge to Dave this
week still because I've totally forgotten about Tomeu's work.
-Daniel
>
> Vincent
>
> On 09/27/2016 09:07 PM, Benjamin Gaignard wrote:
> > I think that create conflicts with what is already in Vincent pull
> > request where we have fix the problem reported by coccicheck and
> > sparse.
> >
> > https://lists.freedesktop.org/archives/dri-devel/2016-September/118892.html
> >
> > Benjamin
> >
> > 2016-09-27 18:35 GMT+02:00 Sean Paul <seanpaul@chromium.org>:
> >> On Sun, Sep 25, 2016 at 3:57 AM, Baoyou Xie <baoyou.xie@linaro.org> wrote:
> >>> 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 <baoyou.xie@linaro.org>
> >>
> >> Applied to -misc, thanks.
> >>
> >> Sean
> >>
> >>> ---
> >>> 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(-)
> >>>
> >>> 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;
> >>>
> >>> --
> >>> 2.7.4
> >>>
> >
> >
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web