lkml.org 
[lkml]   [2023]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: [PATCH v5 03/26] cxl: Rename member @dport of struct cxl_dport to @dev
Terry Bowman wrote:
> From: Robert Richter <rrichter@amd.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.

>
> 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.

\
 
 \ /
  Last update: 2023-06-08 08:43    [W:0.386 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site