[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170615173139.fawt5c6qyyvr7qwj@art_vandelay>
Date: Thu, 15 Jun 2017 13:31:39 -0400
From: Sean Paul <seanpaul@...omium.org>
To: Dawid Kurek <dawikur@...il.com>
Cc: Daniel Vetter <daniel.vetter@...el.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Sean Paul <seanpaul@...omium.org>,
David Airlie <airlied@...ux.ie>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] drm: Reduce scope of 'state' variable
On Thu, Jun 15, 2017 at 04:04:36PM +0200, Dawid Kurek wrote:
> Smaller scope reduces visibility of variable and makes usage of
> uninitialized variable less possible.
>
> Changes in v2:
> - separate declaration and initialization
Your patch is missing Signed-off-by tag
Sean
> ---
> drivers/gpu/drm/drm_atomic.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index f32506a..5e0d1e1 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -108,9 +108,10 @@ struct drm_atomic_state *
> drm_atomic_state_alloc(struct drm_device *dev)
> {
> struct drm_mode_config *config = &dev->mode_config;
> - struct drm_atomic_state *state;
>
> if (!config->funcs->atomic_state_alloc) {
> + struct drm_atomic_state *state;
> +
> state = kzalloc(sizeof(*state), GFP_KERNEL);
> if (!state)
> return NULL;
> --
> 2.10.0
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
--
Sean Paul, Software Engineer, Google / Chromium OS
Powered by blists - more mailing lists