[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201903302149.x2ULnHN8017274@sdf.org>
Date: Sat, 30 Mar 2019 21:49:17 GMT
From: George Spelvin <lkml@....org>
To: gregkh@...uxfoundation.org, lkml@....org
Cc: adrian.hunter@...el.com, ard.biesheuvel@...aro.org,
benh@...nel.crashing.org, bp@...en8.de, darrick.wong@...cle.com,
dchinner@...hat.com, dedekind1@...il.com, hpa@...or.com,
jlbec@...lplan.org, jpoimboe@...hat.com,
linux-kernel@...r.kernel.org, linux-snps-arc@...ts.infradead.org,
mark@...heh.com, mingo@...hat.com, mpe@...erman.id.au,
naveen.n.rao@...ux.vnet.ibm.com, paulus@...ba.org, richard@....at,
st5pub@...dex.ru, tglx@...utronix.de, vgupta@...opsys.com,
x86@...nel.org
Subject: Re: [PATCH 5/5] Lib: sort.h: replace int size with size_t size in the swap function
On Sat, 30 Mar 2019 at 21:24:18 +0100, Greg KH wrote:
> On Sat, Mar 30, 2019 at 08:15:49PM +0000, George Spelvin wrote:
>> On Sat, 30 Mar 2019 at 19:38:26 +0100 Greh KH wrote;
>> > On Sat, Mar 30, 2019 at 07:43:53PM +0300, Andrey Abramov wrote:
>>>> Replace int type with size_t type of the size argument
>>>> in the swap function, also affect all its dependencies.
>>>
>>> This says _what_ the patch does, but it gives no clue as to _why_ you
>>> are doing this. Neither did your 0/5 patch :(
>>>
>>> Why make this change? Nothing afterward depends on it from what I can
>>> tell, so why is it needed?
>>
>> It's just a minor cleanup, making things less surprising for future
>> programmers. As I wrote in a comment in my patches, using a signed type
>> for an object size is definitely a wart; ever since C89 it's expected
>> you'd use size_t for the purpose.
>
> You did not say that in this commit log :)
Just to clarify: Not My Patch. I approve, but it's Andrey's patch.
Your point is taken that the commit message needs to be improved
to explain why. I just answered because it wasn't clear how much
of your question was rhetorical.
> If you think it is a wart, wonderful, yes, let's fix it up. But again,
> a changelog comment should explain _why_ a commit is needed, not _what_
> it does, as we can see from the diff itself exactly what the commit
> does.
It was so obvious to me that I didn't question it, but you have a
good point and I'm sure Andrey can clarify. Thanks for the attention!
Powered by blists - more mailing lists