make storage class first in pwc-kiara.h
Subsystems (3)
PATCH 1/1 make storage class first in pwc-kiara.h
G'day list
ICC complains about : Remark #82: Storage Class is not First.
http://linuxicc.sourceforge.net/
@ line 40 & 41 of pwc-kiara.h.
The patch below re-orders the modifiers to make extern before const.
drivers/usb/media/pwc/pwc-kiara.h renamed from drivers/usb/media/pwc/pwc-kiara.h.orig +2 -2
@@ -37,8 +37,8 @@ struct Kiara_table_entry unsigned char mode[12]; /* precomputed mode settings for cam */ }; -const extern struct Kiara_table_entry Kiara_table[PSZ_MAX ][6 ][4 ]; -const extern unsigned int KiaraRomTable[8 ][2 ][16 ][8 ]; +extern const struct Kiara_table_entry Kiara_table[PSZ_MAX ][6 ][4 ]; +extern const unsigned int KiaraRomTable[8 ][2 ][16 ][8 ];#endif
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
PATCH 1/1 Make storage class first in machine_kexec.c
G'day list,
from http://linuxicc.sourceforge.net/
ICC complains about :Storage Class is not First
@ line 136 & 138 of machine_kexec.c
The patch below just alters the order of the modifiers to make extern first.
arch/i386/kernel/machine_kexec.c renamed from arch/i386/kernel/machine_kexec.c.orig +2 -2
@@ -133,9 +133,9 @@ typedef asmlinkage NORET_TYPE void (*relunsigned long start_address, unsigned int has_pae) ATTRIB_NORET; -const extern unsigned char relocate_new_kernel[]; +extern const unsigned char relocate_new_kernel[];extern void relocate_new_kernel_end (void ); -const extern unsigned int relocate_new_kernel_size; +extern const unsigned int relocate_new_kernel_size;/* * A architecture hook called to validate the
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
PATCH 1/1 make storage class first in pwc-timon.h
In reply to Darren Jenkins\G'day list
from http://linuxicc.sourceforge.net/
ICC complains about : Storage Class is not First
@ line 55 & 56 of pwc-timon.h
This patch just re-orders the modifiers to ensure extern is first
drivers/usb/media/pwc/pwc-timon.h renamed from drivers/usb/media/pwc/pwc-timon.h.orig +2 -2
@@ -52,8 +52,8 @@ struct Timon_table_entry unsigned char mode[13]; /* precomputed mode settings for cam */ }; -const extern struct Timon_table_entry Timon_table[PSZ_MAX ][6 ][4 ]; -const extern unsigned int TimonRomTable [16 ][2 ][16 ][8 ]; +extern const struct Timon_table_entry Timon_table[PSZ_MAX ][6 ][4 ]; +extern const unsigned int TimonRomTable [16 ][2 ][16 ][8 ];#endif
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
PATCH 1/1 make storage class first in nfs4proc.c
In reply to Darren Jenkins\G'day list
from http://linuxicc.sourceforge.net/
ICC complains about : Storage Class is not First
@ line 2961 of nfs4proc.c
The patch below just re-orders the modifiers so static is first.
fs/nfs/nfs4proc.c renamed from fs/nfs/nfs4proc.c.orig +1 -1
@@ -2958,7 +2958,7 @@ static void nfs4_delegreturn_release(voikfree (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,
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 9 lines · Darren Jenkins\
G'day list
ICC complains about : Remark #82: Storage Class is not First.
http://linuxicc.sourceforge.net/
@ line 40 & 41 of
pwc-kiara.h.The patch below re-orders the modifiers to make extern before const.
Is that a C-language standard requirement? IOW, that would be a reason to make such a change.
Quoted 14 lines
Signed-off-by Darren Jenkins <[email protected]>drivers/usb/media/pwc/pwc-kiara.h renamed from drivers/usb/media/pwc/pwc-kiara.h.orig +2
-2@@ -37,8 +37,8 @@ struct Kiara_table_entry unsigned char mode[12]; /* precomputed mode settings for cam */ }; -const extern struct Kiara_table_entry Kiara_table[PSZ_MAX ][6 ][4 ]; -const extern unsigned int KiaraRomTable[8 ][2 ][16 ][8 ]; +extern const struct Kiara_table_entry Kiara_table[PSZ_MAX ][6 ][4 ]; +extern const unsigned int KiaraRomTable[8 ][2 ][16 ][8 ];#endif
Signature · 1 line
~Randy
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 8 lines · Randy.Dunlap
Quoted 6 lines · Darren Jenkins\
G'day list
ICC complains about : Remark #82: Storage Class is not First.
Quoted 7 lines
Quoted 3 lines
@ line 40 & 41 of
pwc-kiara.h.The patch below re-orders the modifiers to make extern before const.
Is that a C-language standard requirement? IOW, that would be a reason to make such a change.
...
It's a coding style issue - different orders of the modifiers only cause confusion.
Quoted 1 line
~Randy
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 11 lines · Adrian Bunk
Quoted 10 lines · Randy.Dunlap
Quoted 8 lines · Darren Jenkins\
G'day list
ICC complains about : Remark #82: Storage Class is not First.
http://linuxicc.sourceforge.net/
@ line 40 & 41 of
pwc-kiara.h.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
The patch below re-orders the modifiers to make extern before const.
Is that a C-language standard requirement? IOW, that would be a reason to make such a change.
...It's a coding style issue - different orders of the modifiers only cause confusion.
Maybe, but that wasn't his justification for the patch.
Signature · 1 line
~Randy
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 6 lines · Randy.Dunlap
Quoted 4 lines · Darren Jenkins\
G'day list
ICC complains about : Remark #82: Storage Class is not First.
Quoted 8 lines
Quoted 5 lines
http://linuxicc.sourceforge.net/
@ line 40 & 41 of
pwc-kiara.h.The patch below re-orders the modifiers to make extern before const.
Is that a C-language standard requirement? IOW, that would be a reason to make such a change.
OK I don't have a copy of the standard, but after a hunt through the draft copy I was pointed to earlier
(http://wwwold.dkuug.dk/jtc1/sc22/open/n2794/)
I found this under the grammar section.
(page 400)
(6.7) declaration-specifiers:
declaration-specifiers:
storage-class-specifier declaration-specifiersopt type-specifier declaration-specifiersopt type-qualifier declaration-specifiersopt function-specifier declaration-specifiersopt
Which shows (surprisingly) that it isn't a C-standard requirement. (Damn I thought it was)
So I guess It is only a coding style issue.
Not putting the storage class specifier first:
is confusing;
dilutes the logical meaning of the specifier; is only used in 4 files (looking at ICC warnings); generates warnings on ICC;
is safe to re-order in non-pointer declarations.
So I guess for these reasons the patches should be applied.
Quoted 9 lines
Quoted 9 lines
Signed-off-by Darren Jenkins <[email protected]>drivers/usb/media/pwc/pwc-kiara.h renamed from drivers/usb/media/pwc/pwc-kiara.h.orig +0
-0@@ -37,8 +37,8 @@ struct Kiara_table_entryunsigned char mode[12 ];/* precomputed mode settings for cam */ };
Quoted 7 lines
drivers/usb/media/pwc/pwc-kiara.h struct Kiara_table_entry · line 43
Quoted 6 lines
drivers/usb/media/pwc/pwc-kiara.h renamed from drivers/usb/media/pwc/pwc-kiara.h.orig +2
-2-const extern struct Kiara_table_entry Kiara_table[PSZ_MAX ][6 ][4 ]; -const extern unsigned int KiaraRomTable[8 ][2 ][16 ][8 ]; +extern const struct Kiara_table_entry Kiara_table[PSZ_MAX ][6 ][4 ]; +extern const unsigned int KiaraRomTable[8 ][2 ][16 ][8 ];#endif
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 35 lines · On Sat, 18 Feb 2006 14:46:14 +1100 Darren Jenkins\\ wrote:
Quoted 6 lines · Randy.Dunlap
Quoted 4 lines · Darren Jenkins\
G'day list
ICC complains about : Remark #82: Storage Class is not First.
Quoted 8 lines
Quoted 5 lines
http://linuxicc.sourceforge.net/
@ line 40 & 41 of
pwc-kiara.h.The patch below re-orders the modifiers to make extern before const.
Is that a C-language standard requirement? IOW, that would be a reason to make such a change.
OK I don't have a copy of the standard, but after a hunt through the draft copy I was pointed to earlier
(http://wwwold.dkuug.dk/jtc1/sc22/open/n2794/)
I found this under the grammar section.
(page 400)(6.7) declaration-specifiers:
declaration-specifiers:
storage-class-specifier declaration-specifiersopt type-specifier declaration-specifiersopt type-qualifier declaration-specifiersopt function-specifier declaration-specifiersoptWhich shows (surprisingly) that it isn't a C-standard requirement. (Damn I thought it was)
So I guess It is only a coding style issue.
Quoted 8 lines
Not putting the storage class specifier first:
is confusing;
dilutes the logical meaning of the specifier; is only used in 4 files (looking at ICC warnings); generates warnings on ICC;
is safe to re-order in non-pointer declarations.So I guess for these reasons the patches should be applied.
OK, thank you for doing that.
---
~Randy
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors