diff mbox series

[-next] drm/xen-front: Drop pointless static qualifier in fb_destroy()

Message ID 1548504338-114487-1-git-send-email-yuehaibing@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] drm/xen-front: Drop pointless static qualifier in fb_destroy() | expand

Commit Message

Yue Haibing Jan. 26, 2019, 12:05 p.m. UTC
There is no need to have the 'struct drm_framebuffer *fb' variable
static since new value always be assigned before use it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/xen/xen_drm_front_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Oleksandr Andrushchenko Jan. 28, 2019, 6:36 a.m. UTC | #1
On 1/26/19 2:05 PM, YueHaibing wrote:
> There is no need to have the 'struct drm_framebuffer *fb' variable
> static since new value always be assigned before use it.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Good catch, thank you!
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> ---
>   drivers/gpu/drm/xen/xen_drm_front_kms.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xen/xen_drm_front_kms.c b/drivers/gpu/drm/xen/xen_drm_front_kms.c
> index 860da05..c2955d3 100644
> --- a/drivers/gpu/drm/xen/xen_drm_front_kms.c
> +++ b/drivers/gpu/drm/xen/xen_drm_front_kms.c
> @@ -54,7 +54,7 @@ static void fb_destroy(struct drm_framebuffer *fb)
>   	  const struct drm_mode_fb_cmd2 *mode_cmd)
>   {
>   	struct xen_drm_front_drm_info *drm_info = dev->dev_private;
> -	static struct drm_framebuffer *fb;
> +	struct drm_framebuffer *fb;
>   	struct drm_gem_object *gem_obj;
>   	int ret;
>   
>
>
>
>
>
Oleksandr Andrushchenko Feb. 1, 2019, 8:55 a.m. UTC | #2
On 1/28/19 8:36 AM, Oleksandr Andrushchenko wrote:
> On 1/26/19 2:05 PM, YueHaibing wrote:
>> There is no need to have the 'struct drm_framebuffer *fb' variable
>> static since new value always be assigned before use it.
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Good catch, thank you!
> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
If nobody objects I'll apply this to drm-misc-fixes next Monday
>> ---
>>   drivers/gpu/drm/xen/xen_drm_front_kms.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xen/xen_drm_front_kms.c 
>> b/drivers/gpu/drm/xen/xen_drm_front_kms.c
>> index 860da05..c2955d3 100644
>> --- a/drivers/gpu/drm/xen/xen_drm_front_kms.c
>> +++ b/drivers/gpu/drm/xen/xen_drm_front_kms.c
>> @@ -54,7 +54,7 @@ static void fb_destroy(struct drm_framebuffer *fb)
>>         const struct drm_mode_fb_cmd2 *mode_cmd)
>>   {
>>       struct xen_drm_front_drm_info *drm_info = dev->dev_private;
>> -    static struct drm_framebuffer *fb;
>> +    struct drm_framebuffer *fb;
>>       struct drm_gem_object *gem_obj;
>>       int ret;
>>
>>
>>
>>
>>
Oleksandr Andrushchenko Feb. 4, 2019, 6:56 a.m. UTC | #3
On 1/26/19 2:05 PM, YueHaibing wrote:
> There is no need to have the 'struct drm_framebuffer *fb' variable
> static since new value always be assigned before use it.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>   drivers/gpu/drm/xen/xen_drm_front_kms.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xen/xen_drm_front_kms.c b/drivers/gpu/drm/xen/xen_drm_front_kms.c
> index 860da05..c2955d3 100644
> --- a/drivers/gpu/drm/xen/xen_drm_front_kms.c
> +++ b/drivers/gpu/drm/xen/xen_drm_front_kms.c
> @@ -54,7 +54,7 @@ static void fb_destroy(struct drm_framebuffer *fb)
>   	  const struct drm_mode_fb_cmd2 *mode_cmd)
>   {
>   	struct xen_drm_front_drm_info *drm_info = dev->dev_private;
> -	static struct drm_framebuffer *fb;
> +	struct drm_framebuffer *fb;
>   	struct drm_gem_object *gem_obj;
>   	int ret;
>   
Applied to drm-misc-next
diff mbox series

Patch

diff --git a/drivers/gpu/drm/xen/xen_drm_front_kms.c b/drivers/gpu/drm/xen/xen_drm_front_kms.c
index 860da05..c2955d3 100644
--- a/drivers/gpu/drm/xen/xen_drm_front_kms.c
+++ b/drivers/gpu/drm/xen/xen_drm_front_kms.c
@@ -54,7 +54,7 @@  static void fb_destroy(struct drm_framebuffer *fb)
 	  const struct drm_mode_fb_cmd2 *mode_cmd)
 {
 	struct xen_drm_front_drm_info *drm_info = dev->dev_private;
-	static struct drm_framebuffer *fb;
+	struct drm_framebuffer *fb;
 	struct drm_gem_object *gem_obj;
 	int ret;