[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80c27ea8-4d82-a41d-1ccb-17d8da974faa@amd.com>
Date: Thu, 8 Jun 2023 09:36:51 -0500
From: Terry Bowman <Terry.Bowman@....com>
To: Dan Williams <dan.j.williams@...el.com>,
alison.schofield@...el.com, vishal.l.verma@...el.com,
ira.weiny@...el.com, bwidawsk@...nel.org, dave.jiang@...el.com,
Jonathan.Cameron@...wei.com, linux-cxl@...r.kernel.org
Cc: rrichter@....com, linux-kernel@...r.kernel.org, bhelgaas@...gle.com
Subject: Re: [PATCH v5 03/26] cxl: Rename member @dport of struct cxl_dport to
@dev
Hi Dan,
On 6/8/23 01:42, Dan Williams wrote:
> Terry Bowman wrote:
>> From: Robert Richter <rrichter@....com>
>>
>> Reading code like dport->dport does not immediately suggest that this
>> points to the corresponding device structure of the dport. Rename
>> struct member @dport to @dev.
>
> This one I don't agree with.
>
> This can switch to ->dport_dev if you like. The reason for ->dport was
> for symmetry with the ->uport of a 'struct cxl_port'. So if you change
> this to ->dport_dev then also make the ->uport_dev change for symmetry.
>
> Unlike a 'struct cxl_port' a 'struct cxl_dport' is not a device in its
> own right which is what I see when I read dport->dev.
>
Ok, I'll change the structure member names and code to use the following:
struct cxl_dport::dev -> struct cxl_dport::dport_dev
struct cxl_port::uport -> struct cxl_port::uport_dev
Regards,
Terry
>>
>> While at it, also rename @new argument of add_dport() to @dport. This
>> better describes the variable as a dport (e.g. new->dport becomes to
>> dport->dev).
>
> There is already other occurrences of dport_dev as an argument, so I
> think that works here too.
Powered by blists - more mailing lists