public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: gpib: Clean and rename common include
@ 2025-04-18  9:31 Dave Penkler
  2025-04-18  9:31 ` [PATCH 1/2] staging: gpib: Remove unused enums from common include file Dave Penkler
  2025-04-18  9:31 ` [PATCH 2/2] staging: gpib: Rename " Dave Penkler
  0 siblings, 2 replies; 3+ messages in thread
From: Dave Penkler @ 2025-04-18  9:31 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel; +Cc: Dave Penkler

These patches prepare for the release of the userspace libraries and
tools to be compatible with both the in-tree drivers and out-of-tree
drivers.

   Patch 1 removes unused enums
   Patch 2 renames gpib_user.h to gpib.h

Dave Penkler (2):
  Remove unused enums from common include file
  Rename common include file

 drivers/staging/gpib/include/gpibP.h          |  2 +-
 drivers/staging/gpib/include/gpib_types.h     |  2 +-
 .../staging/gpib/uapi/{gpib_user.h => gpib.h} | 42 -------------------
 3 files changed, 2 insertions(+), 44 deletions(-)
 rename drivers/staging/gpib/uapi/{gpib_user.h => gpib.h} (82%)

-- 
2.49.0


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

* [PATCH 1/2] staging: gpib: Remove unused enums from common include file
  2025-04-18  9:31 [PATCH 0/2] staging: gpib: Clean and rename common include Dave Penkler
@ 2025-04-18  9:31 ` Dave Penkler
  2025-04-18  9:31 ` [PATCH 2/2] staging: gpib: Rename " Dave Penkler
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Penkler @ 2025-04-18  9:31 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel; +Cc: Dave Penkler

The error code and timeout code enums are not used by any
of the gpib kernel code.  This patch removes them.

Signed-off-by: Dave Penkler <dpenkler@gmail.com>
---
 drivers/staging/gpib/uapi/gpib_user.h | 42 ---------------------------
 1 file changed, 42 deletions(-)

diff --git a/drivers/staging/gpib/uapi/gpib_user.h b/drivers/staging/gpib/uapi/gpib_user.h
index 1cb6b6219e67..4ca3cc9e0cd7 100644
--- a/drivers/staging/gpib/uapi/gpib_user.h
+++ b/drivers/staging/gpib/uapi/gpib_user.h
@@ -53,48 +53,6 @@ enum ibsta_bits {
 		EVENT | LOK | REM | CIC | ATN | TACS | LACS | DTAS | DCAS | SRQI,
 };
 
-/* IBERR error codes */
-enum iberr_code {
-	EDVR = 0,		/* system error */
-	ECIC = 1,		/* not CIC */
-	ENOL = 2,		/* no listeners */
-	EADR = 3,		/* CIC and not addressed before I/O */
-	EARG = 4,		/* bad argument to function call */
-	ESAC = 5,		/* not SAC */
-	EABO = 6,		/* I/O operation was aborted */
-	ENEB = 7,		/* non-existent board (GPIB interface offline) */
-	EDMA = 8,		/* DMA hardware error detected */
-	EOIP = 10,		/* new I/O attempted with old I/O in progress  */
-	ECAP = 11,		/* no capability for intended opeation */
-	EFSO = 12,		/* file system operation error */
-	EBUS = 14,		/* bus error */
-	ESTB = 15,		/* lost serial poll bytes */
-	ESRQ = 16,		/* SRQ stuck on */
-	ETAB = 20	       /* Table Overflow */
-};
-
-/* Timeout values and meanings */
-enum gpib_timeout {
-	TNONE = 0,		/* Infinite timeout (disabled)	   */
-	T10us = 1,		/* Timeout of 10 usec (ideal)	   */
-	T30us = 2,		/* Timeout of 30 usec (ideal)	   */
-	T100us = 3,		/* Timeout of 100 usec (ideal)	   */
-	T300us = 4,		/* Timeout of 300 usec (ideal)	   */
-	T1ms = 5,		/* Timeout of 1 msec (ideal)	   */
-	T3ms = 6,		/* Timeout of 3 msec (ideal)	   */
-	T10ms = 7,		/* Timeout of 10 msec (ideal)	   */
-	T30ms = 8,		/* Timeout of 30 msec (ideal)	   */
-	T100ms = 9,		/* Timeout of 100 msec (ideal)	   */
-	T300ms = 10,	/* Timeout of 300 msec (ideal)	   */
-	T1s = 11,		/* Timeout of 1 sec (ideal)	   */
-	T3s = 12,		/* Timeout of 3 sec (ideal)	   */
-	T10s = 13,		/* Timeout of 10 sec (ideal)	   */
-	T30s = 14,		/* Timeout of 30 sec (ideal)	   */
-	T100s = 15,		/* Timeout of 100 sec (ideal)	   */
-	T300s = 16,		/* Timeout of 300 sec (ideal)	   */
-	T1000s = 17		/* Timeout of 1000 sec (maximum)   */
-};
-
 /* End-of-string (EOS) modes for use with ibeos */
 
 enum eos_flags {
-- 
2.49.0


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

* [PATCH 2/2] staging: gpib: Rename common include file
  2025-04-18  9:31 [PATCH 0/2] staging: gpib: Clean and rename common include Dave Penkler
  2025-04-18  9:31 ` [PATCH 1/2] staging: gpib: Remove unused enums from common include file Dave Penkler
@ 2025-04-18  9:31 ` Dave Penkler
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Penkler @ 2025-04-18  9:31 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel; +Cc: Dave Penkler

User code includes gpib_user.h. Since this include has diverged
from the original by
  - removing unused functions and defines
  - changing camel-case identifiers
  - removing typedefs
we need to change the name of the kernel include. This include
will be included in the userland gpib_user.h ensuring backward
compatibility for application programmes.

Rename the file and change the references to it.

Signed-off-by: Dave Penkler <dpenkler@gmail.com>
---
 drivers/staging/gpib/include/gpibP.h              | 2 +-
 drivers/staging/gpib/include/gpib_types.h         | 2 +-
 drivers/staging/gpib/uapi/{gpib_user.h => gpib.h} | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename drivers/staging/gpib/uapi/{gpib_user.h => gpib.h} (100%)

diff --git a/drivers/staging/gpib/include/gpibP.h b/drivers/staging/gpib/include/gpibP.h
index 6461b330a3c3..0af72934ce24 100644
--- a/drivers/staging/gpib/include/gpibP.h
+++ b/drivers/staging/gpib/include/gpibP.h
@@ -11,7 +11,7 @@
 
 #include "gpib_types.h"
 #include "gpib_proto.h"
-#include "gpib_user.h"
+#include "gpib.h"
 #include "gpib_ioctl.h"
 
 #include <linux/fs.h>
diff --git a/drivers/staging/gpib/include/gpib_types.h b/drivers/staging/gpib/include/gpib_types.h
index 9e0dfdb9904d..2af4574d400c 100644
--- a/drivers/staging/gpib/include/gpib_types.h
+++ b/drivers/staging/gpib/include/gpib_types.h
@@ -8,7 +8,7 @@
 #define _GPIB_TYPES_H
 
 #ifdef __KERNEL__
-#include "gpib_user.h"
+#include "gpib.h"
 #include <linux/atomic.h>
 #include <linux/device.h>
 #include <linux/mutex.h>
diff --git a/drivers/staging/gpib/uapi/gpib_user.h b/drivers/staging/gpib/uapi/gpib.h
similarity index 100%
rename from drivers/staging/gpib/uapi/gpib_user.h
rename to drivers/staging/gpib/uapi/gpib.h
-- 
2.49.0


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

end of thread, other threads:[~2025-04-18  9:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-18  9:31 [PATCH 0/2] staging: gpib: Clean and rename common include Dave Penkler
2025-04-18  9:31 ` [PATCH 1/2] staging: gpib: Remove unused enums from common include file Dave Penkler
2025-04-18  9:31 ` [PATCH 2/2] staging: gpib: Rename " Dave Penkler

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