linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Huisong Li <lihuisong@huawei.com>
Cc: <xuwei5@hisilicon.com>, <linux-kernel@vger.kernel.org>,
	<soc@kernel.org>, <linux-arm-kernel@lists.infradead.org>,
	<krzk@kernel.org>, <wanghuiqiang@huawei.com>,
	<liuyonglong@huawei.com>
Subject: Re: [PATCH v2 4/6] soc: hisilicon: kunpeng_hccs: Fix the 'lane_mode' field name in port info structure to 'max_lane_num'
Date: Fri, 23 Aug 2024 09:40:58 +0100	[thread overview]
Message-ID: <20240823094058.00002b9f@Huawei.com> (raw)
In-Reply-To: <20240823031059.32579-5-lihuisong@huawei.com>

On Fri, 23 Aug 2024 11:10:57 +0800
Huisong Li <lihuisong@huawei.com> wrote:

> The lane mode of HCCS port is an information to user, and actually comes
> from the maximum lane number. But it is good and easy for driver to use
> the maximum lane number. So fix the 'lane_mode' field name in port info
> structure to 'max_lane_num'.
> 
> Signed-off-by: Huisong Li <lihuisong@huawei.com>

It's unfortunate we missed the ABI in the first place
as that's still confusingly names, but at least this improves things
in the driver.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  drivers/soc/hisilicon/kunpeng_hccs.c | 4 ++--
>  drivers/soc/hisilicon/kunpeng_hccs.h | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c
> index 6055e5091cbd..418e4ee5d9e5 100644
> --- a/drivers/soc/hisilicon/kunpeng_hccs.c
> +++ b/drivers/soc/hisilicon/kunpeng_hccs.c
> @@ -594,7 +594,7 @@ static int hccs_get_all_port_info_on_die(struct hccs_dev *hdev,
>  		port = &die->ports[i];
>  		port->port_id = attrs[i].port_id;
>  		port->port_type = attrs[i].port_type;
> -		port->lane_mode = attrs[i].lane_mode;
> +		port->max_lane_num = attrs[i].max_lane_num;
>  		port->enable = attrs[i].enable;
>  		port->die = die;
>  	}
> @@ -839,7 +839,7 @@ static ssize_t lane_mode_show(struct kobject *kobj, struct kobj_attribute *attr,
>  {
>  	const struct hccs_port_info *port = kobj_to_port_info(kobj);
>  
> -	return sysfs_emit(buf, "x%u\n", port->lane_mode);
> +	return sysfs_emit(buf, "x%u\n", port->max_lane_num);
>  }
>  static struct kobj_attribute lane_mode_attr = __ATTR_RO(lane_mode);
>  
> diff --git a/drivers/soc/hisilicon/kunpeng_hccs.h b/drivers/soc/hisilicon/kunpeng_hccs.h
> index c3adbc01b471..5e12a1e1474e 100644
> --- a/drivers/soc/hisilicon/kunpeng_hccs.h
> +++ b/drivers/soc/hisilicon/kunpeng_hccs.h
> @@ -19,7 +19,7 @@
>  struct hccs_port_info {
>  	u8 port_id;
>  	u8 port_type;
> -	u8 lane_mode;
> +	u8 max_lane_num;
>  	bool enable; /* if the port is enabled */
>  	struct kobject kobj;
>  	bool dir_created;
> @@ -113,7 +113,7 @@ struct hccs_die_info_rsp_data {
>  struct hccs_port_attr {
>  	u8 port_id;
>  	u8 port_type;
> -	u8 lane_mode;
> +	u8 max_lane_num;
>  	u8 enable : 1; /* if the port is enabled */
>  	u16 rsv[2];
>  };



  reply	other threads:[~2024-08-23  8:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18  7:11 [PATCH 0/5] Add some features and bugfix for kunpeng_hccs Huisong Li
2024-07-18  7:11 ` [PATCH 1/5] soc: hisilicon: kunpeng_hccs: fix a PCC typo Huisong Li
2024-07-18  7:11 ` [PATCH 2/5] soc: hisilicon: kunpeng_hccs: return failure on having not die or port information Huisong Li
2024-07-18  7:11 ` [PATCH 3/5] soc: hisilicon: kunpeng_hccs: add used HCCS type sysfs on platform Huisong Li
     [not found]   ` <66AB7194.1060404@hisilicon.com>
2024-08-09  4:07     ` lihuisong (C)
2024-07-18  7:11 ` [PATCH 4/5] soc: hisilicon: kunpeng_hccs: support low power feature for specified HCCS Huisong Li
2024-07-28 11:55   ` Krzysztof Kozlowski
2024-08-09  4:06     ` lihuisong (C)
2024-07-18  7:11 ` [PATCH 5/5] doc: soc: hisilicon: kunpeng_hccs: add low power interface description for HCCS Huisong Li
2024-08-23  3:10 ` [PATCH v2 0/6] Add some features and bugfix for kunpeng_hccs Huisong Li
2024-08-23  3:10   ` [PATCH v2 1/6] soc: hisilicon: kunpeng_hccs: Fix a PCC typo Huisong Li
2024-08-23  8:32     ` Jonathan Cameron
2024-08-23  3:10   ` [PATCH v2 2/6] soc: hisilicon: kunpeng_hccs: Return failure on having not die or port information Huisong Li
2024-08-23  8:33     ` Jonathan Cameron
2024-08-27 11:04       ` lihuisong (C)
2024-08-23  3:10   ` [PATCH v2 3/6] soc: hisilicon: kunpeng_hccs: Add the check for base address and size of shared memory Huisong Li
2024-08-23  8:38     ` Jonathan Cameron
2024-08-27 11:12       ` lihuisong (C)
2024-08-23  3:10   ` [PATCH v2 4/6] soc: hisilicon: kunpeng_hccs: Fix the 'lane_mode' field name in port info structure to 'max_lane_num' Huisong Li
2024-08-23  8:40     ` Jonathan Cameron [this message]
2024-08-27 11:15       ` lihuisong (C)
2024-08-23  3:10   ` [PATCH v2 5/6] soc: hisilicon: kunpeng_hccs: Add used HCCS types sysfs Huisong Li
2024-08-23  8:47     ` Jonathan Cameron
2024-08-27 11:32       ` lihuisong (C)
2024-08-23  3:10   ` [PATCH v2 6/6] soc: hisilicon: kunpeng_hccs: Support low power feature for the specified HCCS type Huisong Li
2024-08-23  8:58     ` Jonathan Cameron
2024-08-27 11:48       ` lihuisong (C)
2024-08-27 11:59         ` Jonathan Cameron
2024-08-23  9:02   ` [PATCH v2 0/6] Add some features and bugfix for kunpeng_hccs Jonathan Cameron
2024-08-27 11:49     ` lihuisong (C)

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=20240823094058.00002b9f@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=krzk@kernel.org \
    --cc=lihuisong@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuyonglong@huawei.com \
    --cc=soc@kernel.org \
    --cc=wanghuiqiang@huawei.com \
    --cc=xuwei5@hisilicon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).