public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Correct CamelCase drivers/staging/gpib
@ 2025-03-19 21:18 Michael Rubin
  2025-03-19 21:18 ` [PATCH v1 1/2] staging: gpib: Correct CamelCase for BUS constants Michael Rubin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Rubin @ 2025-03-19 21:18 UTC (permalink / raw)
  To: Dave Penkler, Greg Kroah-Hartman
  Cc: linux-staging, linux-kernel, Michael Rubin

staging: gpib: Correct CamelCase and remove duplicate entries for bus control
lines.

Adhere to Linux kernel coding style.

Reported by checkpatch

CHECK: Avoid CamelCase

* Patch 1: "staging: gpib: Correct CamelCase for BUS constants"
  * Removes duplicate entries and corrcts Bus with BUS

* Patch 2: "staging: gpib: Correct CamelCase for VALID enums"
  * Replaces Valid with VALID

[PATCH v1 01/02] staging: gpib: Correct CamelCase for BUS constants
[PATCH v1 02/02] staging: gpib: Correct CamelCase for VALID enums

Michael Rubin (2):
 .../gpib/agilent_82357a/agilent_82357a.c      | 18 ++++++------
 drivers/staging/gpib/cb7210/cb7210.c          | 18 ++++++------
 drivers/staging/gpib/common/iblib.c           |  8 ++---
 drivers/staging/gpib/eastwood/fluke_gpib.c    | 18 ++++++------
 drivers/staging/gpib/fmh_gpib/fmh_gpib.c      | 18 ++++++------
 drivers/staging/gpib/gpio/gpib_bitbang.c      | 18 ++++++------
 drivers/staging/gpib/hp_82341/hp_82341.c      |  2 +-
 drivers/staging/gpib/ines/ines_gpib.c         | 18 ++++++------
 .../gpib/lpvo_usb_gpib/lpvo_usb_gpib.c        | 18 ++++++------
 drivers/staging/gpib/ni_usb/ni_usb_gpib.c     | 18 ++++++------
 drivers/staging/gpib/tms9914/tms9914.c        | 18 ++++++------
 drivers/staging/gpib/tnt4882/tnt4882_gpib.c   | 18 ++++++------
 drivers/staging/gpib/uapi/gpib_user.h         | 29 ++++++-------------
 13 files changed, 104 insertions(+), 115 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 1/2] staging: gpib: Correct CamelCase for BUS constants
  2025-03-19 21:18 [PATCH v1 0/2] Correct CamelCase drivers/staging/gpib Michael Rubin
@ 2025-03-19 21:18 ` Michael Rubin
  2025-03-19 21:18 ` [PATCH v1 2/2] staging: gpib: Correct CamelCase for VALID enums Michael Rubin
  2025-03-20  8:16 ` [PATCH v1 0/2] Correct CamelCase drivers/staging/gpib Dave Penkler
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Rubin @ 2025-03-19 21:18 UTC (permalink / raw)
  To: Dave Penkler, Greg Kroah-Hartman
  Cc: linux-staging, linux-kernel, Michael Rubin

Adhere to Linux kernel coding style and remove duplicate enums.

Reported by checkpatch

CHECK: Avoid CamelCase

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 .../staging/gpib/agilent_82357a/agilent_82357a.c | 16 ++++++++--------
 drivers/staging/gpib/cb7210/cb7210.c             | 16 ++++++++--------
 drivers/staging/gpib/common/iblib.c              |  4 ++--
 drivers/staging/gpib/eastwood/fluke_gpib.c       | 16 ++++++++--------
 drivers/staging/gpib/fmh_gpib/fmh_gpib.c         | 16 ++++++++--------
 drivers/staging/gpib/gpio/gpib_bitbang.c         | 16 ++++++++--------
 drivers/staging/gpib/hp_82341/hp_82341.c         |  2 +-
 drivers/staging/gpib/ines/ines_gpib.c            | 16 ++++++++--------
 .../staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c   | 16 ++++++++--------
 drivers/staging/gpib/ni_usb/ni_usb_gpib.c        | 16 ++++++++--------
 drivers/staging/gpib/tms9914/tms9914.c           | 16 ++++++++--------
 drivers/staging/gpib/tnt4882/tnt4882_gpib.c      | 16 ++++++++--------
 drivers/staging/gpib/uapi/gpib_user.h            | 11 -----------
 13 files changed, 83 insertions(+), 94 deletions(-)

diff --git a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
index 7ebebe00dc48..7d660e558fbe 100644
--- a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
+++ b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
@@ -988,21 +988,21 @@ static int agilent_82357a_line_status(const gpib_board_t *board)
 		return retval;
 	}
 	if (bus_status.value & BSR_REN_BIT)
-		status |= BusREN;
+		status |= BUS_REN;
 	if (bus_status.value & BSR_IFC_BIT)
-		status |= BusIFC;
+		status |= BUS_IFC;
 	if (bus_status.value & BSR_SRQ_BIT)
-		status |= BusSRQ;
+		status |= BUS_SRQ;
 	if (bus_status.value & BSR_EOI_BIT)
-		status |= BusEOI;
+		status |= BUS_EOI;
 	if (bus_status.value & BSR_NRFD_BIT)
-		status |= BusNRFD;
+		status |= BUS_NRFD;
 	if (bus_status.value & BSR_NDAC_BIT)
-		status |= BusNDAC;
+		status |= BUS_NDAC;
 	if (bus_status.value & BSR_DAV_BIT)
-		status |= BusDAV;
+		status |= BUS_DAV;
 	if (bus_status.value & BSR_ATN_BIT)
-		status |= BusATN;
+		status |= BUS_ATN;
 	return status;
 }
 
diff --git a/drivers/staging/gpib/cb7210/cb7210.c b/drivers/staging/gpib/cb7210/cb7210.c
index 19dfd8b4a8e7..ba02dce62dd9 100644
--- a/drivers/staging/gpib/cb7210/cb7210.c
+++ b/drivers/staging/gpib/cb7210/cb7210.c
@@ -388,21 +388,21 @@ static int cb7210_line_status(const gpib_board_t *board)
 	bsr_bits = cb7210_paged_read_byte(cb_priv, BUS_STATUS, BUS_STATUS_PAGE);
 
 	if ((bsr_bits & BSR_REN_BIT) == 0)
-		status |= BusREN;
+		status |= BUS_REN;
 	if ((bsr_bits & BSR_IFC_BIT) == 0)
-		status |= BusIFC;
+		status |= BUS_IFC;
 	if ((bsr_bits & BSR_SRQ_BIT) == 0)
-		status |= BusSRQ;
+		status |= BUS_SRQ;
 	if ((bsr_bits & BSR_EOI_BIT) == 0)
-		status |= BusEOI;
+		status |= BUS_EOI;
 	if ((bsr_bits & BSR_NRFD_BIT) == 0)
-		status |= BusNRFD;
+		status |= BUS_NRFD;
 	if ((bsr_bits & BSR_NDAC_BIT) == 0)
-		status |= BusNDAC;
+		status |= BUS_NDAC;
 	if ((bsr_bits & BSR_DAV_BIT) == 0)
-		status |= BusDAV;
+		status |= BUS_DAV;
 	if ((bsr_bits & BSR_ATN_BIT) == 0)
-		status |= BusATN;
+		status |= BUS_ATN;
 
 	return status;
 }
diff --git a/drivers/staging/gpib/common/iblib.c b/drivers/staging/gpib/common/iblib.c
index fd2874c2fff4..1caa57b41596 100644
--- a/drivers/staging/gpib/common/iblib.c
+++ b/drivers/staging/gpib/common/iblib.c
@@ -77,7 +77,7 @@ static int check_for_command_acceptors(gpib_board_t *board)
 		return lines;
 
 	if ((lines & ValidNRFD) && (lines & ValidNDAC))	{
-		if ((lines & BusNRFD) == 0 && (lines & BusNDAC) == 0)
+		if ((lines & BUS_NRFD) == 0 && (lines & BUS_NDAC) == 0)
 			return -ENOTCONN;
 	}
 
@@ -521,7 +521,7 @@ int general_ibstatus(gpib_board_t *board, const gpib_status_queue_t *device,
 		/* get real SRQI status if we can */
 		if (iblines(board, &line_status) == 0) {
 			if ((line_status & ValidSRQ)) {
-				if ((line_status & BusSRQ))
+				if ((line_status & BUS_SRQ))
 					status |= SRQI;
 				else
 					status &= ~SRQI;
diff --git a/drivers/staging/gpib/eastwood/fluke_gpib.c b/drivers/staging/gpib/eastwood/fluke_gpib.c
index 731732bd8301..4e04acfdb48d 100644
--- a/drivers/staging/gpib/eastwood/fluke_gpib.c
+++ b/drivers/staging/gpib/eastwood/fluke_gpib.c
@@ -204,21 +204,21 @@ static int fluke_line_status(const gpib_board_t *board)
 	bsr_bits = fluke_paged_read_byte(e_priv, BUS_STATUS, BUS_STATUS_PAGE);
 
 	if ((bsr_bits & BSR_REN_BIT) == 0)
-		status |= BusREN;
+		status |= BUS_REN;
 	if ((bsr_bits & BSR_IFC_BIT) == 0)
-		status |= BusIFC;
+		status |= BUS_IFC;
 	if ((bsr_bits & BSR_SRQ_BIT) == 0)
-		status |= BusSRQ;
+		status |= BUS_SRQ;
 	if ((bsr_bits & BSR_EOI_BIT) == 0)
-		status |= BusEOI;
+		status |= BUS_EOI;
 	if ((bsr_bits & BSR_NRFD_BIT) == 0)
-		status |= BusNRFD;
+		status |= BUS_NRFD;
 	if ((bsr_bits & BSR_NDAC_BIT) == 0)
-		status |= BusNDAC;
+		status |= BUS_NDAC;
 	if ((bsr_bits & BSR_DAV_BIT) == 0)
-		status |= BusDAV;
+		status |= BUS_DAV;
 	if ((bsr_bits & BSR_ATN_BIT) == 0)
-		status |= BusATN;
+		status |= BUS_ATN;
 
 	return status;
 }
diff --git a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
index d62c83368518..8fbfa7e285af 100644
--- a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
+++ b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
@@ -240,21 +240,21 @@ static int fmh_gpib_line_status(const gpib_board_t *board)
 	bsr_bits = read_byte(nec_priv, BUS_STATUS_REG);
 
 	if ((bsr_bits & BSR_REN_BIT) == 0)
-		status |= BusREN;
+		status |= BUS_REN;
 	if ((bsr_bits & BSR_IFC_BIT) == 0)
-		status |= BusIFC;
+		status |= BUS_IFC;
 	if ((bsr_bits & BSR_SRQ_BIT) == 0)
-		status |= BusSRQ;
+		status |= BUS_SRQ;
 	if ((bsr_bits & BSR_EOI_BIT) == 0)
-		status |= BusEOI;
+		status |= BUS_EOI;
 	if ((bsr_bits & BSR_NRFD_BIT) == 0)
-		status |= BusNRFD;
+		status |= BUS_NRFD;
 	if ((bsr_bits & BSR_NDAC_BIT) == 0)
-		status |= BusNDAC;
+		status |= BUS_NDAC;
 	if ((bsr_bits & BSR_DAV_BIT) == 0)
-		status |= BusDAV;
+		status |= BUS_DAV;
 	if ((bsr_bits & BSR_ATN_BIT) == 0)
-		status |= BusATN;
+		status |= BUS_ATN;
 
 	return status;
 }
diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpib/gpio/gpib_bitbang.c
index 2012db188f58..004bf0e9bc88 100644
--- a/drivers/staging/gpib/gpio/gpib_bitbang.c
+++ b/drivers/staging/gpib/gpio/gpib_bitbang.c
@@ -1034,21 +1034,21 @@ static int bb_line_status(const gpib_board_t *board)
 	int line_status = ValidALL;
 
 	if (gpiod_get_value(REN) == 0)
-		line_status |= BusREN;
+		line_status |= BUS_REN;
 	if (gpiod_get_value(IFC) == 0)
-		line_status |= BusIFC;
+		line_status |= BUS_IFC;
 	if (gpiod_get_value(NDAC) == 0)
-		line_status |= BusNDAC;
+		line_status |= BUS_NDAC;
 	if (gpiod_get_value(NRFD) == 0)
-		line_status |= BusNRFD;
+		line_status |= BUS_NRFD;
 	if (gpiod_get_value(DAV) == 0)
-		line_status |= BusDAV;
+		line_status |= BUS_DAV;
 	if (gpiod_get_value(EOI) == 0)
-		line_status |= BusEOI;
+		line_status |= BUS_EOI;
 	if (gpiod_get_value(_ATN) == 0)
-		line_status |= BusATN;
+		line_status |= BUS_ATN;
 	if (gpiod_get_value(SRQ) == 0)
-		line_status |= BusSRQ;
+		line_status |= BUS_SRQ;
 
 	dbg_printk(2, "status lines: %4x\n", line_status);
 
diff --git a/drivers/staging/gpib/hp_82341/hp_82341.c b/drivers/staging/gpib/hp_82341/hp_82341.c
index 91fbaf953bcd..b5d79ae519e7 100644
--- a/drivers/staging/gpib/hp_82341/hp_82341.c
+++ b/drivers/staging/gpib/hp_82341/hp_82341.c
@@ -158,7 +158,7 @@ static int restart_write_fifo(gpib_board_t *board, struct hp_82341_priv *hp_priv
 
 		//restart doesn't work if data holdoff is in effect
 		status = tms9914_line_status(board, tms_priv);
-		if ((status & BusNRFD) == 0) {
+		if ((status & BUS_NRFD) == 0) {
 			outb(RESTART_STREAM_BIT, hp_priv->iobase[0] + STREAM_STATUS_REG);
 			return 0;
 		}
diff --git a/drivers/staging/gpib/ines/ines_gpib.c b/drivers/staging/gpib/ines/ines_gpib.c
index 56da6cd91188..c5c34845fc38 100644
--- a/drivers/staging/gpib/ines/ines_gpib.c
+++ b/drivers/staging/gpib/ines/ines_gpib.c
@@ -36,21 +36,21 @@ int ines_line_status(const gpib_board_t *board)
 	bcm_bits = ines_inb(ines_priv, BUS_CONTROL_MONITOR);
 
 	if (bcm_bits & BCM_REN_BIT)
-		status |= BusREN;
+		status |= BUS_REN;
 	if (bcm_bits & BCM_IFC_BIT)
-		status |= BusIFC;
+		status |= BUS_IFC;
 	if (bcm_bits & BCM_SRQ_BIT)
-		status |= BusSRQ;
+		status |= BUS_SRQ;
 	if (bcm_bits & BCM_EOI_BIT)
-		status |= BusEOI;
+		status |= BUS_EOI;
 	if (bcm_bits & BCM_NRFD_BIT)
-		status |= BusNRFD;
+		status |= BUS_NRFD;
 	if (bcm_bits & BCM_NDAC_BIT)
-		status |= BusNDAC;
+		status |= BUS_NDAC;
 	if (bcm_bits & BCM_DAV_BIT)
-		status |= BusDAV;
+		status |= BUS_DAV;
 	if (bcm_bits & BCM_ATN_BIT)
-		status |= BusATN;
+		status |= BUS_ATN;
 
 	return status;
 }
diff --git a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
index 50faa0c17617..2775dc83305e 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -694,21 +694,21 @@ static int usb_gpib_line_status(const gpib_board_t *board)
 	}
 
 	if ((buffer & 0x01) == 0)
-		line_status |= BusREN;
+		line_status |= BUS_REN;
 	if ((buffer & 0x02) == 0)
-		line_status |= BusIFC;
+		line_status |= BUS_IFC;
 	if ((buffer & 0x04) == 0)
-		line_status |= BusNDAC;
+		line_status |= BUS_NDAC;
 	if ((buffer & 0x08) == 0)
-		line_status |= BusNRFD;
+		line_status |= BUS_NRFD;
 	if ((buffer & 0x10) == 0)
-		line_status |= BusDAV;
+		line_status |= BUS_DAV;
 	if ((buffer & 0x20) == 0)
-		line_status |= BusEOI;
+		line_status |= BUS_EOI;
 	if ((buffer & 0x40) == 0)
-		line_status |= BusATN;
+		line_status |= BUS_ATN;
 	if ((buffer & 0x80) == 0)
-		line_status |= BusSRQ;
+		line_status |= BUS_SRQ;
 
 	DIA_LOG(1, "done with %x %x\n", buffer, line_status);
 
diff --git a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
index 61b15b19e134..7243d361f173 100644
--- a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
+++ b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
@@ -1511,21 +1511,21 @@ static int ni_usb_line_status(const gpib_board_t *board)
 	ni_usb_parse_register_read_block(in_data, &bsr_bits, 1);
 	kfree(in_data);
 	if (bsr_bits & BCSR_REN_BIT)
-		line_status |= BusREN;
+		line_status |= BUS_REN;
 	if (bsr_bits & BCSR_IFC_BIT)
-		line_status |= BusIFC;
+		line_status |= BUS_IFC;
 	if (bsr_bits & BCSR_SRQ_BIT)
-		line_status |= BusSRQ;
+		line_status |= BUS_SRQ;
 	if (bsr_bits & BCSR_EOI_BIT)
-		line_status |= BusEOI;
+		line_status |= BUS_EOI;
 	if (bsr_bits & BCSR_NRFD_BIT)
-		line_status |= BusNRFD;
+		line_status |= BUS_NRFD;
 	if (bsr_bits & BCSR_NDAC_BIT)
-		line_status |= BusNDAC;
+		line_status |= BUS_NDAC;
 	if (bsr_bits & BCSR_DAV_BIT)
-		line_status |= BusDAV;
+		line_status |= BUS_DAV;
 	if (bsr_bits & BCSR_ATN_BIT)
-		line_status |= BusATN;
+		line_status |= BUS_ATN;
 	return line_status;
 }
 
diff --git a/drivers/staging/gpib/tms9914/tms9914.c b/drivers/staging/gpib/tms9914/tms9914.c
index 1f2bb163cfb5..17adeccf448b 100644
--- a/drivers/staging/gpib/tms9914/tms9914.c
+++ b/drivers/staging/gpib/tms9914/tms9914.c
@@ -396,21 +396,21 @@ int tms9914_line_status(const gpib_board_t *board, struct tms9914_priv *priv)
 	bsr_bits = read_byte(priv, BSR);
 
 	if (bsr_bits & BSR_REN_BIT)
-		status |= BusREN;
+		status |= BUS_REN;
 	if (bsr_bits & BSR_IFC_BIT)
-		status |= BusIFC;
+		status |= BUS_IFC;
 	if (bsr_bits & BSR_SRQ_BIT)
-		status |= BusSRQ;
+		status |= BUS_SRQ;
 	if (bsr_bits & BSR_EOI_BIT)
-		status |= BusEOI;
+		status |= BUS_EOI;
 	if (bsr_bits & BSR_NRFD_BIT)
-		status |= BusNRFD;
+		status |= BUS_NRFD;
 	if (bsr_bits & BSR_NDAC_BIT)
-		status |= BusNDAC;
+		status |= BUS_NDAC;
 	if (bsr_bits & BSR_DAV_BIT)
-		status |= BusDAV;
+		status |= BUS_DAV;
 	if (bsr_bits & BSR_ATN_BIT)
-		status |= BusATN;
+		status |= BUS_ATN;
 
 	return status;
 }
diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
index d32420dee5e5..76fd9422809c 100644
--- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
+++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
@@ -159,21 +159,21 @@ static int tnt4882_line_status(const gpib_board_t *board)
 	bcsr_bits = tnt_readb(tnt_priv, BSR);
 
 	if (bcsr_bits & BCSR_REN_BIT)
-		status |= BusREN;
+		status |= BUS_REN;
 	if (bcsr_bits & BCSR_IFC_BIT)
-		status |= BusIFC;
+		status |= BUS_IFC;
 	if (bcsr_bits & BCSR_SRQ_BIT)
-		status |= BusSRQ;
+		status |= BUS_SRQ;
 	if (bcsr_bits & BCSR_EOI_BIT)
-		status |= BusEOI;
+		status |= BUS_EOI;
 	if (bcsr_bits & BCSR_NRFD_BIT)
-		status |= BusNRFD;
+		status |= BUS_NRFD;
 	if (bcsr_bits & BCSR_NDAC_BIT)
-		status |= BusNDAC;
+		status |= BUS_NDAC;
 	if (bcsr_bits & BCSR_DAV_BIT)
-		status |= BusDAV;
+		status |= BUS_DAV;
 	if (bcsr_bits & BCSR_ATN_BIT)
-		status |= BusATN;
+		status |= BUS_ATN;
 
 	return status;
 }
diff --git a/drivers/staging/gpib/uapi/gpib_user.h b/drivers/staging/gpib/uapi/gpib_user.h
index 0896a55a758f..2d742540630a 100644
--- a/drivers/staging/gpib/uapi/gpib_user.h
+++ b/drivers/staging/gpib/uapi/gpib_user.h
@@ -115,17 +115,6 @@ enum bus_control_line {
 	ValidATN = 0x40,
 	ValidEOI = 0x80,
 	ValidALL = 0xff,
-	BusDAV = 0x0100,		/* DAV	line status bit */
-	BusNDAC = 0x0200,		/* NDAC line status bit */
-	BusNRFD = 0x0400,		/* NRFD line status bit */
-	BusIFC = 0x0800,		/* IFC	line status bit */
-	BusREN = 0x1000,		/* REN	line status bit */
-	BusSRQ = 0x2000,		/* SRQ	line status bit */
-	BusATN = 0x4000,		/* ATN	line status bit */
-	BusEOI = 0x8000		/* EOI	line status bit */
-};
-
-enum old_bus_control_line {
 	BUS_DAV = 0x0100,		/* DAV	line status bit */
 	BUS_NDAC = 0x0200,		/* NDAC line status bit */
 	BUS_NRFD = 0x0400,		/* NRFD line status bit */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v1 2/2] staging: gpib: Correct CamelCase for VALID enums
  2025-03-19 21:18 [PATCH v1 0/2] Correct CamelCase drivers/staging/gpib Michael Rubin
  2025-03-19 21:18 ` [PATCH v1 1/2] staging: gpib: Correct CamelCase for BUS constants Michael Rubin
@ 2025-03-19 21:18 ` Michael Rubin
  2025-03-20  8:16 ` [PATCH v1 0/2] Correct CamelCase drivers/staging/gpib Dave Penkler
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Rubin @ 2025-03-19 21:18 UTC (permalink / raw)
  To: Dave Penkler, Greg Kroah-Hartman
  Cc: linux-staging, linux-kernel, Michael Rubin

Adhere to Linux kernel coding style.

Reported by checkpatch

CHECK: Avoid CamelCase

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 .../gpib/agilent_82357a/agilent_82357a.c       |  2 +-
 drivers/staging/gpib/cb7210/cb7210.c           |  2 +-
 drivers/staging/gpib/common/iblib.c            |  4 ++--
 drivers/staging/gpib/eastwood/fluke_gpib.c     |  2 +-
 drivers/staging/gpib/fmh_gpib/fmh_gpib.c       |  2 +-
 drivers/staging/gpib/gpio/gpib_bitbang.c       |  2 +-
 drivers/staging/gpib/ines/ines_gpib.c          |  2 +-
 .../staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c |  2 +-
 drivers/staging/gpib/ni_usb/ni_usb_gpib.c      |  2 +-
 drivers/staging/gpib/tms9914/tms9914.c         |  2 +-
 drivers/staging/gpib/tnt4882/tnt4882_gpib.c    |  2 +-
 drivers/staging/gpib/uapi/gpib_user.h          | 18 +++++++++---------
 12 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
index 7d660e558fbe..5b5b55e90435 100644
--- a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
+++ b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
@@ -978,7 +978,7 @@ static int agilent_82357a_line_status(const gpib_board_t *board)
 	struct usb_device *usb_dev = interface_to_usbdev(a_priv->bus_interface);
 	struct agilent_82357a_register_pairlet bus_status;
 	int retval;
-	int status = ValidALL;
+	int status = VALID_ALL;
 
 	bus_status.address = BSR;
 	retval = agilent_82357a_read_registers(a_priv, &bus_status, 1, 0);
diff --git a/drivers/staging/gpib/cb7210/cb7210.c b/drivers/staging/gpib/cb7210/cb7210.c
index ba02dce62dd9..808e0a71dfd6 100644
--- a/drivers/staging/gpib/cb7210/cb7210.c
+++ b/drivers/staging/gpib/cb7210/cb7210.c
@@ -379,7 +379,7 @@ static int cb7210_accel_write(gpib_board_t *board, uint8_t *buffer, size_t lengt
 
 static int cb7210_line_status(const gpib_board_t *board)
 {
-	int status = ValidALL;
+	int status = VALID_ALL;
 	int bsr_bits;
 	struct cb7210_priv *cb_priv;
 
diff --git a/drivers/staging/gpib/common/iblib.c b/drivers/staging/gpib/common/iblib.c
index 1caa57b41596..92e792e12301 100644
--- a/drivers/staging/gpib/common/iblib.c
+++ b/drivers/staging/gpib/common/iblib.c
@@ -76,7 +76,7 @@ static int check_for_command_acceptors(gpib_board_t *board)
 	if (lines < 0)
 		return lines;
 
-	if ((lines & ValidNRFD) && (lines & ValidNDAC))	{
+	if ((lines & VALID_NRFD) && (lines & VALID_NDAC))	{
 		if ((lines & BUS_NRFD) == 0 && (lines & BUS_NDAC) == 0)
 			return -ENOTCONN;
 	}
@@ -520,7 +520,7 @@ int general_ibstatus(gpib_board_t *board, const gpib_status_queue_t *device,
 		status &= ~TIMO;
 		/* get real SRQI status if we can */
 		if (iblines(board, &line_status) == 0) {
-			if ((line_status & ValidSRQ)) {
+			if ((line_status & VALID_SRQ)) {
 				if ((line_status & BUS_SRQ))
 					status |= SRQI;
 				else
diff --git a/drivers/staging/gpib/eastwood/fluke_gpib.c b/drivers/staging/gpib/eastwood/fluke_gpib.c
index 4e04acfdb48d..bcddf3125b8c 100644
--- a/drivers/staging/gpib/eastwood/fluke_gpib.c
+++ b/drivers/staging/gpib/eastwood/fluke_gpib.c
@@ -195,7 +195,7 @@ static void fluke_return_to_local(gpib_board_t *board)
 
 static int fluke_line_status(const gpib_board_t *board)
 {
-	int status = ValidALL;
+	int status = VALID_ALL;
 	int bsr_bits;
 	struct fluke_priv *e_priv;
 
diff --git a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
index 8fbfa7e285af..3e8ad8aa332f 100644
--- a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
+++ b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
@@ -229,7 +229,7 @@ static void fmh_gpib_return_to_local(gpib_board_t *board)
 
 static int fmh_gpib_line_status(const gpib_board_t *board)
 {
-	int status = ValidALL;
+	int status = VALID_ALL;
 	int bsr_bits;
 	struct fmh_priv *e_priv;
 	struct nec7210_priv *nec_priv;
diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpib/gpio/gpib_bitbang.c
index 004bf0e9bc88..28c5fa9b81ab 100644
--- a/drivers/staging/gpib/gpio/gpib_bitbang.c
+++ b/drivers/staging/gpib/gpio/gpib_bitbang.c
@@ -1031,7 +1031,7 @@ static void bb_return_to_local(gpib_board_t *board)
 
 static int bb_line_status(const gpib_board_t *board)
 {
-	int line_status = ValidALL;
+	int line_status = VALID_ALL;
 
 	if (gpiod_get_value(REN) == 0)
 		line_status |= BUS_REN;
diff --git a/drivers/staging/gpib/ines/ines_gpib.c b/drivers/staging/gpib/ines/ines_gpib.c
index c5c34845fc38..d31eab1a05e4 100644
--- a/drivers/staging/gpib/ines/ines_gpib.c
+++ b/drivers/staging/gpib/ines/ines_gpib.c
@@ -27,7 +27,7 @@ MODULE_DESCRIPTION("GPIB driver for Ines iGPIB 72010");
 
 int ines_line_status(const gpib_board_t *board)
 {
-	int status = ValidALL;
+	int status = VALID_ALL;
 	int bcm_bits;
 	struct ines_priv *ines_priv;
 
diff --git a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
index 2775dc83305e..011096ece7d6 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -658,7 +658,7 @@ static void usb_gpib_interface_clear(gpib_board_t *board, int assert)
 static int usb_gpib_line_status(const gpib_board_t *board)
 {
 	int buffer;
-	int line_status = ValidALL;   /* all lines will be read */
+	int line_status = VALID_ALL;   /* all lines will be read */
 	struct list_head *p, *q;
 	WQT *item;
 	unsigned long flags;
diff --git a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
index 7243d361f173..1f72abe9f2e4 100644
--- a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
+++ b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
@@ -1461,7 +1461,7 @@ static int ni_usb_line_status(const gpib_board_t *board)
 	int bytes_written = 0, bytes_read = 0;
 	int i = 0;
 	unsigned int bsr_bits;
-	int line_status = ValidALL;
+	int line_status = VALID_ALL;
 	// NI windows driver reads 0xd(HSSEL), 0xc (ARD0), 0x1f (BSR)
 
 	out_data = kmalloc(out_data_length, GFP_KERNEL);
diff --git a/drivers/staging/gpib/tms9914/tms9914.c b/drivers/staging/gpib/tms9914/tms9914.c
index 17adeccf448b..c563fcab44fc 100644
--- a/drivers/staging/gpib/tms9914/tms9914.c
+++ b/drivers/staging/gpib/tms9914/tms9914.c
@@ -391,7 +391,7 @@ static unsigned int update_status_nolock(gpib_board_t *board, struct tms9914_pri
 int tms9914_line_status(const gpib_board_t *board, struct tms9914_priv *priv)
 {
 	int bsr_bits;
-	int status = ValidALL;
+	int status = VALID_ALL;
 
 	bsr_bits = read_byte(priv, BSR);
 
diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
index 76fd9422809c..e62f3424ca20 100644
--- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
+++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
@@ -150,7 +150,7 @@ MODULE_DESCRIPTION("GPIB driver for National Instruments boards using tnt4882 or
 
 static int tnt4882_line_status(const gpib_board_t *board)
 {
-	int status = ValidALL;
+	int status = VALID_ALL;
 	int bcsr_bits;
 	struct tnt4882_priv *tnt_priv;
 
diff --git a/drivers/staging/gpib/uapi/gpib_user.h b/drivers/staging/gpib/uapi/gpib_user.h
index 2d742540630a..5ff4588686fd 100644
--- a/drivers/staging/gpib/uapi/gpib_user.h
+++ b/drivers/staging/gpib/uapi/gpib_user.h
@@ -106,15 +106,15 @@ enum eos_flags {
 
 /* GPIB Bus Control Lines bit vector */
 enum bus_control_line {
-	ValidDAV = 0x01,
-	ValidNDAC = 0x02,
-	ValidNRFD = 0x04,
-	ValidIFC = 0x08,
-	ValidREN = 0x10,
-	ValidSRQ = 0x20,
-	ValidATN = 0x40,
-	ValidEOI = 0x80,
-	ValidALL = 0xff,
+	VALID_DAV = 0x01,
+	VALID_NDAC = 0x02,
+	VALID_NRFD = 0x04,
+	VALID_IFC = 0x08,
+	VALID_REN = 0x10,
+	VALID_SRQ = 0x20,
+	VALID_ATN = 0x40,
+	VALID_EOI = 0x80,
+	VALID_ALL = 0xff,
 	BUS_DAV = 0x0100,		/* DAV	line status bit */
 	BUS_NDAC = 0x0200,		/* NDAC line status bit */
 	BUS_NRFD = 0x0400,		/* NRFD line status bit */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 0/2] Correct CamelCase drivers/staging/gpib
  2025-03-19 21:18 [PATCH v1 0/2] Correct CamelCase drivers/staging/gpib Michael Rubin
  2025-03-19 21:18 ` [PATCH v1 1/2] staging: gpib: Correct CamelCase for BUS constants Michael Rubin
  2025-03-19 21:18 ` [PATCH v1 2/2] staging: gpib: Correct CamelCase for VALID enums Michael Rubin
@ 2025-03-20  8:16 ` Dave Penkler
  2 siblings, 0 replies; 4+ messages in thread
From: Dave Penkler @ 2025-03-20  8:16 UTC (permalink / raw)
  To: Michael Rubin; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel

On Wed, Mar 19, 2025 at 09:18:25PM +0000, Michael Rubin wrote:
> staging: gpib: Correct CamelCase and remove duplicate entries for bus control
> lines.
> 
> Adhere to Linux kernel coding style.
> 
> Reported by checkpatch
> 
> CHECK: Avoid CamelCase
> 
> * Patch 1: "staging: gpib: Correct CamelCase for BUS constants"
>   * Removes duplicate entries and corrcts Bus with BUS
> 
> * Patch 2: "staging: gpib: Correct CamelCase for VALID enums"
>   * Replaces Valid with VALID
> 
> [PATCH v1 01/02] staging: gpib: Correct CamelCase for BUS constants
> [PATCH v1 02/02] staging: gpib: Correct CamelCase for VALID enums
> 
> Michael Rubin (2):
>  .../gpib/agilent_82357a/agilent_82357a.c      | 18 ++++++------
>  drivers/staging/gpib/cb7210/cb7210.c          | 18 ++++++------
>  drivers/staging/gpib/common/iblib.c           |  8 ++---
>  drivers/staging/gpib/eastwood/fluke_gpib.c    | 18 ++++++------
>  drivers/staging/gpib/fmh_gpib/fmh_gpib.c      | 18 ++++++------
>  drivers/staging/gpib/gpio/gpib_bitbang.c      | 18 ++++++------
>  drivers/staging/gpib/hp_82341/hp_82341.c      |  2 +-
>  drivers/staging/gpib/ines/ines_gpib.c         | 18 ++++++------
>  .../gpib/lpvo_usb_gpib/lpvo_usb_gpib.c        | 18 ++++++------
>  drivers/staging/gpib/ni_usb/ni_usb_gpib.c     | 18 ++++++------
>  drivers/staging/gpib/tms9914/tms9914.c        | 18 ++++++------
>  drivers/staging/gpib/tnt4882/tnt4882_gpib.c   | 18 ++++++------
>  drivers/staging/gpib/uapi/gpib_user.h         | 29 ++++++-------------
>  13 files changed, 104 insertions(+), 115 deletions(-)
> 
> -- 
> 2.43.0
> 
I will be releasing a new user part and will make a compat include there.
Acked-By: Dave Penkler <dpenkler@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-20  8:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19 21:18 [PATCH v1 0/2] Correct CamelCase drivers/staging/gpib Michael Rubin
2025-03-19 21:18 ` [PATCH v1 1/2] staging: gpib: Correct CamelCase for BUS constants Michael Rubin
2025-03-19 21:18 ` [PATCH v1 2/2] staging: gpib: Correct CamelCase for VALID enums Michael Rubin
2025-03-20  8:16 ` [PATCH v1 0/2] Correct CamelCase drivers/staging/gpib Dave Penkler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox