Skip to contentSkip to conversation

isdn: hysdn: Fix error spaces around '*'

PATCH In review Jose Carlos Cazarin Filho 4 participants 9 messages Aug 2, 2019 – Aug 8, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 isdn: hysdn: Fix error spaces around '*'

Fix checkpath error:
CHECK: spaces preferred around that '*' (ctx:WxV)
+extern hysdn_card *card_root; /* pointer to first card */

---
Hello all!
This is my first commit to the Linux Kernel, I'm doing this to learn and be able to contribute more in the future
Peace all!

 drivers/staging/isdn/hysdn/hysdn_defs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/isdn/hysdn/hysdn_defs.h +1 -1
index cdac46a21..f20150d62 100644
@@ -220,7 +220,7 @@ typedef struct hycapictrl_info hycapictrl_info;
 /*****************/
 /* exported vars */
 /*****************/
-extern hysdn_card *card_root;	/* pointer to first card */
+extern hysdn_card * card_root;	/* pointer to first card */
 
 
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 5 lines · On Fri, 2 Aug 2019 19:56:02 +0000 Jose Carlos Cazarin Filho…

Fix checkpath error:
CHECK: spaces preferred around that '*' (ctx:WxV)
+extern hysdn_card *card_root; /* pointer to first card */

Read the TODO, these drivers are scheduled for removal, so changes are not helpful at this time.

#2 lore raw
Quoted 11 lines · Stephen Hemminger
Quoted 5 lines · On Fri, 2 Aug 2019 19:56:02 +0000 Jose Carlos Cazarin Filho…

Fix checkpath error:
CHECK: spaces preferred around that '*' (ctx:WxV)
+extern hysdn_card *card_root; /* pointer to first card */

Read the TODO, these drivers are scheduled for removal, so changes are not helpful at this time.

Maybe better to mark the MAINTAINERS entry obsolete so checkpatch bleats a message about unnecessary changes.

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
index 30bf852e6d6b..b5df91032574 100644
@@ -8628,7 +8628,7 @@ M:	Karsten Keil <[email protected]>
 L:	[email protected] (subscribers-only)
 L:	[email protected]
 W:	http://www.isdn4linux.de
-S:	Odd Fixes
+S:	Obsolete
 F:	Documentation/isdn/
 F:	drivers/isdn/capi/
 F:	drivers/staging/isdn/
maintainer
#3 lore raw
Quoted 25 lines · Joe Perches
Quoted 11 lines · Stephen Hemminger
Quoted 5 lines · On Fri, 2 Aug 2019 19:56:02 +0000 Jose Carlos Cazarin Filho…

Fix checkpath error:
CHECK: spaces preferred around that '*' (ctx:WxV)
+extern hysdn_card *card_root; /* pointer to first card */

Read the TODO, these drivers are scheduled for removal, so changes are not helpful at this time.

Maybe better to mark the MAINTAINERS entry obsolete so checkpatch bleats a message about unnecessary changes.

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +0 -0
index 30bf852e6d6b..b5df91032574 100644

MAINTAINERS M: Karsten Keil <[email protected]> · line 8634

Quoted 8 lines
MAINTAINERS +1 -1
@@ -8628,7 +8628,7 @@ M:	Karsten Keil <[email protected]>
 L:	[email protected] (subscribers-only)
 L:	[email protected]
 W:	http://www.isdn4linux.de
-S:	Odd Fixes
+S:	Obsolete
 F:	Documentation/isdn/
 F:	drivers/isdn/capi/
 F:	drivers/staging/isdn/

Good idea, will take this patch now, thanks.

greg k-h

maintainer
#4 lore raw
Quoted 20 lines · Greg KH
Quoted 19 lines · Joe Perches
Quoted 11 lines · Stephen Hemminger
Quoted 5 lines · On Fri, 2 Aug 2019 19:56:02 +0000 Jose Carlos Cazarin Filho…

Fix checkpath error:
CHECK: spaces preferred around that '*' (ctx:WxV)
+extern hysdn_card *card_root; /* pointer to first card */

Read the TODO, these drivers are scheduled for removal, so changes are not helpful at this time.

Maybe better to mark the MAINTAINERS entry obsolete so checkpatch bleats a message about unnecessary changes.

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
Quoted 6 lines
MAINTAINERS +0 -0
index 30bf852e6d6b..b5df91032574 100644

MAINTAINERS M: Karsten Keil <[email protected]> · line 8634

Quoted 8 lines
MAINTAINERS +1 -1
@@ -8628,7 +8628,7 @@ M:	Karsten Keil <[email protected]>
 L:	[email protected] (subscribers-only)
 L:	[email protected]
 W:	http://www.isdn4linux.de
-S:	Odd Fixes
+S:	Obsolete
 F:	Documentation/isdn/
 F:	drivers/isdn/capi/
 F:	drivers/staging/isdn/

Good idea, will take this patch now, thanks.

Can you resend this with a s-o-b so I can apply it?

thanks,

greg k-h

#5 lore raw
Quoted 38 lines · Greg KH
Quoted 20 lines · Greg KH
Quoted 19 lines · Joe Perches
Quoted 11 lines · Stephen Hemminger
Quoted 5 lines · On Fri, 2 Aug 2019 19:56:02 +0000 Jose Carlos Cazarin Filho…

Fix checkpath error:
CHECK: spaces preferred around that '*' (ctx:WxV)
+extern hysdn_card *card_root; /* pointer to first card */

Read the TODO, these drivers are scheduled for removal, so changes are not helpful at this time.

Maybe better to mark the MAINTAINERS entry obsolete so checkpatch bleats a message about unnecessary changes.

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
Quoted 6 lines
MAINTAINERS +0 -0
index 30bf852e6d6b..b5df91032574 100644

MAINTAINERS M: Karsten Keil <[email protected]> · line 8634

Quoted 8 lines
MAINTAINERS +1 -1
@@ -8628,7 +8628,7 @@ M:	Karsten Keil <[email protected]>
 L:	[email protected] (subscribers-only)
 L:	[email protected]
 W:	http://www.isdn4linux.de
-S:	Odd Fixes
+S:	Obsolete
 F:	Documentation/isdn/
 F:	drivers/isdn/capi/
 F:	drivers/staging/isdn/

Good idea, will take this patch now, thanks.

Quoted 3 lines

Can you resend this with a s-o-b so I can apply it?

thanks,

Hey Greg. It was just an idea and an example. I'm sure you can figure out if you want it. No need for my SOB really.

btw: Karsten hasn't acked a patch or been active in 3+ years. Maybe he should go into CREDITS.

maintainer
#6 lore raw
In reply to Jose Carlos Cazarin Filho
Quoted 19 lines · Jose Carlos Cazarin Filho

Fix checkpath error:
CHECK: spaces preferred around that '*' (ctx:WxV)
+extern hysdn_card *card_root; /* pointer to first card */

---
Hello all!
This is my first commit to the Linux Kernel, I'm doing this to learn and be able to contribute more in the future
Peace all!

 drivers/staging/isdn/hysdn/hysdn_defs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/isdn/hysdn/hysdn_defs.h +0 -0
index cdac46a21..f20150d62 100644

drivers/staging/isdn/hysdn/hysdn_defs.h typedef struct hycapictrl_info hycapictrl_info; · line 223

Quoted 5 lines
drivers/staging/isdn/hysdn/hysdn_defs.h +1 -1
@@ -220,7 +220,7 @@ typedef struct hycapictrl_info hycapictrl_info;
 /*****************/
 /* exported vars */
 /*****************/
-extern hysdn_card *card_root;	/* pointer to first card */
+extern hysdn_card * card_root;	/* pointer to first card */

The original code here is correct, checkpatch must be reporting this incorrectly.

thanks,

greg k-h

#7 lore raw
Quoted 4 lines · Greg KH
Quoted 3 lines · Jose Carlos Cazarin Filho

Fix checkpath error:
CHECK: spaces preferred around that '*' (ctx:WxV)
+extern hysdn_card *card_root; /* pointer to first card */

[]

Quoted 1 line

drivers/staging/isdn/hysdn/hysdn_defs.h

Quoted 1 line
drivers/staging/isdn/hysdn/hysdn_defs.h +0 -0

[]

Quoted 9 lines

drivers/staging/isdn/hysdn/hysdn_defs.h typedef struct hycapictrl_info hycapictrl_info; · line 223

Quoted 6 lines
drivers/staging/isdn/hysdn/hysdn_defs.h +1 -1
@@ -220,7 +220,7 @@ typedef struct hycapictrl_info hycapictrl_info;
 /*****************/
 /* exported vars */
 /*****************/
-extern hysdn_card *card_root;	/* pointer to first card */
+extern hysdn_card * card_root;	/* pointer to first card */

The original code here is correct, checkpatch must be reporting this incorrectly.

Here checkpatch thinks that hydsn_card is an identifier rather than a typedef.

It's defined as:

	typedef struct HYSDN_CARD {
	...
	} hysdn_card;

And that confuses checkpatch.

kernel source code style would not use a typedef for a struct.

A change would be to remove the typedef and declare this as:

	struct hysdn_card {
		...
	};

And then do a global:
sed 's/\bhysdn_card\b/struct hysdn_card/g'

But that's not necessary as the driver is likely to be removed.

maintainer
#8 lore raw
Quoted 31 lines · Joe Perches
Quoted 4 lines · Greg KH
Quoted 3 lines · Jose Carlos Cazarin Filho

Fix checkpath error:
CHECK: spaces preferred around that '*' (ctx:WxV)
+extern hysdn_card *card_root; /* pointer to first card */

[]

Quoted 1 line

drivers/staging/isdn/hysdn/hysdn_defs.h

Quoted 1 line
drivers/staging/isdn/hysdn/hysdn_defs.h +0 -0

[]

Quoted 9 lines

drivers/staging/isdn/hysdn/hysdn_defs.h typedef struct hycapictrl_info hycapictrl_info; · line 223

Quoted 6 lines
drivers/staging/isdn/hysdn/hysdn_defs.h +1 -1
@@ -220,7 +220,7 @@ typedef struct hycapictrl_info hycapictrl_info;
 /*****************/
 /* exported vars */
 /*****************/
-extern hysdn_card *card_root;	/* pointer to first card */
+extern hysdn_card * card_root;	/* pointer to first card */

The original code here is correct, checkpatch must be reporting this incorrectly.

Here checkpatch thinks that hydsn_card is an identifier rather than a typedef.

It's defined as:

	typedef struct HYSDN_CARD {
	...
	} hysdn_card;

And that confuses checkpatch.

kernel source code style would not use a typedef for a struct.

A change would be to remove the typedef and declare this as:

Quoted 8 lines
	struct hysdn_card {
		...
	};

And then do a global:
sed 's/\bhysdn_card\b/struct hysdn_card/g'

But that's not necessary as the driver is likely to be removed.

Ah, that makes sense why checkpatch did this, thanks for the information.

And yes, it's not worth being changed, as this is going to be deleted. But, I bet we get this sent a lot until it is as it's "easy pickings" :)

thanks,

greg k-h