All of lore.kernel.org
 help / color / mirror / Atom feed
* staging: ks7010: Checkpatch fixes
@ 2017-02-20  5:45 Tobin C. Harding
  2017-02-20  5:45 ` [PATCH 1/2] staging: ks7010: Whitespace checkpatch fixes Tobin C. Harding
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tobin C. Harding @ 2017-02-20  5:45 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Greg Kroah-Hartman, driverdev-devel

Checkpatch emits various messages. Struct ks_stdio_card contains a
spinlock. It is never used. The data structure contains two fields,
both of which are accessed in ways that don't seem to allow use of a
spinlock. I am not fully qualified however to analyse this.

Spinlock is either not correctly used or is defined and not needed.

Fix whitespace errors/warnings/checks. Fix macro definition to clear
checkpatch check and error.

Kernelnewbie note: I am unsure how to broach issues like this when
discovered. In a patch cover letter like this or some other way?

Tobin C. Harding (2):
  staging: ks7010: Whitespace checkpatch fixes
  staging: ks7010: Whitespace checkpatch fixes

 drivers/staging/ks7010/ks7010_sdio.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 1/2] staging: ks7010: Whitespace checkpatch fixes
  2017-02-20  5:45 staging: ks7010: Checkpatch fixes Tobin C. Harding
@ 2017-02-20  5:45 ` Tobin C. Harding
  2017-02-20  5:45 ` [PATCH 2/2] staging: ks7010: Checkpatch macro fixes Tobin C. Harding
  2017-02-24 17:11 ` staging: ks7010: Checkpatch fixes Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Tobin C. Harding @ 2017-02-20  5:45 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Greg Kroah-Hartman, driverdev-devel

Checkpatch emits various whitespace messages;

ERROR: trailing whitespace
WARNING: Unnecessary space before function pointer arguments
CHECK: Please use a blank line after function/struct/union/enum

Remove trailing whitespace. Remove unnecessary space. Add blank line
after struct definition.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
---
 drivers/staging/ks7010/ks7010_sdio.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.h b/drivers/staging/ks7010/ks7010_sdio.h
index 0f5fd84..9103522 100644
--- a/drivers/staging/ks7010/ks7010_sdio.h
+++ b/drivers/staging/ks7010/ks7010_sdio.h
@@ -85,7 +85,7 @@
 
 #define KS7010_IRAM_ADDRESS	0x06000000
 
-/* 
+/*
  * struct define
  */
 struct hw_info_t {
@@ -115,7 +115,7 @@ struct ks_sdio_card {
 struct tx_device_buffer {
 	unsigned char *sendp;	/* pointer of send req data */
 	unsigned int size;
-	void (*complete_handler) (void *arg1, void *arg2);
+	void (*complete_handler)(void *arg1, void *arg2);
 	void *arg1;
 	void *arg2;
 };
@@ -142,6 +142,7 @@ struct rx_device {
 	unsigned int qtail;	/* rx buffer queue last pointer */
 	spinlock_t rx_dev_lock;
 };
+
 #define	ROM_FILE "ks7010sd.rom"
 
 #endif /* _KS7010_SDIO_H */
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 2/2] staging: ks7010: Checkpatch macro fixes
  2017-02-20  5:45 staging: ks7010: Checkpatch fixes Tobin C. Harding
  2017-02-20  5:45 ` [PATCH 1/2] staging: ks7010: Whitespace checkpatch fixes Tobin C. Harding
@ 2017-02-20  5:45 ` Tobin C. Harding
  2017-02-24 17:11 ` staging: ks7010: Checkpatch fixes Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Tobin C. Harding @ 2017-02-20  5:45 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Greg Kroah-Hartman, driverdev-devel

Checkpatch emits messages relating to macro definition
CHECK: spaces preferred around that '*' (ctx:VxV)
ERROR: Macros with complex values should be enclosed in parentheses

Add space around '*'. Add parentheses to macro definition.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
---
 drivers/staging/ks7010/ks7010_sdio.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.h b/drivers/staging/ks7010/ks7010_sdio.h
index 9103522..a1c7551 100644
--- a/drivers/staging/ks7010/ks7010_sdio.h
+++ b/drivers/staging/ks7010/ks7010_sdio.h
@@ -81,7 +81,7 @@
 
 /* AHB Data Window  0x010000-0x01FFFF */
 #define DATA_WINDOW		0x010000
-#define WINDOW_SIZE		64*1024
+#define WINDOW_SIZE		(64 * 1024)
 
 #define KS7010_IRAM_ADDRESS	0x06000000
 
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: staging: ks7010: Checkpatch fixes
  2017-02-20  5:45 staging: ks7010: Checkpatch fixes Tobin C. Harding
  2017-02-20  5:45 ` [PATCH 1/2] staging: ks7010: Whitespace checkpatch fixes Tobin C. Harding
  2017-02-20  5:45 ` [PATCH 2/2] staging: ks7010: Checkpatch macro fixes Tobin C. Harding
@ 2017-02-24 17:11 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-02-24 17:11 UTC (permalink / raw)
  To: Tobin C. Harding; +Cc: driverdev-devel, Wolfram Sang

On Mon, Feb 20, 2017 at 04:45:05PM +1100, Tobin C. Harding wrote:
> Checkpatch emits various messages. Struct ks_stdio_card contains a
> spinlock. It is never used. The data structure contains two fields,
> both of which are accessed in ways that don't seem to allow use of a
> spinlock. I am not fully qualified however to analyse this.
> 
> Spinlock is either not correctly used or is defined and not needed.
> 
> Fix whitespace errors/warnings/checks. Fix macro definition to clear
> checkpatch check and error.
> 
> Kernelnewbie note: I am unsure how to broach issues like this when
> discovered. In a patch cover letter like this or some other way?
> 

None of these applied to my tree at all, perhaps someone else already
did these before you?

sorry,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2017-02-24 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-20  5:45 staging: ks7010: Checkpatch fixes Tobin C. Harding
2017-02-20  5:45 ` [PATCH 1/2] staging: ks7010: Whitespace checkpatch fixes Tobin C. Harding
2017-02-20  5:45 ` [PATCH 2/2] staging: ks7010: Checkpatch macro fixes Tobin C. Harding
2017-02-24 17:11 ` staging: ks7010: Checkpatch fixes Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.