* [PATCH 0/4] staging: gpib: some cleanups in lpvo_usb_gpib.c
@ 2025-03-04 19:25 Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 1/4] staging: gpib: fix kernel-doc section for write_loop() function Gaston Gonzalez
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Gaston Gonzalez @ 2025-03-04 19:25 UTC (permalink / raw)
To: linux-staging
Cc: dpenkler, gregkh, dan.carpenter, arnd, niharchaithanya,
jiapeng.chong, linux-kernel, Gaston Gonzalez
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(-)
--
2.49.0.rc0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] staging: gpib: fix kernel-doc section for write_loop() function
2025-03-04 19:25 [PATCH 0/4] staging: gpib: some cleanups in lpvo_usb_gpib.c Gaston Gonzalez
@ 2025-03-04 19:25 ` Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 2/4] staging: gpib: fix kernel-doc section for function usb_gpib_interface_clear() Gaston Gonzalez
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Gaston Gonzalez @ 2025-03-04 19:25 UTC (permalink / raw)
To: linux-staging
Cc: dpenkler, gregkh, dan.carpenter, arnd, niharchaithanya,
jiapeng.chong, linux-kernel, Gaston Gonzalez
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'
Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
---
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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..eeabbdb39057 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -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.
*/
--
2.49.0.rc0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] staging: gpib: fix kernel-doc section for function usb_gpib_interface_clear()
2025-03-04 19:25 [PATCH 0/4] staging: gpib: some cleanups in lpvo_usb_gpib.c Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 1/4] staging: gpib: fix kernel-doc section for write_loop() function Gaston Gonzalez
@ 2025-03-04 19:25 ` Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 3/4] staging: gpib: fix kernel-doc section for usb_gpib_line_status() function Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 4/4] staging: gpib: remove commented-out lines Gaston Gonzalez
3 siblings, 0 replies; 6+ messages in thread
From: Gaston Gonzalez @ 2025-03-04 19:25 UTC (permalink / raw)
To: linux-staging
Cc: dpenkler, gregkh, dan.carpenter, arnd, niharchaithanya,
jiapeng.chong, linux-kernel, Gaston Gonzalez
Add '@' 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'
Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
---
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 eeabbdb39057..090857824d07 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -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
--
2.49.0.rc0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] staging: gpib: fix kernel-doc section for usb_gpib_line_status() function
2025-03-04 19:25 [PATCH 0/4] staging: gpib: some cleanups in lpvo_usb_gpib.c Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 1/4] staging: gpib: fix kernel-doc section for write_loop() function Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 2/4] staging: gpib: fix kernel-doc section for function usb_gpib_interface_clear() Gaston Gonzalez
@ 2025-03-04 19:25 ` Gaston Gonzalez
2025-03-04 19:33 ` Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 4/4] staging: gpib: remove commented-out lines Gaston Gonzalez
3 siblings, 1 reply; 6+ messages in thread
From: Gaston Gonzalez @ 2025-03-04 19:25 UTC (permalink / raw)
To: linux-staging
Cc: dpenkler, gregkh, dan.carpenter, arnd, niharchaithanya,
jiapeng.chong, linux-kernel, 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 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.
Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
---
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
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 090857824d07..f7dd0809b06c 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -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;
--
2.49.0.rc0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] staging: gpib: remove commented-out lines
2025-03-04 19:25 [PATCH 0/4] staging: gpib: some cleanups in lpvo_usb_gpib.c Gaston Gonzalez
` (2 preceding siblings ...)
2025-03-04 19:25 ` [PATCH 3/4] staging: gpib: fix kernel-doc section for usb_gpib_line_status() function Gaston Gonzalez
@ 2025-03-04 19:25 ` Gaston Gonzalez
3 siblings, 0 replies; 6+ messages in thread
From: Gaston Gonzalez @ 2025-03-04 19:25 UTC (permalink / raw)
To: linux-staging
Cc: dpenkler, gregkh, dan.carpenter, arnd, niharchaithanya,
jiapeng.chong, linux-kernel, Gaston Gonzalez
Remove commented-out code in function write_loop().
Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
---
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 11 -----------
1 file changed, 11 deletions(-)
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 f7dd0809b06c..bb22ee2cc5e1 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -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;
}
/**
--
2.49.0.rc0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3/4] staging: gpib: fix kernel-doc section for usb_gpib_line_status() function
2025-03-04 19:25 ` [PATCH 3/4] staging: gpib: fix kernel-doc section for usb_gpib_line_status() function Gaston Gonzalez
@ 2025-03-04 19:33 ` Gaston Gonzalez
0 siblings, 0 replies; 6+ messages in thread
From: Gaston Gonzalez @ 2025-03-04 19:33 UTC (permalink / raw)
To: linux-staging
Cc: dpenkler, gregkh, dan.carpenter, arnd, niharchaithanya,
jiapeng.chong, linux-kernel, gascoar
On Tue, Mar 04, 2025 at 04:25:41PM -0300, Gaston Gonzalez wrote:
> 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 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.
>
> Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
> ---
> drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> 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 090857824d07..f7dd0809b06c 100644
> --- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
> +++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
> @@ -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
>
> +
Please disregard this patch. I noticed this blank line after I sent the
patch.
Will resend.
Gaston
> 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;
> --
> 2.49.0.rc0
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-03-04 19:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-04 19:25 [PATCH 0/4] staging: gpib: some cleanups in lpvo_usb_gpib.c Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 1/4] staging: gpib: fix kernel-doc section for write_loop() function Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 2/4] staging: gpib: fix kernel-doc section for function usb_gpib_interface_clear() Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 3/4] staging: gpib: fix kernel-doc section for usb_gpib_line_status() function Gaston Gonzalez
2025-03-04 19:33 ` Gaston Gonzalez
2025-03-04 19:25 ` [PATCH 4/4] staging: gpib: remove commented-out lines Gaston Gonzalez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox