Re: [PATCH] drm: Reduce scope of 'state' variable

2017-06-15 Thread Dawid Kurek
On 15/06/17, Jani Nikula wrote: > On Thu, 15 Jun 2017, Dawid Kurek wrote: > > On 15/06/17, Jani Nikula wrote: > >> Separate declaration and initialization would lead to a cleaner patch > >> and result. > > > > I saw combining declaration and initialization is quite common, i.e. in > > drm_atomic f

Re: [PATCH] drm: Reduce scope of 'state' variable

2017-06-15 Thread Jani Nikula
On Thu, 15 Jun 2017, Dawid Kurek wrote: > On 15/06/17, Jani Nikula wrote: >> Separate declaration and initialization would lead to a cleaner patch >> and result. > > I saw combining declaration and initialization is quite common, i.e. in > drm_atomic file. Personally, I also prefer those in one st

Re: [PATCH] drm: Reduce scope of 'state' variable

2017-06-15 Thread Dawid Kurek
On 15/06/17, Jani Nikula wrote: > On Thu, 15 Jun 2017, Dawid Kurek wrote: > > Smaller scope reduces visibility of variable and makes usage of > > uninitialized variable less possible. > > --- > > drivers/gpu/drm/drm_atomic.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > d

Re: [PATCH] drm: Reduce scope of 'state' variable

2017-06-15 Thread Jani Nikula
On Thu, 15 Jun 2017, Dawid Kurek wrote: > Smaller scope reduces visibility of variable and makes usage of > uninitialized variable less possible. > --- > drivers/gpu/drm/drm_atomic.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_atomic.c b/drive

[PATCH] drm: Reduce scope of 'state' variable

2017-06-15 Thread Dawid Kurek
Smaller scope reduces visibility of variable and makes usage of uninitialized variable less possible. --- drivers/gpu/drm/drm_atomic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index f32506a..ea5a9a7 100644