staging: gpib: Cleanup and fixes for lpvo driver
cover staging: gpib: Cleanup and fixes for lpvo driver
These are the accumulated patches for the lpvo driver Patches 1 & 2: Remove redundant includes Patch 3: Fix protocol constants
Patch 4: Fix unreachable code
Dave Penkler (4):
staging: gpib: Remove useless include
staging: gpib: Remove duplicate include
staging: gpib: Fix erroneous removal of blank before newline
staging: gpib: Fix faulty workaround for assignment in if
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
Signature · 1 line
2.47.1
PATCH 1/4 staging: gpib: Remove useless include
linux/version.h not needed.
--- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +0 -1
@@ -10,7 +10,6 @@/* base module includes */ -#include <linux/version.h> #include <linux/module.h> #include <linux/sched.h> #include <linux/init.h>
Signature · 1 line
2.47.1
PATCH 2/4 staging: gpib: Remove duplicate include
In reply to Dave Penklerlinux/uaccess.h is included more than once.
--- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +0 -1
@@ -24,7 +24,6 @@#include <linux/timer.h> #include <linux/delay.h> #include <linux/sched/signal.h> -#include <linux/uaccess.h> #include <linux/usb.h> #include "gpibP.h"
Signature · 1 line
2.47.1
PATCH 3/4 staging: gpib: Fix erroneous removal of blank before newline
In reply to Dave PenklerReplace original blanks with "."
--- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +3 -3
@@ -97,8 +97,8 @@ module_param(debug, int, 0644);#define USB_GPIB_DEBUG_ON "\nIBDE\xAA\n"#define USB_GPIB_SET_LISTEN "\nIBDT0\n"#define USB_GPIB_SET_TALK "\nIBDT1\n" -#define USB_GPIB_SET_LINES "\nIBDC\n" -#define USB_GPIB_SET_DATA "\nIBDM\n" +#define USB_GPIB_SET_LINES "\nIBDC.\n" +#define USB_GPIB_SET_DATA "\nIBDM.\n"#define USB_GPIB_READ_LINES "\nIBD?C\n"#define USB_GPIB_READ_DATA "\nIBD?M\n"#define USB_GPIB_READ_BUS "\nIBD??\n"
@@ -587,7 +587,7 @@ static int usb_gpib_command(gpib_board_t *board, size_t *bytes_written) {int i, retval; -char command[6 ] ="IBc\n" ; +char command[6 ]="IBc.\n" ;DIA_LOG (1 ,"enter %p\n" , board);
Signature · 1 line
2.47.1
Greg KH
maintainerRe: [PATCH 3/4] staging: gpib: Fix erroneous removal of blank before newline
Quoted 26 lines · Dave Penkler
Replace original blanks with "."
Reported-by Marcello Carla' <[email protected]>Co-developed-by Marcello Carla' <[email protected]>Fixes fce79512a96a ("staging: gpib: Add LPVO DIY USB GPIB driver")Signed-off-by Dave Penkler <[email protected]>--- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +2
-2@@ -97,8 +97,8 @@ module_param(debug, int, 0644);#define USB_GPIB_DEBUG_ON "\nIBDE\xAA\n"#define USB_GPIB_SET_LISTEN "\nIBDT0\n"#define USB_GPIB_SET_TALK "\nIBDT1\n" -#define USB_GPIB_SET_LINES "\nIBDC\n" -#define USB_GPIB_SET_DATA "\nIBDM\n" +#define USB_GPIB_SET_LINES "\nIBDC.\n" +#define USB_GPIB_SET_DATA "\nIBDM.\n"#define USB_GPIB_READ_LINES "\nIBD?C\n"#define USB_GPIB_READ_DATA "\nIBD?M\n"#define USB_GPIB_READ_BUS "\nIBD??\n"
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c static int usb_gpib_command(gpib_board_t *board, · line 590
Quoted 5 lines
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +1
-1@@ -587,7 +587,7 @@ static int usb_gpib_command(gpib_board_t *board, size_t *bytes_written) {int i, retval; -char command[6 ] ="IBc\n" ; +char command[6 ]="IBc.\n" ;
Did you run this through scripts/checkpatch.pl before sending it out? Please always do so.
And what is the "." for? Why is this needed? Please explain that in the changelog text.
thanks,
greg k-h
Re: [PATCH 3/4] staging: gpib: Fix erroneous removal of blank before newline
In reply to Dave PenklerYou're going to need to resend this. Run checkpatch.pl etc.
Quoted 2 lines · Dave Penkler
Replace original blanks with "."
Take a look at how this look like on lore:
https://lore.kernel.org/all/[email protected]/
The subject is hard to see. It's better to think of it as the title instead of the first sentence.
To be honest, I don't really understand this commit. Presumably this gets printed out or something? Can you cut a paste a few lines of before and after text to show us how it looks like?
regards,
dan carpenter
PATCH 4/4 staging: gpib: Fix faulty workaround for assignment in if
In reply to Dave PenklerThis was detected by Coverity.
Add the missing assignment in the else branch of the if
--- 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
@@ -899,7 +899,7 @@ static int usb_gpib_read(gpib_board_t *board, }else {/* we are in the closing <DLE><ETX> sequence */ - + c = nc;if (c ==ETX ) { c =one_char (board, &b);if (c ==ACK ) {
Signature · 1 line
2.47.1