staging: gpib: some cleanups in lpvo_usb_gpib.c
cover staging: gpib: some cleanups in lpvo_usb_gpib.c
This series comprises three kernel-doc comments fixes and one commented-out code cleanup.
Gaston Gonzalez (4):
staging: gpib: fix kernel-doc section for write_loop() function
staging: gpib: fix kernel-doc section for function
usb_gpib_interface_clear()
staging: gpib: fix kernel-doc section for usb_gpib_line_status()
function
staging: gpib: remove commented-out lines
.../gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-)
Signature · 1 line
2.49.0.rc0
PATCH 1/4 staging: gpib: fix kernel-doc section for write_loop() function
Add a colon character in the kernel-doc section of write_loop() in order 'leng' to be picked as argument by the kernel-doc compiler.
This change fix the following warning:
warning: Function parameter or struct member 'leng' not described in 'send_command'
--- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +1 -1
@@ -232,7 +232,7 @@ static int write_loop(void *dev, char *msg, int leng)* * @board: the gpib_board_struct data area for this gpib interface * @msg: the byte sequence. -* @leng the byte sequence length; can be given as zero and is +* @leng: the byte sequence length; can be given as zero and is * computed automatically, but if 'msg' contains a zero byte, * it has to be given explicitly. */
Signature · 1 line
2.49.0.rc0
PATCH 2/4 staging: gpib: fix kernel-doc section for function usb_gpib_interface_clear()
In reply to Gaston GonzalezAdd '@' character in kernel-doc comment in order 'assert' to be picked as argument by the kernel-doc compiler.
This change fix the following warning:
warning: Function parameter or struct member 'assert' not described in 'usb_gpib_interface_clear'
--- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +1 -1
@@ -621,7 +621,7 @@ static int usb_gpib_go_to_standby(gpib_board_t *board)* usb_gpib_interface_clear() - Assert or de-assert IFC * * @board: the gpib_board data area for this gpib interface -* assert: 1: assert IFC; 0: de-assert IFC +* @assert: 1: assert IFC; 0: de-assert IFC * * Currently on the assert request we issue the lpvo IBZ * command that cycles IFC low for 100 usec, then we ignore
Signature · 1 line
2.49.0.rc0
PATCH 3/4 staging: gpib: fix kernel-doc section for usb_gpib_line_status() function
In reply to Gaston GonzalezThe function name field in the kernel-doc section for the usb_gpib_line_status() is defined as 'line_status'. In addition, after the kernel-doc section, there are three macro definition instead of the function definition.
These issues trigger the warning:
warning: expecting prototype for line_status(). Prototype was for WQT() instead.
Fix the warning by renaming the function in the kernel-doc section and by moving the macros at the beginning of the file with the rest of macros definition.
--- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +6 -6
@@ -78,6 +78,10 @@ module_param(debug, int, 0644); dev_dbg(board->gpib_dev, format, ## __VA_ARGS__); } \ while (0) +#define WQT wait_queue_entry_t +#define WQH head +#define WQE entry +/* standard and extended command sets of the usb-gpib adapter */ #define USB_GPIB_ON "\nIB\n"
@@ -131,6 +135,7 @@ module_param(debug, int, 0644);#define INBUF_SIZE 128 +struct char_buf {/* used by one_char() routine */ char *inbuf;int last;
@@ -644,17 +649,12 @@ static void usb_gpib_interface_clear(gpib_board_t *board, int assert) }/** -* line_status() - Read the status of the bus lines. +* usb_gpib_line_status() - Read the status of the bus lines. * * @board: the gpib_board data area for this gpib interface * * We can read all lines. */ - -#define WQT wait_queue_entry_t -#define WQH head -#define WQE entry -static int usb_gpib_line_status (const gpib_board_t *board) {int buffer;
Signature · 1 line
2.49.0.rc0
Re: [PATCH 3/4] staging: gpib: fix kernel-doc section for usb_gpib_line_status() function
Quoted 35 lines · Gaston Gonzalez
The function name field in the kernel-doc section for the
usb_gpib_line_status()is defined as 'line_status'. In addition, after the kernel-doc section, there are three macro definition instead of the function definition.These issues trigger the warning:
warning: expecting prototype for
line_status(). Prototype was forWQT()instead.Fix the warning by renaming the function in the kernel-doc section and by moving the macros at the beginning of the file with the rest of macros definition.
Signed-off-by Gaston Gonzalez <[email protected]>--- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +4
-0@@ -78,6 +78,10 @@ module_param(debug, int, 0644); dev_dbg(board->gpib_dev, format, ## __VA_ARGS__); } \ while (0) +#define WQT wait_queue_entry_t +#define WQH head +#define WQE entry +/* standard and extended command sets of the usb-gpib adapter */ #define USB_GPIB_ON "\nIB\n"
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c module_param(debug, int, 0644); · line 138
Quoted 4 lines
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +1
-0@@ -131,6 +135,7 @@ module_param(debug, int, 0644);#define INBUF_SIZE 128 +
Please disregard this patch. I noticed this blank line after I sent the patch.
Will resend.
Gaston
Quoted 25 lines
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +1
-6struct char_buf {/* used by one_char() routine */ char *inbuf;int last;@@ -644,17 +649,12 @@ static void usb_gpib_interface_clear(gpib_board_t *board, int assert) }/** -* line_status() - Read the status of the bus lines. +* usb_gpib_line_status() - Read the status of the bus lines. * * @board: the gpib_board data area for this gpib interface * * We can read all lines. */ - -#define WQT wait_queue_entry_t -#define WQH head -#define WQE entry -static int usb_gpib_line_status (const gpib_board_t *board) {int buffer;Signature · 1 line
2.49.0.rc0
PATCH 4/4 staging: gpib: remove commented-out lines
In reply to Gaston GonzalezRemove commented-out code in function write_loop().
--- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 11 ----------- 1 file changed, 11 deletions(-)
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +0 -11
@@ -218,18 +218,7 @@ static inline int usec_diff(struct timespec64 *a, struct timespec64 *b)static int write_loop (void *dev,char *msg,int leng) { -// int nchar = 0, val; - -// do { -return skel_do_write (dev, msg, leng); - -// if (val < 1) { -// return -EIO; -// } -// nchar +=val; -// } while (nchar < leng); -// return leng; }/**
Signature · 1 line
2.49.0.rc0