lkml.org 
[lkml]   [2021]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] staging: most: dim2: force fcnt=3 on Renesas GEN3
From
Date
>> +	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

\
 
 \ /
  Last update: 2021-09-27 17:40    [W:0.077 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site