* Re: [PATCH v2] iio: core: move 'indio_dev->info' null check first
@ 2020-04-07 8:20 Markus Elfring
2020-04-07 8:45 ` Ardelean, Alexandru
0 siblings, 1 reply; 6+ messages in thread
From: Markus Elfring @ 2020-04-07 8:20 UTC (permalink / raw)
To: Alexandru Ardelean, linux-iio; +Cc: Jonathan Cameron, linux-kernel
> Doesn't fix anything.
Would the change description be nicer without this sentence?
> Just moves this …
I suggest to choose an imperative wording.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=7e63420847ae5f1036e4f7c42f0b3282e73efbc2#n151
Regards,
Markus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] iio: core: move 'indio_dev->info' null check first
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
0 siblings, 1 reply; 6+ messages in thread
From: Ardelean, Alexandru @ 2020-04-07 8:45 UTC (permalink / raw)
To: Markus.Elfring@web.de, linux-iio@vger.kernel.org
Cc: jic23@kernel.org, linux-kernel@vger.kernel.org
On Tue, 2020-04-07 at 10:20 +0200, Markus Elfring wrote:
> [External]
>
> > Doesn't fix anything.
>
> Would the change description be nicer without this sentence?
>
That part is slightly debate-able.
I've had my fair-share of comments [during reviews], where others were
asking/saying "is this fixing anything? please state if this is fixing
anything".
So, over time I got the habit of mentioning 'Doesn't fix anything.' if the patch
doesn't fix anything.
So, I'd leave it as-is [if that's possible].
>
> > Just moves this …
>
> I suggest to choose an imperative wording.
> https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=7e63420847ae5f1036e4f7c42f0b3282e73efbc2*n151__;Iw!!A3Ni8CS0y2Y!pMoqZILvWyu87fkNe16Sua0jMrZZK81oQOHENUhyTWZz9UrY4CisyKWSRCPFws0WTm50iQ$
>
I admit, I didn't read that document too much in-depth.
And I probably won't, because I am lazy.
Personally, what I try to do, is guess the maintainer's/community's preferences
over time via interactions.
Things differ slightly from community to community.
Of course, there is some common ground across all communities, and I try to
apply that first.
Then, depending on the flexibility/past-comments from other sent-patches I try
to apply those on top [unless I forget; which I kinda do].
> Regards,
> Markus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [v2] iio: core: move 'indio_dev->info' null check first
2020-04-07 8:45 ` Ardelean, Alexandru
@ 2020-04-07 10:42 ` Markus Elfring
2020-04-07 11:01 ` Ardelean, Alexandru
0 siblings, 1 reply; 6+ messages in thread
From: Markus Elfring @ 2020-04-07 10:42 UTC (permalink / raw)
To: Alexandru Ardelean, linux-iio; +Cc: Jonathan Cameron, linux-kernel
> So, over time I got the habit of mentioning 'Doesn't fix anything.'
I suggest to reconsider such information once more.
We come along different interpretations for remarkable software adjustments.
> if the patch doesn't fix anything.
Do you improve the input parameter validation a bit in principle here?
Regards,
Markus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [v2] iio: core: move 'indio_dev->info' null check first
2020-04-07 10:42 ` [v2] " Markus Elfring
@ 2020-04-07 11:01 ` Ardelean, Alexandru
2020-04-07 11:29 ` Ardelean, Alexandru
0 siblings, 1 reply; 6+ messages in thread
From: Ardelean, Alexandru @ 2020-04-07 11:01 UTC (permalink / raw)
To: Markus.Elfring@web.de, linux-iio@vger.kernel.org
Cc: jic23@kernel.org, linux-kernel@vger.kernel.org
On Tue, 2020-04-07 at 12:42 +0200, Markus Elfring wrote:
> [External]
>
> > So, over time I got the habit of mentioning 'Doesn't fix anything.'
>
> I suggest to reconsider such information once more.
> We come along different interpretations for remarkable software adjustments.
>
>
> > if the patch doesn't fix anything.
>
> Do you improve the input parameter validation a bit in principle here?
I thought that was obvious from the rest of the description + patch.
I guess it isn't.
I'll see.
>
> Regards,
> Markus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [v2] iio: core: move 'indio_dev->info' null check first
2020-04-07 11:01 ` Ardelean, Alexandru
@ 2020-04-07 11:29 ` Ardelean, Alexandru
2020-04-07 12:12 ` Markus Elfring
0 siblings, 1 reply; 6+ messages in thread
From: Ardelean, Alexandru @ 2020-04-07 11:29 UTC (permalink / raw)
To: Markus.Elfring@web.de, linux-iio@vger.kernel.org
Cc: jic23@kernel.org, linux-kernel@vger.kernel.org
On Tue, 2020-04-07 at 11:01 +0000, Ardelean, Alexandru wrote:
> [External]
>
> On Tue, 2020-04-07 at 12:42 +0200, Markus Elfring wrote:
> > [External]
> >
> > > So, over time I got the habit of mentioning 'Doesn't fix anything.'
> >
> > I suggest to reconsider such information once more.
> > We come along different interpretations for remarkable software adjustments.
> >
> >
> > > if the patch doesn't fix anything.
> >
> > Do you improve the input parameter validation a bit in principle here?
>
> I thought that was obvious from the rest of the description + patch.
> I guess it isn't.
>
> I'll see.
So, how about this:
---------------------------------------------
Doesn't fix anything. Just moves this to be the first check, as it's very
simple and fails the registration earlier, instead of potentially
initializing the 'indio_dev->label' and checking for duplicate indexes, and
then failing with this simple-check.
This is a minor optimization, since '__iio_device_register()' will waste
fewer validation cycles in case 'indio_dev->info' is NULL.
---------------------------------------------
?
>
> > Regards,
> > Markus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [v2] iio: core: move 'indio_dev->info' null check first
2020-04-07 11:29 ` Ardelean, Alexandru
@ 2020-04-07 12:12 ` Markus Elfring
0 siblings, 0 replies; 6+ messages in thread
From: Markus Elfring @ 2020-04-07 12:12 UTC (permalink / raw)
To: Alexandru Ardelean, linux-iio; +Cc: Jonathan Cameron, linux-kernel
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-07 12:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.