From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Xingquan Liu <b1n@b1n.io>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] staging: vt6655: Rename variable apTD1Rings
Date: Fri, 13 Sep 2024 07:09:55 +0200 [thread overview]
Message-ID: <20abd18c-8afc-4ea3-afc1-3c48ed87307e@gmail.com> (raw)
In-Reply-To: <20240913012343.42579-2-b1n@b1n.io>
On 9/13/24 03:23, Xingquan Liu wrote:
> Rename variable apTD1Rings to ap_td1_rings to fix checkpatch warning
> Avoid CamelCase.
>
> Signed-off-by: Xingquan Liu <b1n@b1n.io>
> ---
> v3: Add change history
> v2: Rename variable apTD1Rings
>
> drivers/staging/vt6655/card.c | 6 +++---
> drivers/staging/vt6655/device.h | 2 +-
> drivers/staging/vt6655/device_main.c | 14 +++++++-------
> 3 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
> index 36bf8cde2e08..6a2e390e9493 100644
> --- a/drivers/staging/vt6655/card.c
> +++ b/drivers/staging/vt6655/card.c
> @@ -391,8 +391,8 @@ void card_safe_reset_tx(struct vnt_private *priv)
> priv->tail_td[0] = &priv->ap_td0_rings[0];
> priv->apCurrTD[0] = &priv->ap_td0_rings[0];
>
> - priv->tail_td[1] = &priv->apTD1Rings[0];
> - priv->apCurrTD[1] = &priv->apTD1Rings[0];
> + priv->tail_td[1] = &priv->ap_td1_rings[0];
> + priv->apCurrTD[1] = &priv->ap_td1_rings[0];
>
> for (uu = 0; uu < TYPE_MAXTD; uu++)
> priv->iTDUsed[uu] = 0;
> @@ -403,7 +403,7 @@ void card_safe_reset_tx(struct vnt_private *priv)
> /* init all Tx Packet pointer to NULL */
> }
> for (uu = 0; uu < priv->opts.tx_descs[1]; uu++) {
> - curr_td = &priv->apTD1Rings[uu];
> + curr_td = &priv->ap_td1_rings[uu];
> curr_td->td0.owner = OWNED_BY_HOST;
> /* init all Tx Packet pointer to NULL */
> }
> diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
> index 32c51d794264..5eaab6b172d3 100644
> --- a/drivers/staging/vt6655/device.h
> +++ b/drivers/staging/vt6655/device.h
> @@ -136,7 +136,7 @@ struct vnt_private {
> struct vnt_tx_desc *tail_td[TYPE_MAXTD];
>
> struct vnt_tx_desc *ap_td0_rings;
> - struct vnt_tx_desc *apTD1Rings;
> + struct vnt_tx_desc *ap_td1_rings;
>
> struct vnt_rx_desc *aRD0Ring;
> struct vnt_rx_desc *aRD1Ring;
> diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
> index a8dcd8ad3945..bf3ecf720206 100644
> --- a/drivers/staging/vt6655/device_main.c
> +++ b/drivers/staging/vt6655/device_main.c
> @@ -554,7 +554,7 @@ static bool device_init_rings(struct vnt_private *priv)
> + priv->opts.rx_descs0 * sizeof(struct vnt_rx_desc)
> + priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc);
>
> - priv->apTD1Rings = vir_pool
> + priv->ap_td1_rings = vir_pool
> + priv->opts.rx_descs0 * sizeof(struct vnt_rx_desc)
> + priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc)
> + priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc);
> @@ -761,7 +761,7 @@ static int device_init_td1_ring(struct vnt_private *priv)
> curr = priv->td1_pool_dma;
> for (i = 0; i < priv->opts.tx_descs[1];
> i++, curr += sizeof(struct vnt_tx_desc)) {
> - desc = &priv->apTD1Rings[i];
> + desc = &priv->ap_td1_rings[i];
> desc->td_info = kzalloc(sizeof(*desc->td_info), GFP_KERNEL);
> if (!desc->td_info) {
> ret = -ENOMEM;
> @@ -771,19 +771,19 @@ static int device_init_td1_ring(struct vnt_private *priv)
> desc->td_info->buf = priv->tx1_bufs + i * PKT_BUF_SZ;
> desc->td_info->buf_dma = priv->tx_bufs_dma1 + i * PKT_BUF_SZ;
>
> - desc->next = &(priv->apTD1Rings[(i + 1) % priv->opts.tx_descs[1]]);
> + desc->next = &(priv->ap_td1_rings[(i + 1) % priv->opts.tx_descs[1]]);
> desc->next_desc = cpu_to_le32(curr + sizeof(struct vnt_tx_desc));
> }
>
> if (i > 0)
> - priv->apTD1Rings[i - 1].next_desc = cpu_to_le32(priv->td1_pool_dma);
> - priv->tail_td[1] = priv->apCurrTD[1] = &priv->apTD1Rings[0];
> + priv->ap_td1_rings[i - 1].next_desc = cpu_to_le32(priv->td1_pool_dma);
> + priv->tail_td[1] = priv->apCurrTD[1] = &priv->ap_td1_rings[0];
>
> return 0;
>
> err_free_desc:
> while (i--) {
> - desc = &priv->apTD1Rings[i];
> + desc = &priv->ap_td1_rings[i];
> kfree(desc->td_info);
> }
>
> @@ -808,7 +808,7 @@ static void device_free_td1_ring(struct vnt_private *priv)
> int i;
>
> for (i = 0; i < priv->opts.tx_descs[1]; i++) {
> - struct vnt_tx_desc *desc = &priv->apTD1Rings[i];
> + struct vnt_tx_desc *desc = &priv->ap_td1_rings[i];
> struct vnt_td_info *td_info = desc->td_info;
>
> dev_kfree_skb(td_info->skb);
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
next prev parent reply other threads:[~2024-09-13 5:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-13 1:23 [PATCH v3 1/2] staging: vt6655: Rename variable apTD0Rings Xingquan Liu
2024-09-13 1:23 ` [PATCH v3 2/2] staging: vt6655: Rename variable apTD1Rings Xingquan Liu
2024-09-13 5:09 ` Philipp Hortmann [this message]
2024-09-13 5:08 ` [PATCH v3 1/2] staging: vt6655: Rename variable apTD0Rings Philipp Hortmann
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=20abd18c-8afc-4ea3-afc1-3c48ed87307e@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=b1n@b1n.io \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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