[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4be771a0-9e77-64fd-031c-242dd4598996@lucaceresoli.net>
Date: Tue, 23 Nov 2021 12:35:42 +0100
From: Luca Ceresoli <luca@...aceresoli.net>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>,
Eugen Hristev <eugen.hristev@...rochip.com>
Cc: leonl@...pardimaging.com, linux-media@...r.kernel.org,
skomatineni@...dia.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] media: i2c: imx274: simplify probe function by adding
local variable dev
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@...rochip.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. :)
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@...aceresoli.net>
--
Luca
Powered by blists - more mailing lists