remove implicit sign bit on single bit
Subsystems (2)
PATCH 1/1 remove implicit sign bit on single bit
Hi,
This is my first patch so I hope I get everything right.
http://linuxicc.sourceforge.net/
Warnings/Error while compiling with Intel C Compiler
Says there is a Warning #108: implictly-signed bit field of length 1
in sound/oss/viacXXX_audio.c @ line number 310
looking at the code it seems like it is supposed to be a single bit field used as a lock. This just makes it unsigned.
--- linux-2.6.16-rc2/sound/oss/via82cxxx_audio.c.orig 2006-02-08
13:43:27.000000000 +1100
+++ linux-2.6.16-rc2/sound/oss/via82cxxx_audio.c 2006-02-08
13:45:39.000000000 +1100
@@ -306,9 +306,8 @@ struct via_info {
unsigned intmask: 1; /* Needs int bits */
unsigned sixchannel: 1; /* 8233/35 with 6 channel support */
unsigned volume: 1;
+ unsigned locked_rate : 1;
- int locked_rate : 1;
-
int mixer_vol; /* 8233/35 volume - not yet implemented */
struct semaphore syscall_sem;
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 3 lines · Darren Jenkins
Hi,
This is my first patch so I hope I get everything right.
Two things.
Quoted 11 lines
http://linuxicc.sourceforge.net/
Warnings/Error while compiling with Intel C Compiler
Says there is a Warning #108: implictly-signed bit field of length 1
in
sound/oss/viacXXX_audio.c@ line number 310looking at the code it seems like it is supposed to be a single bit field used as a lock. This just makes it unsigned.
Quoted 7 lines
Signed-off-by Darren Jenkins <[email protected]>--- linux-2.6.16-rc2/sound/oss/via82cxxx_audio.c.orig 2006-02-08
13:43:27.000000000 +1100
+++linux-2.6.16-rc2/sound/oss/via82cxxx_audio.c2006-02-08
13:45:39.000000000 +1100
Looks like this part was line-wrapped, but the patch was not. Strange.
And OSS is deprecated. Don't bother patching it.
Thanks,
Nish
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 6 lines · On Wed, 08 Feb 2006 15:17:27 +1100 Darren Jenkins\\ wrote:
Hi,
This is my first patch so I hope I get everything right.
Quoted 8 lines
Warnings/Error while compiling with Intel C Compiler
Says there is a Warning #108: implictly-signed bit field of length 1
in
sound/oss/viacXXX_audio.c@ line number 310looking at the code it seems like it is supposed to be a single bit field used as a lock. This just makes it unsigned.
BTW, sparse also complains about this one (and other problems in general and "signed 1-bit fields" in many places):sound/oss/via82cxxx_audio.c:310:21: error: dubious one-bit signed bitfield
Quoted 8 lines
Signed-off-by Darren Jenkins <[email protected]>--- linux-2.6.16-rc2/sound/oss/via82cxxx_audio.c.orig 2006-02-08
13:43:27.000000000 +1100
+++linux-2.6.16-rc2/sound/oss/via82cxxx_audio.c2006-02-08
13:45:39.000000000 +1100
Review struct via_info { · line 313
Quoted 10 lines
(quoted diff) +1
-2@@ -306,9 +306,8 @@ struct via_info { unsigned intmask: 1; /* Needs int bits */ unsigned sixchannel: 1; /* 8233/35 with 6 channel support */ unsigned volume: 1; + unsigned locked_rate : 1; - int locked_rate : 1; - int mixer_vol; /* 8233/35 volume - not yet implemented */ struct semaphore syscall_sem;
---
~Randy
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 1 line · Nishanth Aravamudan
And OSS is deprecated. Don't bother patching it.
Oh, come on! devfs is still not removed.
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 4 lines · Alexey Dobriyan
Quoted 1 line · Nishanth Aravamudan
And OSS is deprecated. Don't bother patching it.
Oh, come on! devfs is still not removed.
Have you tried to use it lately? You might find out that more of it is gone than you expected... :)
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 4 lines · Alexey Dobriyan
Quoted 1 line · Nishanth Aravamudan
And OSS is deprecated. Don't bother patching it.
Oh, come on! devfs is still not removed.
Fair enough; but I believe time is better spent patching subsystems which matter. My opinion, though, so if you're willing to push them upstream, then they are fine (and I think Darren figured out the line-wrapping).
Thanks,
Nish
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 7 lines · Nishanth Aravamudan
Fair enough; but I believe time is better spent patching subsystems which matter. My opinion, though, so if you're willing to push them upstream, then they are fine (and I think Darren figured out the line-wrapping).
Thanks,
Nish
Well I'm not too bothered about it either way, but I figure that if people are still building/using it why not apply the patch? Anyway now I have figured out the line-wrapping I guess I had better do a re-send.
sound/oss/via82cxxx_audio.c renamed from sound/oss/via82cxxx_audio.c.orig +1 -2
@@ -306,9 +306,8 @@ struct via_info { unsigned intmask: 1; /* Needs int bits */ unsigned sixchannel: 1; /* 8233/35 with 6 channel support */ unsigned volume: 1; + unsigned locked_rate : 1; - int locked_rate : 1; -int mixer_vol;/* 8233/35 volume - not yet implemented */ struct semaphore syscall_sem;
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
sound/oss/via82cxxx_audio.c struct via_info { · line 313
Quoted 13 lines · Darren Jenkins
sound/oss/via82cxxx_audio.c renamed from sound/oss/via82cxxx_audio.c.orig +1
-2@@ -306,9 +306,8 @@ struct via_info { unsigned intmask: 1; /* Needs int bits */ unsigned sixchannel: 1; /* 8233/35 with 6 channel support */ unsigned volume: 1; + unsigned locked_rate : 1; - int locked_rate : 1; -int mixer_vol;/* 8233/35 volume - not yet implemented */ struct semaphore syscall_sem;
These patches are OK, except
unsigned int a:1;
is preferred.
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors