All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fixed coding style: do not initialise statics to NULL
@ 2019-04-12  2:45 Tiago Macedo
  2019-04-12 10:48 ` Hans Verkuil
  0 siblings, 1 reply; 2+ messages in thread
From: Tiago Macedo @ 2019-04-12  2:45 UTC (permalink / raw)
  To: gregkh; +Cc: linux-media, linux-kernel, devel, lkcamp, Tiago Macedo

The standard guarantees that a pointer with static storage duration
and no other initializer will be initialized to be a null pointer.

Signed-off-by: Tiago Macedo <tiagohenrique.macedo@gmai.com>
---
 drivers/staging/media/zoran/videocodec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/zoran/videocodec.c b/drivers/staging/media/zoran/videocodec.c
index c1ee5cb7e66b..cc6e0f1cd7b4 100644
--- a/drivers/staging/media/zoran/videocodec.c
+++ b/drivers/staging/media/zoran/videocodec.c
@@ -51,7 +51,7 @@ struct codec_list {
 	struct codec_list *next;
 };
 
-static struct codec_list *codeclist_top = NULL;
+static struct codec_list *codeclist_top;
 
 /* ================================================= */
 /* function prototypes of the master/slave interface */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fixed coding style: do not initialise statics to NULL
  2019-04-12  2:45 [PATCH] Fixed coding style: do not initialise statics to NULL Tiago Macedo
@ 2019-04-12 10:48 ` Hans Verkuil
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2019-04-12 10:48 UTC (permalink / raw)
  To: Tiago Macedo, gregkh
  Cc: linux-media, linux-kernel, devel, lkcamp, Tiago Macedo

Hi Tiago,

On 4/12/19 4:45 AM, Tiago Macedo wrote:
> The standard guarantees that a pointer with static storage duration
> and no other initializer will be initialized to be a null pointer.
> 
> Signed-off-by: Tiago Macedo <tiagohenrique.macedo@gmai.com>
> ---
>  drivers/staging/media/zoran/videocodec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/zoran/videocodec.c b/drivers/staging/media/zoran/videocodec.c
> index c1ee5cb7e66b..cc6e0f1cd7b4 100644
> --- a/drivers/staging/media/zoran/videocodec.c
> +++ b/drivers/staging/media/zoran/videocodec.c
> @@ -51,7 +51,7 @@ struct codec_list {
>  	struct codec_list *next;
>  };
>  
> -static struct codec_list *codeclist_top = NULL;
> +static struct codec_list *codeclist_top;
>  
>  /* ================================================= */
>  /* function prototypes of the master/slave interface */
> 

I dropped this patch since the zoran driver will be removed for 5.2,
so there is no point in applying this patch.

Also, for future reference, please provide the name of the driver that
you are patching in the subject. I.e. something like this:

[PATCH] zoran: fixed coding style: do not initialise statics to NULL

That helps triage for maintainers.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-12 10:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12  2:45 [PATCH] Fixed coding style: do not initialise statics to NULL Tiago Macedo
2019-04-12 10:48 ` Hans Verkuil

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.