Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1553703pxb; Thu, 7 Oct 2021 10:02:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXscmY4RjeN7B5ut0CO2hM5jM/aJbdggO72XH4/TXJH3AgTUv4NA5th8wnAgnyXRxL3k0j X-Received: by 2002:aa7:cd99:: with SMTP id x25mr7658645edv.266.1633626129498; Thu, 07 Oct 2021 10:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633626129; cv=none; d=google.com; s=arc-20160816; b=eNgI9xgRr2gOT9DPcanNnonDm9qbsWeJK/p72k3ad+3WXwjw5pkjokSrG6JcPs9t7f kbnmrWvVV1RRFy/FOQhcWFUaijRnqoUGNupMa5lszvRoTGmyCizxX93bMWAUQ2WOWayl RXEl9nje4vhQrLQcXJ1tcDan8q28gizF2lOstmGLn0d/kmE9OwTeqDudxyarxSoFwksj evqUYx7F0pIZ38IknjHQk5NQMRYO/1CXQjnac+k/JvOgMafo5AixQp5uqsg13OWSXPBm IbWIfoerGaIp/lw9RGeHUOcuFXl8b0ZdzFv2w3/M9NndfrpCRiKdHE/lJVu7oD2qpekY qnow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=El2GgWjzGT3viL2Ka9TGbi2wzgQQNq0vXUAM3RTl7rM=; b=piEdfxeuxF7K+luGYrgpJZK0BZceqPwU2ph8Z0YkSrYRZ/sDWPoYA0a+DKNwGrpYZx rUpQfDUayb9imgLf7RITQA29LaPO6WKV6koZD3XYneMFY23P1FhdCWJgzCSeooBS7jgG 401zGOi5yg6DBQDvxTrGcRI7qRcUmnIB2Wa8Ai0fzX1TLF1LXS/fM3lazf5LNJq7KWrX Keiw3aGK5TawOcjQ3yYtJMNx9Ty9qq22exvQz97CoXPo8X9TT1TraKYZneyjTk1J3odJ YUW58jJZsXge/xvX45XQHV7NkwYcQJ+hDiPDnimNjq8WP+K7WLXEVuWLnQYhrcKodDRv em0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NgX7hfYe; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l21si91911edj.302.2021.10.07.10.01.44; Thu, 07 Oct 2021 10:02:09 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=NgX7hfYe; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242955AbhJGQ7e (ORCPT + 99 others); Thu, 7 Oct 2021 12:59:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242953AbhJGQ72 (ORCPT ); Thu, 7 Oct 2021 12:59:28 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78181C061767; Thu, 7 Oct 2021 09:57:34 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id o20so21042637wro.3; Thu, 07 Oct 2021 09:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=El2GgWjzGT3viL2Ka9TGbi2wzgQQNq0vXUAM3RTl7rM=; b=NgX7hfYeaa3E/yEBbPOQByUrqiYE/qI824xs4ToqrJj1fTGpxW9OXRkBDDGIuBzxpp 01OTm5/FyD37etzeiJWIz9o90MT0ztqEHYa4Bok3tTouLKs3c7WBapKz5439tMFYLA6w NAqT+9pmb2tNEdpf12np7W4TIijC2wFgLon/tnsF82lJ4uH146LP5dqU0YuPVeyKS53+ Ys33ILup66XiUjWAI5hnZlqLh9K8Pajia0xShDz0LqW1Ha6ilBAQvSWMPVlVa4eroDjw cVbke7jP/DglmKoFE3YE1KbPtmrqWPzkMDPP3A4Smbi7pVAXWolyCizb+8OXX508OoLm WNLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=El2GgWjzGT3viL2Ka9TGbi2wzgQQNq0vXUAM3RTl7rM=; b=Cnkn8n9Qdo7BbN2XK2r6oGSWw2oJY62pw6vMLfr1OLVwME5m4E09YqX/8zds0paBBk Xnk38docWHXBLV06RDOa9AUMXGv6rUsWB6jDNXN5MsiBf9rAHX4OeohH6wUIyiTb2JH1 sIrXXicPnEvhz8bu0Ag+nUDbFBHQ7PCiUKRYgGpx950IoXn5A5jhvMvAhl3ceTRoHpAF v0QhCIggUQMA78wIVBApmOXv30TO81ZZQNPHZGhvZgLQatgk9ICBdvxkCqsh7ySeRCyg joHiWTiiHLqMQBD5Qaos5i1IauzPyJQzycloFXE7NPkii6hu5j852aiySdT4AsLSUXtO fljw== X-Gm-Message-State: AOAM530h9+mo+0EerqFQi7ED4DcR1UuCl8tpJeOe0E6uJQFwPtRxfeQJ uHbw24hp5fT2DkubHpCrOIY= X-Received: by 2002:a1c:9d97:: with SMTP id g145mr5894307wme.78.1633625853047; Thu, 07 Oct 2021 09:57:33 -0700 (PDT) Received: from localhost ([217.111.27.204]) by smtp.gmail.com with ESMTPSA id n1sm2800731wmi.30.2021.10.07.09.57.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 09:57:32 -0700 (PDT) Date: Thu, 7 Oct 2021 18:57:31 +0200 From: Thierry Reding To: Nicolin Chen Cc: joro@8bytes.org, will@kernel.org, vdumpa@nvidia.com, jonathanh@nvidia.com, linux-tegra@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, digetx@gmail.com Subject: Re: [PATCH v6 3/6] iommu/tegra-smmu: Rename struct tegra_smmu_swgroup *group to *swgrp Message-ID: References: <20210914013858.31192-1-nicoleotsuka@gmail.com> <20210914013858.31192-4-nicoleotsuka@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="z5TfhxvQFdT1ZzDp" Content-Disposition: inline In-Reply-To: <20210914013858.31192-4-nicoleotsuka@gmail.com> User-Agent: Mutt/2.1.3 (987dde4c) (2021-09-10) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --z5TfhxvQFdT1ZzDp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 13, 2021 at 06:38:55PM -0700, Nicolin Chen wrote: > There are both tegra_smmu_swgroup and tegra_smmu_group structs > using "group" for their pointer instances. This gets confusing > to read the driver sometimes. >=20 > So this patch renames "group" of struct tegra_smmu_swgroup to > "swgrp" as a cleanup. Also renames its "find" function. >=20 > Note that we already have "swgroup" being used for an unsigned > int type variable that is inside struct tegra_smmu_swgroup, so > it's not able to use "swgroup" but only something like "swgrp". >=20 > Signed-off-by: Nicolin Chen > --- > drivers/iommu/tegra-smmu.c | 34 +++++++++++++++++----------------- > 1 file changed, 17 insertions(+), 17 deletions(-) >=20 > diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c > index a32ed347e25d..0f3883045ffa 100644 > --- a/drivers/iommu/tegra-smmu.c > +++ b/drivers/iommu/tegra-smmu.c > @@ -334,35 +334,35 @@ static void tegra_smmu_domain_free(struct iommu_dom= ain *domain) > } > =20 > static const struct tegra_smmu_swgroup * > -tegra_smmu_find_swgroup(struct tegra_smmu *smmu, unsigned int swgroup) > +tegra_smmu_find_swgrp(struct tegra_smmu *smmu, unsigned int swgroup) This makes things inconsistent now. The tegra_smmu_find_swgroup() name indicates that we're looking for some "swgroup" entity within an "smmu" object. The entity that we're looking for is a struct tegra_smmu_swgroup so I think it makes sense to use that full name in the function name. > { > - const struct tegra_smmu_swgroup *group =3D NULL; > + const struct tegra_smmu_swgroup *swgrp =3D NULL; I don't think the existing naming is confusing. The variable name "group" is consistently used for tegra_smmu_swgroup structures and there are no cases where we would confuse them with struct tegra_smmu_group instances. However, I don't feel strongly about it, so I'm fine with changing the variable names to "swgrp" if you think that makes things less confusing. Thierry --z5TfhxvQFdT1ZzDp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmFfJvsACgkQ3SOs138+ s6FH1g//bwitjmhtyJUDK/UWfxLfuFwOjEu/eNLJf0O23uMNI90/z2dGywyDoXgu QYpUdBr3dSr6mO1uQjFSnftlgad6AK7CReY0ZeHKu3SiGmpIbXI84vSJRKVHpoWu Hc4daNzWEAQS2SnBvzpwa8rnLPoxsbpA4x2EqI5nN+Zh1bmaeIcEMF/BQHoGJWj9 o55XUIwRXKa500tP3JG7qNa0LhwYHnaDI+R8mYVTee88wD2nCwTGuxghWiJk7aKI NvLTq7Y1/lHHzAEpP1a+fEXsjDUKTOTU6FuZyd8Fx16N/O0FigyQXl4SU3WPmMfg tvRZtn/Y/gdB7uodJRhLmLCAhTc1NZSxZWU5TXupPAIVohIWHtecEKTD5aKBXNhv btbQxyPz0WLT34CqPCdl5+8+2U3v3OyhjdP3Z+v37mPYav85ejuySiBfTuyDcvb7 4T6QgAIEOaOIGPQGBmchEoe5MUlPDN3U2ZN9wmiw/kZdH0k13MhVRHPe5wK6kMJ7 bYLAH+Am3+sTgdnPJsKQ/ILyXbaI1jj11CZko/FmKKK0Tr72ue7npLSHf41m74TU B7tOnybngivbPWz4R8hANp0/fIP0PLuIS6mYd5+8Gs/qb1J7gx82RIbLrZcP/N8t e5XgdrCf+8sezq8ADDn4o+JrGb8vE0c/rrNQImyTOsAOwXfDHeE= =z04X -----END PGP SIGNATURE----- --z5TfhxvQFdT1ZzDp--