mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Forest Bond <forest@alittletooquiet.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH v2 6/6] staging: vt6655: Remove macro PCAvDelayByIO
Date: Mon, 4 Apr 2022 22:49:04 +0200	[thread overview]
Message-ID: <af62ac8613e7c8ee236572d46137e8e202abf446.1649103348.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1649103348.git.philipp.g.hortmann@gmail.com>

Remove do-while(0) and CamelCase macro PCAvDelayByIO as
it is not accepted by checkpatch.pl
As the macro is just used once with a constant <= 50 the
functionality of the macro is implemented by using
udelay() directly.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
V1 -> V2: Changed converting macro to function to delete macro
          This patch was 7/7 and is now 6/6
---
 drivers/staging/vt6655/srom.c |  2 +-
 drivers/staging/vt6655/upc.h  | 13 -------------
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/staging/vt6655/srom.c b/drivers/staging/vt6655/srom.c
index 1612c9702e31..2719046f1ac0 100644
--- a/drivers/staging/vt6655/srom.c
+++ b/drivers/staging/vt6655/srom.c
@@ -80,7 +80,7 @@ unsigned char SROMbyReadEmbedded(void __iomem *iobase,
 			VNS_IN_PORTB(iobase + MAC_REG_I2MCSR, &byWait);
 			if (byWait & (I2MCSR_DONE | I2MCSR_NACK))
 				break;
-			PCAvDelayByIO(CB_DELAY_LOOP_WAIT);
+			udelay(CB_DELAY_LOOP_WAIT);
 		}
 		if ((wDelay < W_MAX_TIMEOUT) &&
 		    (!(byWait & I2MCSR_NACK))) {
diff --git a/drivers/staging/vt6655/upc.h b/drivers/staging/vt6655/upc.h
index 7d5075ec3162..05e0cf2e7d97 100644
--- a/drivers/staging/vt6655/upc.h
+++ b/drivers/staging/vt6655/upc.h
@@ -38,19 +38,6 @@
 #define VNS_OUT_PORTD(io_address, data) \
 	iowrite32((u32)(data), io_address)
 
-#define PCAvDelayByIO(u_delay_unit)				\
-do {								\
-	unsigned char __maybe_unused data;			\
-	unsigned long ii;					\
-								\
-	if (u_delay_unit <= 50) {					\
-		udelay(u_delay_unit);				\
-	} else {						\
-		for (ii = 0; ii < (u_delay_unit); ii++)		\
-			data = inb(0x61);			\
-	}							\
-} while (0)
-
 /*---------------------  Export Classes  ----------------------------*/
 
 /*---------------------  Export Variables  --------------------------*/
-- 
2.25.1


      parent reply	other threads:[~2022-04-04 22:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 20:48 [PATCH v2 0/6] staging: vt6655: Fix CamelCase in upc.h and started in mac.h Philipp Hortmann
2022-04-04 20:48 ` [PATCH v2 1/6] staging: vt6655: Remove unused macros " Philipp Hortmann
2022-04-04 20:48 ` [PATCH v2 2/6] staging: vt6655: Rename constant definitions with CamelCase Philipp Hortmann
2022-04-04 20:48 ` [PATCH v2 3/6] staging: vt6655: Rename macro arguments " Philipp Hortmann
2022-04-05 14:09   ` Greg Kroah-Hartman
2022-04-04 20:48 ` [PATCH v2 4/6] staging: vt6655: Rename macros VNSvInPortB,W,D Philipp Hortmann
2022-04-04 20:48 ` [PATCH v2 5/6] staging: vt6655: Rename macros VNSvOutPortB,W,D Philipp Hortmann
2022-04-04 20:49 ` Philipp Hortmann [this message]

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=af62ac8613e7c8ee236572d46137e8e202abf446.1649103348.git.philipp.g.hortmann@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=forest@alittletooquiet.net \
    --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

all inboxes | Powered by JetHome®