From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Vadim Pasternak <vadimp@nvidia.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Michael Shych <michaelsh@nvidia.com>,
Ciju Rajan K <crajank@nvidia.com>,
Felix Radensky <fradensky@nvidia.com>,
Oleksandr Shamray <oleksandrs@nvidia.com>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>
Subject: RE: [PATCH v4 06/12] platform/mellanox: Rename field to improve code readability
Date: Fri, 24 Jan 2025 14:56:38 +0200 (EET) [thread overview]
Message-ID: <65b929db-aece-a788-df95-5eba0ca5b612@linux.intel.com> (raw)
In-Reply-To: <PH7PR12MB66682C75F25A1CE281ABD82CAFE32@PH7PR12MB6668.namprd12.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 1716 bytes --]
On Fri, 24 Jan 2025, Vadim Pasternak wrote:
>
> > -----Original Message-----
> > From: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> > Sent: Friday, 24 January 2025 10:14
> > To: Vadim Pasternak <vadimp@nvidia.com>
> > Cc: Hans de Goede <hdegoede@redhat.com>; Michael Shych
> > <michaelsh@nvidia.com>; Ciju Rajan K <crajank@nvidia.com>; Felix Radensky
> > <fradensky@nvidia.com>; Oleksandr Shamray <oleksandrs@nvidia.com>;
> > platform-driver-x86@vger.kernel.org
> > Subject: Re: [PATCH v4 06/12] platform/mellanox: Rename field to improve
> > code readability
> >
> > On Thu, 23 Jan 2025, Vadim Pasternak wrote:
> >
> > > Rename filed 'item' in structure 'mlxreg_core_item' to 'item_count'.
> >
> > field -> field
> >
> > 'item' -> 'count'
> >
> > However, this did not rename 'counter' (that's in the other struct) which was
> > what I suggested you should consider changing.
> >
> > Also in mlxreg_core_item, 'count' field seems to be the number of elements in
> > 'data' so 'item_count' doesn't sound so good name in this particular case (in
> > the other case 'counter' counts the number of items in 'item', thus my
> > suggestion to use 'item_count').
>
> Hi Ilpo,
>
> I think better to rename counter filed in 'mlxreg_core_item' to same 'counter' name as in
> 'mlxreg_core_platform_data'.
> Thus, 'item->counter' will be number of 'data' elements (struct 'mlxreg_core_item')and
> 'pdata->counter' will be like it is now number of 'item' elements: 'item->counter'
> (struct 'mlxreg_core_platform_data').
No. "Counter" means something that is counting something which is not
really the case here. Just use "count" if you want have them the same.
--
i.
next prev parent reply other threads:[~2025-01-24 12:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-23 19:08 [PATCH v4 00/12] platform/mellanox: Add support for new systems, amendments, relocate mlx-platform module Vadim Pasternak
2025-01-23 19:08 ` [PATCH v4 01/12] mellanox: Relocate mlx-platform driver Vadim Pasternak
2025-01-23 19:08 ` [PATCH v4 02/12] platform: mellanox: mlx-platform: Cosmetic changes Vadim Pasternak
2025-01-23 19:08 ` [PATCH v4 03/12] platform: mellanox: mlx-platform: Change register name Vadim Pasternak
2025-01-23 19:08 ` [PATCH v4 04/12] platform_data/mlxreg: Add capability bit and mask fields Vadim Pasternak
2025-01-23 19:08 ` [PATCH v4 05/12] platform/mellanox: mlxreg-hotplug: Add support for new flavor of capability registers Vadim Pasternak
2025-01-23 19:08 ` [PATCH v4 06/12] platform/mellanox: Rename field to improve code readability Vadim Pasternak
2025-01-24 8:13 ` Ilpo Järvinen
2025-01-24 12:52 ` Vadim Pasternak
2025-01-24 12:56 ` Ilpo Järvinen [this message]
2025-01-24 15:48 ` Vadim Pasternak
2025-01-23 19:08 ` [PATCH v4 07/12] platform/mellanox: mlxreg-dpu: Add initial support for Nvidia DPU Vadim Pasternak
2025-01-24 8:41 ` Ilpo Järvinen
2025-01-23 19:08 ` [PATCH v4 08/12] platform: mellanox: Introduce support of Nvidia smart switch Vadim Pasternak
2025-01-23 19:08 ` [PATCH v4 09/12] platform: mellanox: Cosmetic changes to improve code style Vadim Pasternak
2025-01-23 19:08 ` [PATCH v4 10/12] platform: mellanox: mlx-platform: Add support for new Nvidia system Vadim Pasternak
2025-01-23 19:08 ` [PATCH v4 11/12] platform: mellanox: nvsw-sn2200: Add support for new system flavour Vadim Pasternak
2025-01-23 19:08 ` [PATCH v4 12/12] Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Vadim Pasternak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65b929db-aece-a788-df95-5eba0ca5b612@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=crajank@nvidia.com \
--cc=fradensky@nvidia.com \
--cc=hdegoede@redhat.com \
--cc=michaelsh@nvidia.com \
--cc=oleksandrs@nvidia.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=vadimp@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.