lkml.org 
[lkml]   [2021]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] media: i2c: imx274: simplify probe function by adding local variable dev
Hi Luca,

On Tue, Nov 23, 2021 at 12:35:42PM +0100, Luca Ceresoli wrote:
> Hi,
>
> On 23/11/21 12:25, Sakari Ailus wrote:
> > Hi Eugen,
> >
> > On Tue, Nov 23, 2021 at 01:15:20PM +0200, Eugen Hristev wrote:
> >> Simplify probe function by adding a local variable dev instead of using
> >> &client->dev all the time.
> >>
> >> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> >
> > It's not really wrong to do this, but is it useful?
> It is of course a matter of personal taste, but I also prefer a short
> name in cases such as this where the same member is accessed a lot of
> times. To me it makes code simpler to read and even to write.
>
> > You can't even unwrap a single line, the lines are just made a little bit
> > shorter.
>
> Let's be fair, he did unwrap 4. :)

Ah, yes, you're right.

But at least one could have been wrapped without the change. :-)

>
> As said, it is a matter of taste so I'll be OK it this patch is dropped.
> But since I like it and it looks correct:
>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>

--
Sakari Ailus

\
 
 \ /
  Last update: 2021-11-23 12:50    [W:0.056 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site