mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Lee Jones <lee.jones@linaro.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: most: dim2: force fcnt=3 on Renesas GEN3
Date: Mon, 27 Sep 2021 18:40:13 +0300	[thread overview]
Message-ID: <17e51208-18b9-56d8-e8e3-2e40d6e94438@cogentembedded.com> (raw)
In-Reply-To: <YVHjQ95lbDjvVR73@kroah.com>

>> +	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

  reply	other threads:[~2021-09-27 15:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 16:51 Nikita Yushchenko
2021-09-27 15:29 ` Greg Kroah-Hartman
2021-09-27 15:40   ` Nikita Yushchenko [this message]
2021-09-27 15:50     ` Greg Kroah-Hartman
2021-09-27 15:58       ` [PATCH v2] " Nikita Yushchenko
2021-09-28  7:11         ` Greg Kroah-Hartman
2021-09-27 16:06       ` [PATCH] staging: most: dim2: use if statements instead of ?: expressions Nikita Yushchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17e51208-18b9-56d8-e8e3-2e40d6e94438@cogentembedded.com \
    --to=nikita.yoush@cogentembedded.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®