Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp17923yba; Sat, 30 Mar 2019 13:18:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXfGqJwnNMx5qw0Y7RDLbWBehX2bDPbB2cTg46pHl+sZVP8m135JLpkTVb6vWh9gcfMNGh X-Received: by 2002:a17:902:b706:: with SMTP id d6mr20653144pls.250.1553977105225; Sat, 30 Mar 2019 13:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553977105; cv=none; d=google.com; s=arc-20160816; b=UU3d7JEA3dJlU28jF8gaU+pTZbvOwaSZECdXTvAZ1c42HD+w5QTLjdTHBb7os9iEUK dP8kppCI3ZpYSMBsljyoxSxfYgJ/FYJCDE+peRBhESbtDcCkB4G2sNeipX5y7j5IDfu/ ds6UzxY5cAn2MN7Aj0BwuN0DuCPMEa+TW3KF3JikMH8n1ccXCfbV4xSJe3ZTjksskR96 aMXPtK3h9Qdmvmz1JvLnt5KF6LRYeltXsg5xRNJ3MpcFXHwHZNKA0gbPK6jsncwt3Ed9 fuorECK8TgEluXftU8HbLifyVOkEH8FckE1rJqgTq7rLMOqGV0IDlbhrrFmWRX07Yts6 jHNw== 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; bh=mdmQeIKJJl3rz6zdRBen3+xXFFSRXZLY3Kes+fOlQ2Q=; b=HF/qIO38xOa2w1KGvW0zL0oVdee5+bkZm2BSe2hnKSR37kh+/173KqY9FgLlRiBUYZ yOogtynY04cEAo+fKAyNeCitilhqMvVtIWXBLv5uZnTuMcMyKO4MIa426Fs6QR68qTG9 3n3QF523Rj5Gy2ZDvrO3IglFbWpCu4DGfs7OQZ3UazxLBwuQYWgiTS4ZZpET+7eJhsan PMQXgYJL+M8p5K0e/KNpXRTrwrENgXCO1DbXANxI5YHqMBhB14HS7+WubcpxiCQ0Hlwo XBOqo7Xybe/gcNH/oQk67GgwSwgyTyQhxftb4RpmXzhQ772/bb0wmfwx8Ajx29LS0C1i wwNA== ARC-Authentication-Results: i=1; mx.google.com; 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 m13si5187952pga.331.2019.03.30.13.18.09; Sat, 30 Mar 2019 13:18:25 -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; 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 S1730974AbfC3UR3 (ORCPT + 99 others); Sat, 30 Mar 2019 16:17:29 -0400 Received: from mx.sdf.org ([205.166.94.20]:62454 "EHLO mx.sdf.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730613AbfC3UR2 (ORCPT ); Sat, 30 Mar 2019 16:17:28 -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 x2UKFpBZ007337 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO); Sat, 30 Mar 2019 20:15:52 GMT Received: (from lkml@localhost) by sdf.org (8.15.2/8.12.8/Submit) id x2UKFnSL003850; Sat, 30 Mar 2019 20:15:49 GMT Date: Sat, 30 Mar 2019 20:15:49 GMT From: George Spelvin Message-Id: <201903302015.x2UKFnSL003850@sdf.org> To: gregkh@linuxfoundation.org, st5pub@yandex.ru 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, lkml@sdf.org, mark@fasheh.com, mingo@redhat.com, mpe@ellerman.id.au, naveen.n.rao@linux.vnet.ibm.com, paulus@samba.org, richard@nod.at, tglx@linutronix.de, vgupta@synopsys.com, x86@kernel.org In-Reply-To: <20190330183826.GB21828@kroah.com> References: <18626931553963861@sas1-b3ec53dbc12b.qloud-c.yandex.net>, <20467491553964233@myt4-c0b480c282c8.qloud-c.yandex.net>, <20190330183826.GB21828@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 19:38:26 +0100 greh k-h 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. The connection is that it's a natural consequence of doing a pass over every call site. You're right it could be dropped from the series harmlessly, but it comes from the same work. But it's all of *three* call sites in the kernel which are affected. Surely that's not an unreasonable amount of churn to clean up a wart?