lkml.org 
[lkml]   [2020]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drm/amdgpu: do not initialise global variables to 0 or NULL
On Mon, Nov 02, 2020 at 09:06:21PM +0100, Christian König wrote:
> Am 02.11.20 um 20:43 schrieb Alex Deucher:
> > On Mon, Nov 2, 2020 at 1:42 PM Deepak R Varma <mh12gx2825@gmail.com> wrote:
> > > Initializing global variable to 0 or NULL is not necessary and should
> > > be avoided. Issue reported by checkpatch script as:
> > > ERROR: do not initialise globals to 0 (or NULL).
> > I agree that this is technically correct, but a lot of people don't
> > seem to know that so we get a lot of comments about this code for the
> > variables that are not explicitly set. Seems less confusing to
> > initialize them even if it not necessary. I don't have a particularly
> > strong opinion on it however.
>
> Agree with Alex.
>
> Especially for the module parameters we should have a explicit init value
> for documentation purposes, even when it is 0.

Why is this one tiny driver somehow special compared to the entire rest
of the kernel? (hint, it isn't...)

Please follow the normal coding style rules, there's no reason to ignore
them unless you like to constantly reject patches like this that get
sent to you.

thnaks,

greg k-h

\
 
 \ /
  Last update: 2020-11-03 07:54    [W:0.088 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site