Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1691192 > unrolled thread

[PATCH] staging: vboxvideo: make a couple of symbols static

Started byColin King <colin.king@canonical.com>
First post2017-07-19 11:40 +0200
Last post2017-07-22 09:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: vboxvideo: make a couple of symbols static Colin King <colin.king@canonical.com> - 2017-07-19 11:40 +0200
    Re: [PATCH] staging: vboxvideo: make a couple of symbols static Hans de Goede <hdegoede@redhat.com> - 2017-07-22 00:20 +0200
      Re: [PATCH] staging: vboxvideo: make a couple of symbols static Michael Thayer <michael.thayer@oracle.com> - 2017-07-22 09:30 +0200

#1691192 — [PATCH] staging: vboxvideo: make a couple of symbols static

FromColin King <colin.king@canonical.com>
Date2017-07-19 11:40 +0200
Subject[PATCH] staging: vboxvideo: make a couple of symbols static
Message-ID<u4TCy-6D1-21@gated-at.bofh.it>
From: Colin Ian King <colin.king@canonical.com>

Module parameter vbox_modeset and structure vbox_bo_driver do not need to
be in global scope and hence can be made static.

Cleans up a couple of sparse warnings:
symbol 'vbox_modeset' was not declared. Should it be static?
symbol 'vbox_bo_driver' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/vboxvideo/vbox_drv.c | 2 +-
 drivers/staging/vboxvideo/vbox_ttm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vboxvideo/vbox_drv.c b/drivers/staging/vboxvideo/vbox_drv.c
index 6d0600c37c0c..e18642e5027e 100644
--- a/drivers/staging/vboxvideo/vbox_drv.c
+++ b/drivers/staging/vboxvideo/vbox_drv.c
@@ -36,7 +36,7 @@
 
 #include "vbox_drv.h"
 
-int vbox_modeset = -1;
+static int vbox_modeset = -1;
 
 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
 module_param_named(modeset, vbox_modeset, int, 0400);
diff --git a/drivers/staging/vboxvideo/vbox_ttm.c b/drivers/staging/vboxvideo/vbox_ttm.c
index 34a905d40735..4eb410a2a1a8 100644
--- a/drivers/staging/vboxvideo/vbox_ttm.c
+++ b/drivers/staging/vboxvideo/vbox_ttm.c
@@ -230,7 +230,7 @@ static void vbox_ttm_tt_unpopulate(struct ttm_tt *ttm)
 	ttm_pool_unpopulate(ttm);
 }
 
-struct ttm_bo_driver vbox_bo_driver = {
+static struct ttm_bo_driver vbox_bo_driver = {
 	.ttm_tt_create = vbox_ttm_tt_create,
 	.ttm_tt_populate = vbox_ttm_tt_populate,
 	.ttm_tt_unpopulate = vbox_ttm_tt_unpopulate,
-- 
2.11.0

[toc] | [next] | [standalone]


#1694019

FromHans de Goede <hdegoede@redhat.com>
Date2017-07-22 00:20 +0200
Message-ID<u5Or7-240-3@gated-at.bofh.it>
In reply to#1691192
Hi,

On 19-07-17 11:36, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Module parameter vbox_modeset and structure vbox_bo_driver do not need to
> be in global scope and hence can be made static.
> 
> Cleans up a couple of sparse warnings:
> symbol 'vbox_modeset' was not declared. Should it be static?
> symbol 'vbox_bo_driver' was not declared. Should it be static?
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Looks good to me:

Acked-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>   drivers/staging/vboxvideo/vbox_drv.c | 2 +-
>   drivers/staging/vboxvideo/vbox_ttm.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/vboxvideo/vbox_drv.c b/drivers/staging/vboxvideo/vbox_drv.c
> index 6d0600c37c0c..e18642e5027e 100644
> --- a/drivers/staging/vboxvideo/vbox_drv.c
> +++ b/drivers/staging/vboxvideo/vbox_drv.c
> @@ -36,7 +36,7 @@
>   
>   #include "vbox_drv.h"
>   
> -int vbox_modeset = -1;
> +static int vbox_modeset = -1;
>   
>   MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
>   module_param_named(modeset, vbox_modeset, int, 0400);
> diff --git a/drivers/staging/vboxvideo/vbox_ttm.c b/drivers/staging/vboxvideo/vbox_ttm.c
> index 34a905d40735..4eb410a2a1a8 100644
> --- a/drivers/staging/vboxvideo/vbox_ttm.c
> +++ b/drivers/staging/vboxvideo/vbox_ttm.c
> @@ -230,7 +230,7 @@ static void vbox_ttm_tt_unpopulate(struct ttm_tt *ttm)
>   	ttm_pool_unpopulate(ttm);
>   }
>   
> -struct ttm_bo_driver vbox_bo_driver = {
> +static struct ttm_bo_driver vbox_bo_driver = {
>   	.ttm_tt_create = vbox_ttm_tt_create,
>   	.ttm_tt_populate = vbox_ttm_tt_populate,
>   	.ttm_tt_unpopulate = vbox_ttm_tt_unpopulate,
> 

[toc] | [prev] | [next] | [standalone]


#1694125

FromMichael Thayer <michael.thayer@oracle.com>
Date2017-07-22 09:30 +0200
Message-ID<u5X1n-7pV-3@gated-at.bofh.it>
In reply to#1694019
22.07.2017 00:17, Hans de Goede wrote:
> Hi,
> 
> On 19-07-17 11:36, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> Module parameter vbox_modeset and structure vbox_bo_driver do not need to
>> be in global scope and hence can be made static.
>>
>> Cleans up a couple of sparse warnings:
>> symbol 'vbox_modeset' was not declared. Should it be static?
>> symbol 'vbox_bo_driver' was not declared. Should it be static?
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> 
> Looks good to me:
> 
> Acked-by: Hans de Goede <hdegoede@redhat.com>

Looks good to me too.  Sorry for the slow response.  Still had no time
to actually apply it, but as said, it looks completely sensible.

Regards
Michael

Acked-by: Michael Thayer <michael.thayer@oracle.com>

>> ---
>>   drivers/staging/vboxvideo/vbox_drv.c | 2 +-
>>   drivers/staging/vboxvideo/vbox_ttm.c | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/vboxvideo/vbox_drv.c
>> b/drivers/staging/vboxvideo/vbox_drv.c
>> index 6d0600c37c0c..e18642e5027e 100644
>> --- a/drivers/staging/vboxvideo/vbox_drv.c
>> +++ b/drivers/staging/vboxvideo/vbox_drv.c
>> @@ -36,7 +36,7 @@
>>     #include "vbox_drv.h"
>>   -int vbox_modeset = -1;
>> +static int vbox_modeset = -1;
>>     MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
>>   module_param_named(modeset, vbox_modeset, int, 0400);
>> diff --git a/drivers/staging/vboxvideo/vbox_ttm.c
>> b/drivers/staging/vboxvideo/vbox_ttm.c
>> index 34a905d40735..4eb410a2a1a8 100644
>> --- a/drivers/staging/vboxvideo/vbox_ttm.c
>> +++ b/drivers/staging/vboxvideo/vbox_ttm.c
>> @@ -230,7 +230,7 @@ static void vbox_ttm_tt_unpopulate(struct ttm_tt
>> *ttm)
>>       ttm_pool_unpopulate(ttm);
>>   }
>>   -struct ttm_bo_driver vbox_bo_driver = {
>> +static struct ttm_bo_driver vbox_bo_driver = {
>>       .ttm_tt_create = vbox_ttm_tt_create,
>>       .ttm_tt_populate = vbox_ttm_tt_populate,
>>       .ttm_tt_unpopulate = vbox_ttm_tt_unpopulate,
>>

-- 
Michael Thayer | VirtualBox engineer
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | D-71384 Weinstadt

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister
der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web