Skip to contentSkip to conversation

"const static" vs "static const" in nfs4

PATCH In review Jesper Juhl 6 participants 8 messages Feb 24, 2006 – Feb 25, 2006 NFS client

lore
Share & tools
lore
#0 lore raw

PATCH 12/13 "const static" vs "static const" in nfs4

My previous "const static" vs "static const" cleanup missed a single case, patch below takes care of it.

---

 fs/nfs/nfs4proc.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
fs/nfs/nfs4proc.c +1 -1
@@ -2958,7 +2958,7 @@ static void nfs4_delegreturn_release(voi
 	kfree(calldata);
 }
 
-const static struct rpc_call_ops nfs4_delegreturn_ops = {
+static const struct rpc_call_ops nfs4_delegreturn_ops = {
 	.rpc_call_prepare = nfs4_delegreturn_prepare,
 	.rpc_call_done = nfs4_delegreturn_done,
 	.rpc_release = nfs4_delegreturn_release,
#1 lore raw
Quoted 3 lines · Jesper Juhl

My previous "const static" vs "static const" cleanup missed a single case, patch below takes care of it.

I can shepherd that in for 2.6.17 (unless Andrew wants to make it a 2.6.16 priority?).

Cheers,
Trond

#2 lore raw
Quoted 8 lines · Trond Myklebust
Quoted 3 lines · Jesper Juhl

My previous "const static" vs "static const" cleanup missed a single case, patch below takes care of it.

I can shepherd that in for 2.6.17 (unless Andrew wants to make it a 2.6.16 priority?).

No need for that. It's just something that ICC complains about "storage class not being first" - gcc doesn't care.

2.6.17 is fine, no need to rush that one.

Just a small thing that might as well be done :)

--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

#3 lore raw
Quoted 2 lines · Jesper Juhl

No need for that. It's just something that ICC complains about "storage class not being first" - gcc doesn't care.

Neither does C99, so ICC really should either STFU or make that warning independent from the rest and possible to turn off...

#4 lore raw
Quoted 7 lines · Al Viro
Quoted 2 lines · Jesper Juhl

No need for that. It's just something that ICC complains about "storage class not being first" - gcc doesn't care.

Neither does C99, so ICC really should either STFU or make that warning independent from the rest and possible to turn off...

I agree.

But, it's harmless to change, and a patch is already in mainline a while back that changes all occourences except this one (i simly forgot one), so might as well get the last one and then it's a non-issue.

--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

#5 lore raw
In reply to Al Viro
Quoted 6 lines · Al Viro
Quoted 2 lines · Jesper Juhl

No need for that. It's just something that ICC complains about "storage class not being first" - gcc doesn't care.

Neither does C99, so ICC really should either STFU or make that warning independent from the rest and possible to turn off...

C99 does deprecate "const static":

6.11.5 Storage-class specifiers
1 The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an obsolescent feature.

Signature · 3 lines
Ben Pfaff 
email: [email protected]
web: http://benpfaff.org
#6 lore raw
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

No need for that. It's just something that ICC complains about "storage class not being first" - gcc doesn't care.

Neither does C99, so ICC really should either STFU or make that warning independent from the rest and possible to turn off...

Quoted 7 lines

C99 does deprecate "const static":

6.11.5 Storage-class specifiers
1 The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an obsolescent feature.

Hm, how about "inline"? GCC also just keeps quiet when a function (or prototype) is written as:

inline static int foo(int bar);

Jan Engelhardt

#7 lore raw
Quoted 4 lines · Jan Engelhardt

Hm, how about "inline"? GCC also just keeps quiet when a function (or prototype) is written as:

inline static int foo(int bar);

"iniline" is not a storage-class specifier, thus it should be handled like "const" etc.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."