Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp965945pxu; Wed, 2 Dec 2020 07:47:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSSorhyV+nH2ALkxEEY1ZPohKCmiRiAS3kiKiE4ejF9mpj7LsCvXM034kVlU6UgQS9xKz6 X-Received: by 2002:a17:906:7f0b:: with SMTP id d11mr366659ejr.7.1606924040772; Wed, 02 Dec 2020 07:47:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606924040; cv=none; d=google.com; s=arc-20160816; b=yNdigB2pT9k8/7wtozCk4HMytqrXQC7L/UNYtUlEB/7yenFg1jtC2xmjmi3kuvCYb3 7KVjEaA+iPsoPKf9rq6+aNiNtdFjHVrJ34Ycz39aOMMWGWpcm7WJW2INz/n+ktYI7gbB QAwF22Eoluy3u38VOae+I9PuwpWBhVYBX9DMOZ0bC9vo+L+QpgBEpsR6vQqW5wOCwHLA ttQiovPD6W+sugNd1d4PaQAwyacSStaabjralR2gT5fEHZmoWt9+xRC4emGc3j3Y1Gv0 I4FR2JHted0Ze0NKSS7XtGyiy/9E6MK37Qjtj+RmO3dxsOKzDUu1Ku7yZbn8HvK5zM3F nFsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/UHxwpIgzVzreRL98GaE+Nf+yyIwRliZkCO7QwUCEgs=; b=RlhnlBYo21J3Uazu+b/3JQhio9IyKs4bdVhjMgR4gXI6uOev7xb58QsJNQ8Wgp9tY2 BHvz4vd1R/qFKTsM2NDnBYy59mZwVAJsCiqAOxyU1OntGYJ4e4BXe3i2+a2h08olcFmQ sBiQigB60jkZ9eylmASCb5aS6Urv1yR+u6FRIMRJfwkRljEDEFZEeRayrsnyR++Oux/G 8bDPOetT1Io3une+enFgyYF1fHrnf72ZFw6b0O1fwnDo0xet+07OPriVzcYPCEQURhH2 JwYsWPVRHF6bnyG8fZCJfYpXrtnQaukSS0DSLs9GKanZ4bQHbspx0dL9j61OAUOMa17n oz1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gp6qawBN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck15si162852ejb.659.2020.12.02.07.46.56; Wed, 02 Dec 2020 07:47:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gp6qawBN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727725AbgLBPpV (ORCPT + 99 others); Wed, 2 Dec 2020 10:45:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727415AbgLBPpU (ORCPT ); Wed, 2 Dec 2020 10:45:20 -0500 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC182C0613CF for ; Wed, 2 Dec 2020 07:44:39 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id c198so8506525wmd.0 for ; Wed, 02 Dec 2020 07:44:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/UHxwpIgzVzreRL98GaE+Nf+yyIwRliZkCO7QwUCEgs=; b=gp6qawBNxj20UMCB0qKbqw35Nh7dgu1epXjabfxPkvif2E6O8pV9qsix7Swhk16rgA 7U8GXJzUXnwfKVqYUjOLrtRQrSChgE7vZnpjBYWcRpilLM2szXRG69gSh5qpxe+GDMQ9 KDwdufKg3mdvIsTbFSBlskjEK0inIAModCfOxYOJpbqCX4Nt9eX7sJN2jICQ5ByfPXTx 629pV2SxxiGkQCnmoA6E0i5XXYqDAJ3dQVWYMse12jjHf8G5E/9mMCEcUCiMne2eCFIS 97aq1mVCe4qraq5zC1HtXSTmf47MvJ2/dkbIQdZ2PEPjc9OFMWBuVoSbVniM6Z9RX8/T sOCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/UHxwpIgzVzreRL98GaE+Nf+yyIwRliZkCO7QwUCEgs=; b=dhfqBwqyul7iRpo7vlL+AYVqEQfpTxGy4Xb6pkvthIYKyUMMycKNgC+bWeZyeAX0Nx sbDSHQ24CT/oR8h/JBWLxQh9P1K0tC5ioVWfiFE0u7FcAN6Eg0wp0eC9yX2zoljmlJBr PIMWEZ330xIEhGxaOW8YjCecJuyi7d3qsY9BzB6LWo5fWi/iyTPL4pxMGOjoXgHOrH3K 8hNaQv2qTEBc6CtOroXs6FF1cSBATBJuu1qDVcMLZaLgbLACF0srSi8Xt7vcoG+URzCL wunP3If/eGqCnMXaa3/eWscAhdJP3i6GRd2zftf0qBEQW8NaXBlSHCN3ni6G7XsHAeMl ad6g== X-Gm-Message-State: AOAM531YGSN4S0AVOxo3MDoB3UePvvEToZPGlKXiYg2M+kGkUwlP9De6 jn7MrJFdTZnYPAzMgBpCd6K37A== X-Received: by 2002:a1c:ddd5:: with SMTP id u204mr3724239wmg.174.1606923878152; Wed, 02 Dec 2020 07:44:38 -0800 (PST) Received: from google.com ([2a01:4b00:8523:2d03:5ddd:b7c5:e3c9:e87a]) by smtp.gmail.com with ESMTPSA id y7sm2620731wrp.3.2020.12.02.07.44.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 07:44:37 -0800 (PST) Date: Wed, 2 Dec 2020 15:44:35 +0000 From: David Brazdil To: Mark Rutland Cc: kvmarm@lists.cs.columbia.edu, Jonathan Corbet , Catalin Marinas , Will Deacon , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Dennis Zhou , Tejun Heo , Christoph Lameter , Lorenzo Pieralisi , Sudeep Holla , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com Subject: Re: [PATCH v3 03/23] arm64: Make cpu_logical_map() take unsigned int Message-ID: <20201202154435.qpr7ow53xra3xjkd@google.com> References: <20201126155421.14901-1-dbrazdil@google.com> <20201126155421.14901-4-dbrazdil@google.com> <20201126172838.GD38486@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201126172838.GD38486@C02TD0UTHF1T.local> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 26, 2020 at 05:28:38PM +0000, Mark Rutland wrote: > On Thu, Nov 26, 2020 at 03:54:01PM +0000, David Brazdil wrote: > > CPU index should never be negative. Change the signature of > > (set_)cpu_logical_map to take an unsigned int. > > > > Signed-off-by: David Brazdil > > Is there a function problem here, or is this just cleanup from > inspection? > > Core code including the cpuhp_*() callbacks uses an int, so if there's a > strong justification to change this, it suggests there's some treewide > cleanup that should be done. > > I don't have strong feelings on the matter, but I'd like to understand > the rationale. Yeah, it's a mess. Marc and I felt that using a uint was less error-prone wrt bounds checks. If this gets an int, it still works and only checking the upper bound is required. Does that make sense? David