[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <17e51208-18b9-56d8-e8e3-2e40d6e94438@cogentembedded.com>
Date: Mon, 27 Sep 2021 18:40:13 +0300
From: Nikita Yushchenko <nikita.yoush@...entembedded.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Lee Jones <lee.jones@...aro.org>, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: most: dim2: force fcnt=3 on Renesas GEN3
>> + dev_fcnt = pdata && pdata->fcnt ? pdata->fcnt : fcnt;
>
> Please use a real if () statement here and do not bury real logic in a
> crazy line like this one, as that is all but impossible to maintain over
> time.
The same source file already uses the same form of conditional expressions several lines above:
> ret = pdata && pdata->enable ? pdata->enable(pdev) : 0;
> dev->disable_platform = pdata ? pdata->disable : NULL;
Shall I use real if statement for my expression while keeping those as-is? This looks ... strange.
Or shall I convert all conditional expressions to if statements?
Nikita
Powered by blists - more mailing lists