Skip to contentSkip to conversation

module.h: Remove unnecessary semicolon

PATCH In review Joe Perches 2 participants 7 messages Nov 5, 2013 – Nov 8, 2013 Module support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 module.h: Remove unnecessary semicolon

This semicolon isn't necessary, remove it.

---
 include/linux/module.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/module.h +1 -1
index 05f2447..d1ad477 100644
@@ -454,7 +454,7 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
 
 extern void __module_put_and_exit(struct module *mod, long code)
 	__attribute__((noreturn));
-#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code);
+#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code)
 
 #ifdef CONFIG_MODULE_UNLOAD
 unsigned long module_refcount(struct module *mod);
#1 lore raw
Quoted 3 lines · Joe Perches

This semicolon isn't necessary, remove it.

This is a terrible description. Really bad.

First, it just repeats the subject, with more words.

Second, it gives me no indication that you've done a grep to make sure noone is abusing the macro, so I can't apply it without doing that check myself.

Please try again.

Rusty.

Quoted 17 lines
---
 include/linux/module.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/module.h +1 -1
index 05f2447..d1ad477 100644
@@ -454,7 +454,7 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
 
 extern void __module_put_and_exit(struct module *mod, long code)
 	__attribute__((noreturn));
-#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code);
+#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code)
 
 #ifdef CONFIG_MODULE_UNLOAD
 unsigned long module_refcount(struct module *mod);
#2 lore raw
Quoted 6 lines · Rusty Russell
Quoted 3 lines · Joe Perches

This semicolon isn't necessary, remove it.

This is a terrible description. Really bad.

I'd've preferred no description.

Quoted 1 line

First, it just repeats the subject, with more words.

Which others have demanded.

Quoted 3 lines

Second, it gives me no indication that you've done a grep to make sure noone is abusing the macro, so I can't apply it without doing that check myself.

That's a trust issue.
I've done it. It isn't necessary.
The other #define module_put_and_exit in a different #if #else already doesn't have one.

Trust it or not, apply it or not.

Quoted 1 line

Please try again.

No thanks.

cheers, Joe

Quoted 1 line

include/linux/module.h

Quoted 1 line
include/linux/module.h +0 -0

[]

Quoted 9 lines

include/linux/module.h int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *, · line 460

Quoted 9 lines
include/linux/module.h +1 -1
@@ -454,7 +454,7 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
 
 extern void __module_put_and_exit(struct module *mod, long code)
 	__attribute__((noreturn));
-#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code);
+#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code)
 
 #ifdef CONFIG_MODULE_UNLOAD
 unsigned long module_refcount(struct module *mod);
$ git grep -w module_put_and_exit
crypto/algboss.c:       module_put_and_exit(0);
crypto/algboss.c:       module_put_and_exit(0);
fs/cifs/connect.c:      module_put_and_exit(0);
fs/nfs/nfs4state.c:     module_put_and_exit(0);
fs/nfsd/nfssvc.c:       module_put_and_exit(0);
include/linux/module.h:#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code);
include/linux/module.h:#define module_put_and_exit(code) do_exit(code)
net/bluetooth/bnep/core.c:      module_put_and_exit(0);
net/bluetooth/cmtp/core.c:      module_put_and_exit(0);
net/bluetooth/hidp/core.c:      module_put_and_exit(0);
#3 lore raw
Quoted 9 lines · Joe Perches
Quoted 6 lines · Rusty Russell
Quoted 3 lines · Joe Perches

This semicolon isn't necessary, remove it.

This is a terrible description. Really bad.

I'd've preferred no description.

Me too.

Quoted 3 lines
Quoted 1 line

First, it just repeats the subject, with more words.

Which others have demanded.

They're wrong.

Quoted 6 lines
Quoted 3 lines

Second, it gives me no indication that you've done a grep to make sure noone is abusing the macro, so I can't apply it without doing that check myself.

That's a trust issue.
I've done it. It isn't necessary.

WTF? Now you just said it's not necessary, I *know* I can't trust you.

Quoted 2 lines

The other #define module_put_and_exit in a
different #if #else already doesn't have one.

You didn't mention this, and even if you did, it's not sufficient. Some code only ever gets compiled as a module, so it'd never hit the !CONFIG_MODULES case.

Quoted 1 line

Trust it or not, apply it or not.

Now I know when I receive a patch from you I have to check it carefully, because you can't be bothered.

I've fixed your patch, you can find it below.

From: Joe Perches <[email protected]>
Subject: module.h: Remove unnecessary semicolon

[All 8 callers already have semicolons. -- RR]

---
 include/linux/module.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/module.h +1 -1
index 15cd6b1b211e..46e548fd502a 100644
@@ -451,7 +451,7 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
 
 extern void __module_put_and_exit(struct module *mod, long code)
 	__attribute__((noreturn));
-#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code);
+#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code)
 
 #ifdef CONFIG_MODULE_UNLOAD
 unsigned long module_refcount(struct module *mod);
#4 lore raw
Quoted 11 lines · Rusty Russell
Quoted 9 lines · Joe Perches
Quoted 6 lines · Rusty Russell
Quoted 3 lines · Joe Perches

This semicolon isn't necessary, remove it.

This is a terrible description. Really bad.

I'd've preferred no description.

Quoted 7 lines

Me too.

Quoted 3 lines
Quoted 1 line

First, it just repeats the subject, with more words.

Which others have demanded.

They're wrong.

shrug. Can't please everyone.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Second, it gives me no indication that you've done a grep to make sure noone is abusing the macro, so I can't apply it without doing that check myself.

That's a trust issue.
I've done it. It isn't necessary.

WTF? Now you just said it's not necessary, I *know* I can't trust you.

"It" in this case is the grep that I did
prior to sending the patch.

Quoted 6 lines
Quoted 2 lines

The other #define module_put_and_exit in a
different #if #else already doesn't have one.

You didn't mention this, and even if you did, it's not sufficient. Some code only ever gets compiled as a module, so it'd never hit the !CONFIG_MODULES case.

Which would only show there was a latent bug.

Quoted 4 lines
Quoted 1 line

Trust it or not, apply it or not.

Now I know when I receive a patch from you I have to check it carefully, because you can't be bothered.

Sure. If you think so.
Nonetheless, I told you I'd checked it.

Quoted 1 line

I've fixed your patch, you can find it below.

No, not really fixed. You modified the commit log to suit your taste.

cheers, Joe

#5 lore raw
Quoted 9 lines · Joe Perches
Quoted 5 lines · Rusty Russell
Quoted 2 lines · Joe Perches

That's a trust issue.
I've done it. It isn't necessary.

WTF? Now you just said it's not necessary, I *know* I can't trust you.

"It" in this case is the grep that I did
prior to sending the patch.

Hi Joe,

Apologies for my off tone. But I think we got tangled somewhere?

You said "It isn't necessary".

You maintain that grepping the source to find out if you'd broken something "isn't necessary"?

git history shows me you've done lots of these cleanups. I'm pretty sure that's not what you meant.

But as maintainer, it's annoying that I had to check myself. I don't have personal experience in how diligent you are. If you'd just mentioned it, it would have saved me a few minutes and streamlined my workflow immensely.

Providing assurance makes me a happy maintainer. So I modified it because it sets a clear example for others.

I hope that clarifies,
Rusty.

#6 lore raw
Quoted 6 lines · Rusty Russell
Quoted 5 lines · Joe Perches
Quoted 4 lines · Rusty Russell
Quoted 2 lines · Joe Perches

That's a trust issue.
I've done it. It isn't necessary.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

WTF? Now you just said it's not necessary, I *know* I can't trust you.

"It" in this case is the grep that I did
prior to sending the patch.

Hi Joe,

Hi Rusty.

Quoted 8 lines

Apologies for my off tone. But I think we got tangled somewhere? You said "It isn't necessary".

You maintain that grepping the source to find out if you'd broken something "isn't necessary"?

git history shows me you've done lots of these cleanups. I'm pretty sure that's not what you meant.

Yeah, I think we did get a little crossed up there.

No, grep and compiling changes are fundamentals before submitting trivial patches.

What I meant was I had done the grep (and compile allyesconfig/allmodconfig of the files that use module_put_and_exit) before sending the patch.

I don't think those are important details for a commit message.

Dunno if you noticed that I attached the grep results in my 1st reply.

Sometimes I do put details below the separator --- line after the signed-off-by.

(I'll also admit I've sent patches without doing
the appropriate checks and screwed them up. Lessons semi-learned)

Quoted 10 lines

But as maintainer, it's annoying that I had to check myself. I don't have personal experience in how diligent you are. If you'd just mentioned it, it would have saved me a few minutes and streamlined my workflow immensely.

Providing assurance makes me a happy maintainer. So I modified it because it sets a clear example for others.

I hope that clarifies,
Rusty.

No worries. Unfamiliarity also does have its own
set of issues. No problems on my side. Hope you
don't any any this way either.

cheers, Joe