[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240920162025.31465-7-b1n@b1n.io>
Date: Sat, 21 Sep 2024 00:20:25 +0800
From: Xingquan Liu <b1n@....io>
To: Philipp Hortmann <philipp.g.hortmann@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Cc: Xingquan Liu <b1n@....io>
Subject: [PATCH 7/7] staging: vt6655: Rename variable aRD1Ring
Rename variable aRD1Ring to a_rd1_ring to fix checkpatch warning
Avoid CamelCase.
Signed-off-by: Xingquan Liu <b1n@....io>
---
drivers/staging/vt6655/card.c | 4 ++--
drivers/staging/vt6655/device.h | 2 +-
drivers/staging/vt6655/device_main.c | 14 +++++++-------
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 712a478aac91..c8b3b16b03c6 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -436,7 +436,7 @@ void card_v_safe_reset_rx(struct vnt_private *priv)
/* initialize RD index */
priv->p_curr_rd[0] = &priv->a_rd0_ring[0];
- priv->p_curr_rd[1] = &priv->aRD1Ring[0];
+ priv->p_curr_rd[1] = &priv->a_rd1_ring[0];
/* init state, all RD is chip's */
for (uu = 0; uu < priv->opts.rx_descs0; uu++) {
@@ -448,7 +448,7 @@ void card_v_safe_reset_rx(struct vnt_private *priv)
/* init state, all RD is chip's */
for (uu = 0; uu < priv->opts.rx_descs1; uu++) {
- p_desc = &priv->aRD1Ring[uu];
+ p_desc = &priv->a_rd1_ring[uu];
p_desc->rd0.res_count = cpu_to_le16(priv->rx_buf_sz);
p_desc->rd0.owner = OWNED_BY_NIC;
p_desc->rd1.req_count = cpu_to_le16(priv->rx_buf_sz);
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 8fd4d972df14..591fcd02ee8e 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -139,7 +139,7 @@ struct vnt_private {
struct vnt_tx_desc *ap_td1_rings;
struct vnt_rx_desc *a_rd0_ring;
- struct vnt_rx_desc *aRD1Ring;
+ struct vnt_rx_desc *a_rd1_ring;
struct vnt_rx_desc *p_curr_rd[TYPE_MAXRD];
struct vnt_options opts;
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 84b8a476d240..eeb2f271ba0b 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -518,7 +518,7 @@ static bool device_init_rings(struct vnt_private *priv)
}
priv->a_rd0_ring = vir_pool;
- priv->aRD1Ring = vir_pool +
+ priv->a_rd1_ring = vir_pool +
priv->opts.rx_descs0 * sizeof(struct vnt_rx_desc);
priv->rd0_pool_dma = priv->pool_dma;
@@ -650,7 +650,7 @@ static int device_init_rd1_ring(struct vnt_private *priv)
/* Init the RD1 ring entries */
for (i = 0; i < priv->opts.rx_descs1;
i ++, curr += sizeof(struct vnt_rx_desc)) {
- desc = &priv->aRD1Ring[i];
+ desc = &priv->a_rd1_ring[i];
desc->rd_info = kzalloc(sizeof(*desc->rd_info), GFP_KERNEL);
if (!desc->rd_info) {
ret = -ENOMEM;
@@ -663,13 +663,13 @@ static int device_init_rd1_ring(struct vnt_private *priv)
goto err_free_rd;
}
- desc->next = &priv->aRD1Ring[(i + 1) % priv->opts.rx_descs1];
+ desc->next = &priv->a_rd1_ring[(i + 1) % priv->opts.rx_descs1];
desc->next_desc = cpu_to_le32(curr + sizeof(struct vnt_rx_desc));
}
if (i > 0)
- priv->aRD1Ring[i - 1].next_desc = cpu_to_le32(priv->rd1_pool_dma);
- priv->p_curr_rd[1] = &priv->aRD1Ring[0];
+ priv->a_rd1_ring[i - 1].next_desc = cpu_to_le32(priv->rd1_pool_dma);
+ priv->p_curr_rd[1] = &priv->a_rd1_ring[0];
return 0;
@@ -678,7 +678,7 @@ static int device_init_rd1_ring(struct vnt_private *priv)
err_free_desc:
while (i--) {
- desc = &priv->aRD1Ring[i];
+ desc = &priv->a_rd1_ring[i];
device_free_rx_buf(priv, desc);
kfree(desc->rd_info);
}
@@ -703,7 +703,7 @@ static void device_free_rd1_ring(struct vnt_private *priv)
int i;
for (i = 0; i < priv->opts.rx_descs1; i++) {
- struct vnt_rx_desc *desc = &priv->aRD1Ring[i];
+ struct vnt_rx_desc *desc = &priv->a_rd1_ring[i];
device_free_rx_buf(priv, desc);
kfree(desc->rd_info);
--
Xingquan Liu
Powered by blists - more mailing lists