Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp63701yba; Sat, 30 Mar 2019 14:52:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzH1pwXvJGNrPDvCbJZZN3mij2aHSTvqc0DQ47qiTSbTYLmy4IZMviBcDKnDzPXjBf+BRze X-Received: by 2002:a62:7603:: with SMTP id r3mr54972512pfc.32.1553982725735; Sat, 30 Mar 2019 14:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553982725; cv=none; d=google.com; s=arc-20160816; b=UP3s2yXYMdrxUFh8yn4NTOaWhFy/j2h5ZE3ngzj8Qqe51FE5FWpBhXCJjOunaW3sF1 XZclubW/gXlhg7YDt8yUuyvOBpLD+usP1RIq/NSqs6qMDNry29WCpitqro2JMZ/woiae Tm2grxHzboHriSEUMtAQap/NkctCdx1YLvhJDsddtvvmh9/KaS97WJmOdq56SIBGtBqv la/FtRj8uEProuOh0YWl70cM4/xuAA3pT5df8OydSW6wBiGrpIo0WaCAO4yhvb9I8l6C udxBCcVjwsjJ7Hf2vp7uwxkmoM4RnJQQyojDk9WccU28ZITygr1R1vLTw+b/15lgvamB A3SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:cc:subject:to :message-id:from:date:dkim-signature; bh=w41OfnMjk0bSnODAgRrzE/e/ypHOFJ9xJ823L5Cs4Fg=; b=Bw3kxhdQc6QIv1Q+Lwr4ChihAiY3k6hYm2QHg74WTk8dO2Jb/cbEGcQg/zA4p7GSTF OYonpfchk6FGd34kzk6u3Ow2YXck8wdiYBAHOgV32TLpNFWFwXwc+jCLr82uroplyvH1 YciWMSv1fs8nZQ2oXU6Stug05h0e4oQg/gwXVMb20f2OJwM+CYA6ElBxFI6UimRVFomC twz7KrZ77XHl3b4R8Y65FP3yidzKekmFrn2ldlyZgAuz8M3wqMxiGLqKYVm8+xby0VYR QdW8JoK25lQJXnrOp+zCuTPix+cogqhH6K3e8qIjlnUnJe1+mIsWJRq02N3dq2XFCeE3 QQDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sdf.org header.s=default header.b=SwqNmgTJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y17si5225322plr.204.2019.03.30.14.51.48; Sat, 30 Mar 2019 14:52:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sdf.org header.s=default header.b=SwqNmgTJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730947AbfC3VvN (ORCPT + 99 others); Sat, 30 Mar 2019 17:51:13 -0400 Received: from mx.sdf.org ([205.166.94.20]:53593 "EHLO mx.sdf.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730395AbfC3VvN (ORCPT ); Sat, 30 Mar 2019 17:51:13 -0400 Received: from sdf.org (IDENT:lkml@sdf.lonestar.org [205.166.94.16]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id x2ULnJnf001935 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO); Sat, 30 Mar 2019 21:49:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sdf.org; s=default; t=1553982568; bh=3cYNnE/FBsA3L4QFmUGg+COhq867b5/quLF0sFMqsdc=; h=Date:From:To:Subject:Cc:In-Reply-To:References; b=SwqNmgTJSP3xohQRM1tpLqbM/iho6IxcIzoIHrKC3ZM61eDRLY3+bpS7ZSH1jTO4a h/VaHIIy+bExI4oPBT+snnXQzan/ORNWoCUHW6+QRz2dk3MSWDpOyTYNZXU1N3ZEsi hHu7w7HzU3ZH5/MpKQ4YU7isdf8XPvwdHvmG1qdE= Received: (from lkml@localhost) by sdf.org (8.15.2/8.12.8/Submit) id x2ULnHN8017274; Sat, 30 Mar 2019 21:49:17 GMT Date: Sat, 30 Mar 2019 21:49:17 GMT From: George Spelvin Message-Id: <201903302149.x2ULnHN8017274@sdf.org> To: gregkh@linuxfoundation.org, lkml@sdf.org Subject: Re: [PATCH 5/5] Lib: sort.h: replace int size with size_t size in the swap function Cc: adrian.hunter@intel.com, ard.biesheuvel@linaro.org, benh@kernel.crashing.org, bp@alien8.de, darrick.wong@oracle.com, dchinner@redhat.com, dedekind1@gmail.com, hpa@zytor.com, jlbec@evilplan.org, jpoimboe@redhat.com, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, mark@fasheh.com, mingo@redhat.com, mpe@ellerman.id.au, naveen.n.rao@linux.vnet.ibm.com, paulus@samba.org, richard@nod.at, st5pub@yandex.ru, tglx@linutronix.de, vgupta@synopsys.com, x86@kernel.org In-Reply-To: <20190330202418.GB27435@kroah.com> References: <18626931553963861@sas1-b3ec53dbc12b.qloud-c.yandex.net>, <20467491553964233@myt4-c0b480c282c8.qloud-c.yandex.net>, <20190330183826.GB21828@kroah.com>, <201903302015.x2UKFnSL003850@sdf.org>, <20190330202418.GB27435@kroah.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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!