mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <deepakx.nagaraju@intel.com>
To: joyce.ooi@intel.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, Nagaraju DeepakX <deepakx.nagaraju@intel.com>,
	Andy Schevchenko <andriy.schevchenko@linux.intel.com>
Subject: [PATCH 2/5] net: ethernet: altera: fix indentation warnings
Date: Wed, 13 Dec 2023 15:11:09 +0800	[thread overview]
Message-ID: <20231213071112.18242-3-deepakx.nagaraju@intel.com> (raw)
In-Reply-To: <20231213071112.18242-1-deepakx.nagaraju@intel.com>

From: Nagaraju DeepakX <deepakx.nagaraju@intel.com>

Fix indentation issues such as missing a blank line after declarations
and alignment issues.

Signed-off-by: Nagaraju DeepakX <deepakx.nagaraju@intel.com>
Reviewed-by: Andy Schevchenko <andriy.schevchenko@linux.intel.com>
---
 drivers/net/ethernet/altera/altera_sgdma.c    | 22 +++++++++----------
 drivers/net/ethernet/altera/altera_tse_main.c |  9 +++-----
 2 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/drivers/net/ethernet/altera/altera_sgdma.c b/drivers/net/ethernet/altera/altera_sgdma.c
index 5517f89f1ef9..d4edfb3e09e8 100644
--- a/drivers/net/ethernet/altera/altera_sgdma.c
+++ b/drivers/net/ethernet/altera/altera_sgdma.c
@@ -20,7 +20,7 @@ static void sgdma_setup_descrip(struct sgdma_descrip __iomem *desc,
 				int wfixed);

 static int sgdma_async_write(struct altera_tse_private *priv,
-			      struct sgdma_descrip __iomem *desc);
+			     struct sgdma_descrip __iomem *desc);

 static int sgdma_async_read(struct altera_tse_private *priv);

@@ -63,7 +63,6 @@ int sgdma_initialize(struct altera_tse_private *priv)
 	INIT_LIST_HEAD(&priv->txlisthd);
 	INIT_LIST_HEAD(&priv->rxlisthd);

-
 	priv->rxdescphys = dma_map_single(priv->device,
 					  (void __force *)priv->rx_dma_desc,
 					  priv->rxdescmem, DMA_BIDIRECTIONAL);
@@ -192,9 +191,7 @@ int sgdma_tx_buffer(struct altera_tse_private *priv, struct tse_buffer *buffer)
 	return 1;
 }

-
-/* tx_lock held to protect access to queued tx list
- */
+/* tx_lock held to protect access to queued tx list */
 u32 sgdma_tx_completions(struct altera_tse_private *priv)
 {
 	u32 ready = 0;
@@ -237,10 +234,9 @@ u32 sgdma_rx_status(struct altera_tse_private *priv)
 	if (sts & SGDMA_STSREG_EOP) {
 		unsigned int pktlength;
 		unsigned int pktstatus;
-		dma_sync_single_for_cpu(priv->device,
-					priv->rxdescphys,
-					SGDMA_DESC_LEN,
-					DMA_FROM_DEVICE);
+
+		dma_sync_single_for_cpu(priv->device, priv->rxdescphys,
+					SGDMA_DESC_LEN,	DMA_FROM_DEVICE);

 		pktlength = csrrd16(desc, sgdma_descroffs(bytes_xferred));
 		pktstatus = csrrd8(desc, sgdma_descroffs(status));
@@ -286,7 +282,6 @@ u32 sgdma_rx_status(struct altera_tse_private *priv)
 	return rxstatus;
 }

-
 /* Private functions */
 static void sgdma_setup_descrip(struct sgdma_descrip __iomem *desc,
 				struct sgdma_descrip __iomem *ndesc,
@@ -301,6 +296,7 @@ static void sgdma_setup_descrip(struct sgdma_descrip __iomem *desc,
 	/* Clear the next descriptor as not owned by hardware */

 	u32 ctrl = csrrd8(ndesc, sgdma_descroffs(control));
+
 	ctrl &= ~SGDMA_CONTROL_HW_OWNED;
 	csrwr8(ctrl, ndesc, sgdma_descroffs(control));

@@ -406,6 +402,7 @@ sgdma_txphysaddr(struct altera_tse_private *priv,
 {
 	dma_addr_t paddr = priv->txdescmem_busaddr;
 	uintptr_t offs = (uintptr_t)desc - (uintptr_t)priv->tx_dma_desc;
+
 	return (dma_addr_t)((uintptr_t)paddr + offs);
 }

@@ -415,6 +412,7 @@ sgdma_rxphysaddr(struct altera_tse_private *priv,
 {
 	dma_addr_t paddr = priv->rxdescmem_busaddr;
 	uintptr_t offs = (uintptr_t)desc - (uintptr_t)priv->rx_dma_desc;
+
 	return (dma_addr_t)((uintptr_t)paddr + offs);
 }

@@ -445,7 +443,6 @@ queue_tx(struct altera_tse_private *priv, struct tse_buffer *buffer)
 	list_add_tail(&buffer->lh, &priv->txlisthd);
 }

-
 /* adds a tse_buffer to the tail of a rx buffer list
  * assumes the caller is managing and holding a mutual exclusion
  * primitive to avoid simultaneous pushes/pops to the list.
@@ -465,6 +462,7 @@ static struct tse_buffer *
 dequeue_tx(struct altera_tse_private *priv)
 {
 	struct tse_buffer *buffer = NULL;
+
 	list_remove_head(&priv->txlisthd, buffer, struct tse_buffer, lh);
 	return buffer;
 }
@@ -478,6 +476,7 @@ static struct tse_buffer *
 dequeue_rx(struct altera_tse_private *priv)
 {
 	struct tse_buffer *buffer = NULL;
+
 	list_remove_head(&priv->rxlisthd, buffer, struct tse_buffer, lh);
 	return buffer;
 }
@@ -492,6 +491,7 @@ static struct tse_buffer *
 queue_rx_peekhead(struct altera_tse_private *priv)
 {
 	struct tse_buffer *buffer = NULL;
+
 	list_peek_head(&priv->rxlisthd, buffer, struct tse_buffer, lh);
 	return buffer;
 }
diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
index 1c8763be0e4b..6a1a004ea693 100644
--- a/drivers/net/ethernet/altera/altera_tse_main.c
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
@@ -258,14 +258,12 @@ static int alloc_init_skbufs(struct altera_tse_private *priv)
 	int i;

 	/* Create Rx ring buffer */
-	priv->rx_ring = kcalloc(rx_descs, sizeof(struct tse_buffer),
-				GFP_KERNEL);
+	priv->rx_ring = kcalloc(rx_descs, sizeof(struct tse_buffer), GFP_KERNEL);
 	if (!priv->rx_ring)
 		goto err_rx_ring;

 	/* Create Tx ring buffer */
-	priv->tx_ring = kcalloc(tx_descs, sizeof(struct tse_buffer),
-				GFP_KERNEL);
+	priv->tx_ring = kcalloc(tx_descs, sizeof(struct tse_buffer), GFP_KERNEL);
 	if (!priv->tx_ring)
 		goto err_tx_ring;

@@ -319,8 +317,7 @@ static inline void tse_rx_refill(struct altera_tse_private *priv)
 	unsigned int entry;
 	int ret;

-	for (; priv->rx_cons - priv->rx_prod > 0;
-			priv->rx_prod++) {
+	for (; priv->rx_cons - priv->rx_prod > 0; priv->rx_prod++) {
 		entry = priv->rx_prod % rxsize;
 		if (likely(priv->rx_ring[entry].skb == NULL)) {
 			ret = tse_init_rx_buffer(priv, &priv->rx_ring[entry],
--
2.26.2


  parent reply	other threads:[~2023-12-13  7:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13  7:11 [PATCH 0/5] Rename functions and their prototypes and move to common files deepakx.nagaraju
2023-12-13  7:11 ` [PATCH 1/5] net: ethernet: altera: remove unneeded assignments deepakx.nagaraju
2023-12-16 20:03   ` Simon Horman
2023-12-13  7:11 ` deepakx.nagaraju [this message]
2023-12-13  7:11 ` [PATCH 3/5] net: ethernet: altera: move read write functions deepakx.nagaraju
2023-12-16 20:03   ` Simon Horman
2023-12-13  7:11 ` [PATCH 4/5] net: ethernet: altera: sorting headers in alphabetical order deepakx.nagaraju
2023-12-14 19:06   ` Jakub Kicinski
2023-12-13  7:11 ` [PATCH 5/5] net: ethernet: altera: rename functions and their prototypes deepakx.nagaraju
2023-12-21 13:40   ` [PATCH v2 0/4] Rename functions and their prototypes and move to common files deepakx.nagaraju
2023-12-21 13:40     ` [PATCH v2 1/4] net: ethernet: altera: remove unneeded assignments deepakx.nagaraju
2023-12-21 13:40     ` [PATCH v2 2/4] net: ethernet: altera: fix indentation warnings deepakx.nagaraju
2023-12-23 14:57       ` Simon Horman
2023-12-21 13:40     ` [PATCH v2 3/4] net: ethernet: altera: move read write functions deepakx.nagaraju
2023-12-21 13:40     ` [PATCH v2 4/4] net: ethernet: altera: rename functions and their prototypes deepakx.nagaraju
2023-12-23 14:54       ` Simon Horman
2023-12-23 15:06       ` Simon Horman
2024-01-03 11:23   ` [PATCH 5/5] " Dan Carpenter

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=20231213071112.18242-3-deepakx.nagaraju@intel.com \
    --to=deepakx.nagaraju@intel.com \
    --cc=andriy.schevchenko@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=joyce.ooi@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®