Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH 0/4] staging: gpib: Cleanup and fixes for lpvo driver
@ 2024-12-04 14:57 Dave Penkler
  2024-12-04 14:57 ` [PATCH 1/4] staging: gpib: Remove useless include Dave Penkler
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Dave Penkler @ 2024-12-04 14:57 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel; +Cc: Dave Penkler

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(-)

-- 
2.47.1


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

* [PATCH 1/4] staging: gpib: Remove useless include
  2024-12-04 14:57 [PATCH 0/4] staging: gpib: Cleanup and fixes for lpvo driver Dave Penkler
@ 2024-12-04 14:57 ` Dave Penkler
  2024-12-04 14:57 ` [PATCH 2/4] staging: gpib: Remove duplicate include Dave Penkler
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Dave Penkler @ 2024-12-04 14:57 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel; +Cc: Dave Penkler, kernel test robot

linux/version.h not needed.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410102259.zcoS9Eiu-lkp@intel.com/
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
---
 drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 1 -
 1 file changed, 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 796c3a5be545..9a3271e885d2 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -10,7 +10,6 @@
 
 /* base module includes */
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/init.h>
-- 
2.47.1


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

* [PATCH 2/4] staging: gpib: Remove duplicate include
  2024-12-04 14:57 [PATCH 0/4] staging: gpib: Cleanup and fixes for lpvo driver Dave Penkler
  2024-12-04 14:57 ` [PATCH 1/4] staging: gpib: Remove useless include Dave Penkler
@ 2024-12-04 14:57 ` Dave Penkler
  2024-12-04 14:57 ` [PATCH 3/4] staging: gpib: Fix erroneous removal of blank before newline Dave Penkler
  2024-12-04 14:57 ` [PATCH 4/4] staging: gpib: Fix faulty workaround for assignment in if Dave Penkler
  3 siblings, 0 replies; 7+ messages in thread
From: Dave Penkler @ 2024-12-04 14:57 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel; +Cc: Dave Penkler, kernel test robot

linux/uaccess.h is included more than once.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410110406.mQENnj09-lkp@intel.com/
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
---
 drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 1 -
 1 file changed, 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 9a3271e885d2..47db17418a74 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -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"
-- 
2.47.1


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

* [PATCH 3/4] staging: gpib: Fix erroneous removal of blank before newline
  2024-12-04 14:57 [PATCH 0/4] staging: gpib: Cleanup and fixes for lpvo driver Dave Penkler
  2024-12-04 14:57 ` [PATCH 1/4] staging: gpib: Remove useless include Dave Penkler
  2024-12-04 14:57 ` [PATCH 2/4] staging: gpib: Remove duplicate include Dave Penkler
@ 2024-12-04 14:57 ` Dave Penkler
  2024-12-04 15:29   ` Greg KH
  2024-12-04 16:05   ` Dan Carpenter
  2024-12-04 14:57 ` [PATCH 4/4] staging: gpib: Fix faulty workaround for assignment in if Dave Penkler
  3 siblings, 2 replies; 7+ messages in thread
From: Dave Penkler @ 2024-12-04 14:57 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel; +Cc: Dave Penkler, Marcello Carla'

Replace original blanks with "."

Reported-by: Marcello Carla' <marcello.carla@gmx.com>
Co-developed-by: Marcello Carla' <marcello.carla@gmx.com>
Fixes: fce79512a96a ("staging: gpib: Add LPVO DIY USB GPIB driver")
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
---
 drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 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 47db17418a74..c30db3615f49 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -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);
 
-- 
2.47.1


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

* [PATCH 4/4] staging: gpib: Fix faulty workaround for assignment in if
  2024-12-04 14:57 [PATCH 0/4] staging: gpib: Cleanup and fixes for lpvo driver Dave Penkler
                   ` (2 preceding siblings ...)
  2024-12-04 14:57 ` [PATCH 3/4] staging: gpib: Fix erroneous removal of blank before newline Dave Penkler
@ 2024-12-04 14:57 ` Dave Penkler
  3 siblings, 0 replies; 7+ messages in thread
From: Dave Penkler @ 2024-12-04 14:57 UTC (permalink / raw)
  To: gregkh, linux-staging, linux-kernel; +Cc: Dave Penkler, Kees Bakker

This was detected by Coverity.

Add the missing assignment in the else branch of the if

Reported-by: Kees Bakker <kees@ijzerbout.nl>
Fixes: fce79512a96a ("staging: gpib: Add LPVO DIY USB GPIB driver")
Signed-off-by: Dave Penkler <dpenkler@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 c30db3615f49..5114f6c519e5 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -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) {
-- 
2.47.1


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

* Re: [PATCH 3/4] staging: gpib: Fix erroneous removal of blank before newline
  2024-12-04 14:57 ` [PATCH 3/4] staging: gpib: Fix erroneous removal of blank before newline Dave Penkler
@ 2024-12-04 15:29   ` Greg KH
  2024-12-04 16:05   ` Dan Carpenter
  1 sibling, 0 replies; 7+ messages in thread
From: Greg KH @ 2024-12-04 15:29 UTC (permalink / raw)
  To: Dave Penkler; +Cc: linux-staging, linux-kernel, Marcello Carla'

On Wed, Dec 04, 2024 at 03:57:12PM +0100, Dave Penkler wrote:
> Replace original blanks with "."
> 
> Reported-by: Marcello Carla' <marcello.carla@gmx.com>
> Co-developed-by: Marcello Carla' <marcello.carla@gmx.com>
> Fixes: fce79512a96a ("staging: gpib: Add LPVO DIY USB GPIB driver")
> Signed-off-by: Dave Penkler <dpenkler@gmail.com>
> ---
>  drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 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 47db17418a74..c30db3615f49 100644
> --- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
> +++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
> @@ -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";

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

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

* Re: [PATCH 3/4] staging: gpib: Fix erroneous removal of blank before newline
  2024-12-04 14:57 ` [PATCH 3/4] staging: gpib: Fix erroneous removal of blank before newline Dave Penkler
  2024-12-04 15:29   ` Greg KH
@ 2024-12-04 16:05   ` Dan Carpenter
  1 sibling, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2024-12-04 16:05 UTC (permalink / raw)
  To: Dave Penkler; +Cc: gregkh, linux-staging, linux-kernel, Marcello Carla'

You're going to need to resend this.  Run checkpatch.pl etc.

On Wed, Dec 04, 2024 at 03:57:12PM +0100, Dave Penkler wrote:
> Replace original blanks with "."
> 

Take a look at how this look like on lore:
https://lore.kernel.org/all/20241204145713.11889-4-dpenkler@gmail.com/
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


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

end of thread, other threads:[~2024-12-04 16:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 14:57 [PATCH 0/4] staging: gpib: Cleanup and fixes for lpvo driver Dave Penkler
2024-12-04 14:57 ` [PATCH 1/4] staging: gpib: Remove useless include Dave Penkler
2024-12-04 14:57 ` [PATCH 2/4] staging: gpib: Remove duplicate include Dave Penkler
2024-12-04 14:57 ` [PATCH 3/4] staging: gpib: Fix erroneous removal of blank before newline Dave Penkler
2024-12-04 15:29   ` Greg KH
2024-12-04 16:05   ` Dan Carpenter
2024-12-04 14:57 ` [PATCH 4/4] staging: gpib: Fix faulty workaround for assignment in if Dave Penkler

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