All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Alexandru Ardelean <alexandru.ardelean@analog.com>,
	linux-iio@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [v2] iio: core: move 'indio_dev->info' null check first
Date: Tue, 7 Apr 2020 14:12:51 +0200	[thread overview]
Message-ID: <a1ae5805-6576-82cf-33c0-6fc4fd3512d8@web.de> (raw)
In-Reply-To: <2db41c0869d24d18b70f9ff5d4311fb86187c3e6.camel@analog.com>

>     Doesn't fix anything.

You would like to change something for a specific reason.
Thus please omit this sentence.


>     Just moves this to be the first check, as it's very …

Wording alternative:
Move a null pointer check to the beginning of this function implementation.


>     This is a minor optimization, since '__iio_device_register()' will waste
>     fewer validation cycles in case 'indio_dev->info' is NULL.

How do you think about to use the text “iio: core: Improve input parameter validation
in __iio_device_register()” as a commit subject?

Regards,
Markus

      reply	other threads:[~2020-04-07 12:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07  8:20 [PATCH v2] iio: core: move 'indio_dev->info' null check first Markus Elfring
2020-04-07  8:45 ` Ardelean, Alexandru
2020-04-07 10:42   ` [v2] " Markus Elfring
2020-04-07 11:01     ` Ardelean, Alexandru
2020-04-07 11:29       ` Ardelean, Alexandru
2020-04-07 12:12         ` Markus Elfring [this message]

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=a1ae5805-6576-82cf-33c0-6fc4fd3512d8@web.de \
    --to=markus.elfring@web.de \
    --cc=alexandru.ardelean@analog.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.