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 11/13] staging: vt6655: Convert macro vt6655_mac_word_reg_bits_on to function
Date: Wed, 13 Jul 2022 07:01:37 +0200	[thread overview]
Message-ID: <255c7f5a5e98a399aa4e299e7cf567016bd86d60.1657657918.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1657657918.git.philipp.g.hortmann@gmail.com>

Convert macro vt6655_mac_word_reg_bits_on to function.
checkpatch.pl does not accept multiline macros.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/vt6655/mac.c | 8 ++++++++
 drivers/staging/vt6655/mac.h | 8 +-------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
index 902034a28c6c..076e1bfff3e0 100644
--- a/drivers/staging/vt6655/mac.c
+++ b/drivers/staging/vt6655/mac.c
@@ -46,6 +46,14 @@ void vt6655_mac_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u8
 	iowrite8(reg_value | bit_mask, iobase + reg_offset);
 }
 
+void vt6655_mac_word_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u16 bit_mask)
+{
+	unsigned short reg_value;
+
+	reg_value = ioread16(iobase + reg_offset);
+	iowrite16(reg_value | (bit_mask), iobase + reg_offset);
+}
+
 /*
  * Description:
  *      Test if all test bits off
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index 031316d42dba..3b23334db538 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -537,13 +537,6 @@
 
 /*---------------------  Export Macros ------------------------------*/
 
-#define vt6655_mac_word_reg_bits_on(iobase, reg_offset, bit_mask)	\
-do {									\
-	unsigned short reg_value;					\
-	reg_value = ioread16(iobase + reg_offset);			\
-	iowrite16(reg_value | (bit_mask), iobase + reg_offset);		\
-} while (0)
-
 #define vt6655_mac_reg_bits_off(iobase, reg_offset, bit_mask)			\
 do {									\
 	unsigned char reg_value;					\
@@ -660,6 +653,7 @@ do {									\
 	((unsigned short)(((unsigned char)(lb)) | (((unsigned short)((unsigned char)(hb))) << 8)))
 
 void vt6655_mac_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u8 bit_mask);
+void vt6655_mac_word_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u16 bit_mask);
 bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs,
 		      unsigned char byTestBits);
 
-- 
2.37.0


  parent reply	other threads:[~2022-07-13  5:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13  4:58 [PATCH 00/13] staging: vt6655: Convert four macros to functions Philipp Hortmann
2022-07-13  4:58 ` [PATCH 01/13] staging: vt6655: Rename byRegOfs to reg_offset in four macros Philipp Hortmann
2022-07-13  4:59 ` [PATCH 02/13] staging: vt6655: Rename byBits to bit_mask in two macros Philipp Hortmann
2022-07-13  4:59 ` [PATCH 03/13] staging: vt6655: Rename wBits " Philipp Hortmann
2022-07-13  4:59 ` [PATCH 04/13] staging: vt6655: Rename byData to reg_value " Philipp Hortmann
2022-07-13  5:00 ` [PATCH 05/13] staging: vt6655: Rename wData " Philipp Hortmann
2022-07-13  5:00 ` [PATCH 07/13] staging: vt6655: Rename MACvWordRegBitsOn Philipp Hortmann
2022-07-13  5:00 ` [PATCH 06/13] staging: vt6655: Rename MACvRegBitsOn Philipp Hortmann
2022-07-13  5:00 ` [PATCH 09/13] staging: vt6655: Rename MACvWordRegBitsOff Philipp Hortmann
2022-07-13  5:01 ` [PATCH 08/13] staging: vt6655: Rename MACvRegBitsOff Philipp Hortmann
2022-07-13  5:01 ` [PATCH 10/13] staging: vt6655: Convert macro vt6655_mac_reg_bits_on to function Philipp Hortmann
2022-07-13  5:01 ` Philipp Hortmann [this message]
2022-07-13  5:02 ` [PATCH 12/13] staging: vt6655: Convert macro vt6655_mac_reg_bits_off " Philipp Hortmann
2022-07-13  5:02 ` [PATCH 13/13] staging: vt6655: Convert macro vt6655_mac_word_reg_bits_off " 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=255c7f5a5e98a399aa4e299e7cf567016bd86d60.1657657918.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®