Skip to contentSkip to conversation

sbp2: make 1bit bitfield unsigned

PATCH In review Luca Tettamanti 4 participants 4 messages Nov 15, 2006

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

PATCH 1/1 sbp2: make 1bit bitfield unsigned

A signed single-bit bitfield doesn't make much sense. Make it unsigned.

---

 drivers/ieee1394/sbp2.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ieee1394/sbp2.h +1 -1
index abbe48e..cf416c5 100644
@@ -322,7 +322,7 @@ struct scsi_id_instance_data {
 	/*
 	 * Waitqueue flag for logins, reconnects, logouts, query logins
 	 */
-	int access_complete:1;
+	unsigned int access_complete:1;
 
 	/*
 	 * Pool of command orbs, so we can have more than overlapped command per id

Luca

Signature · 2 lines
Quando un uomo porta dei fiori a sua moglie senza motivo, 
un motivo c'e`.
#1 lore raw
Quoted 1 line · Luca Tettamanti

A signed single-bit bitfield doesn't make much sense. Make it unsigned.

...
Committed to linux1394-2.6.git.

Signature · 3 lines
Stefan Richter
-=====-=-==- =-== -====
http://arcgraph.de/sr/
#2 lore raw

Hello,

Quoted 4 lines
Quoted 1 line · Luca Tettamanti

A signed single-bit bitfield doesn't make much sense. Make it unsigned.

...
Committed to linux1394-2.6.git.

There is a few more. Hopefuly 'grep + my eyes' caught them all. The patch is against 2.6.19-rc5-mm2.

drivers/isdn/hisax/isdnhdlc.h +4 -4
diff -upr linux-2.6.19-rc5-mm2-a/drivers/isdn/hisax/isdnhdlc.h linux-2.6.19-rc5-mm2-b/drivers/isdn/hisax/isdnhdlc.h
@@ -41,10 +41,10 @@ struct isdnhdlc_vars {
 	unsigned char shift_reg;
 	unsigned char ffvalue;
 
-	int data_received:1; 	// set if transferring data
-	int dchannel:1; 	// set if D channel (send idle instead of flags)
-	int do_adapt56:1; 	// set if 56K adaptation
-        int do_closing:1; 	// set if in closing phase (need to send CRC + flag
+	unsigned int data_received:1; 	// set if transferring data
+	unsigned int dchannel:1; 	// set if D channel (send idle instead of flags)
+	unsigned int do_adapt56:1; 	// set if 56K adaptation
+	unsigned int do_closing:1; 	// set if in closing phase (need to send CRC + flag
 };
 
 
drivers/media/dvb/frontends/l64781.c +1 -1
diff -upr linux-2.6.19-rc5-mm2-a/drivers/media/dvb/frontends/l64781.c linux-2.6.19-rc5-mm2-b/drivers/media/dvb/frontends/l64781.c
@@ -36,7 +36,7 @@ struct l64781_state {
 	struct dvb_frontend frontend;
 
 	/* private demodulator data */
-	int first:1;
+	unsigned int first:1;
 };
 
 #define dprintk(args...) \
sound/arm/sa11xx-uda1341.c +1 -1
diff -upr linux-2.6.19-rc5-mm2-a/sound/arm/sa11xx-uda1341.c linux-2.6.19-rc5-mm2-b/sound/arm/sa11xx-uda1341.c
@@ -125,7 +125,7 @@ struct audio_stream {
 #else
 	dma_regs_t *dma_regs;	/* points to our DMA registers */
 #endif
-	int active:1;		/* we are using this stream for transfer now */
+	unsigned int active:1;	/* we are using this stream for transfer now */
 	int period;		/* current transfer period */
 	int periods;		/* current count of periods registerd in the DMA engine */
 	int tx_spin;		/* are we recoding - flag used to do DMA trans. for sync */
Signature · 3 lines
Regards,

	Mariusz Kozlowski
#3 lore raw
Quoted 9 lines · On Thu, 16 Nov 2006 00:04:24 +0100 Mariusz Kozlowski wrote:

Hello,

Quoted 4 lines
Quoted 1 line · Luca Tettamanti

A signed single-bit bitfield doesn't make much sense. Make it unsigned.

...
Committed to linux1394-2.6.git.

There is a few more. Hopefuly 'grep + my eyes' caught them all. The patch is against 2.6.19-rc5-mm2.

'sparse' will catch them for sure.

ISDN, dvb, alsa patches need to be sent to different maintainers...

'diffstat -p1 -w70' output would be nice.

Quoted 47 lines

diff -upr linux-2.6.19-rc5-mm2-a/drivers/isdn/hisax/isdnhdlc.h linux-2.6.19-rc5-mm2-b/drivers/isdn/hisax/isdnhdlc.h

drivers/isdn/hisax/isdnhdlc.h +4 -4
@@ -41,10 +41,10 @@ struct isdnhdlc_vars {
 	unsigned char shift_reg;
 	unsigned char ffvalue;
 
-	int data_received:1; 	// set if transferring data
-	int dchannel:1; 	// set if D channel (send idle instead of flags)
-	int do_adapt56:1; 	// set if 56K adaptation
-        int do_closing:1; 	// set if in closing phase (need to send CRC + flag
+	unsigned int data_received:1; 	// set if transferring data
+	unsigned int dchannel:1; 	// set if D channel (send idle instead of flags)
+	unsigned int do_adapt56:1; 	// set if 56K adaptation
+	unsigned int do_closing:1; 	// set if in closing phase (need to send CRC + flag
 };
 
 

diff -upr linux-2.6.19-rc5-mm2-a/drivers/media/dvb/frontends/l64781.c linux-2.6.19-rc5-mm2-b/drivers/media/dvb/frontends/l64781.c

drivers/media/dvb/frontends/l64781.c +1 -1
@@ -36,7 +36,7 @@ struct l64781_state {
 	struct dvb_frontend frontend;
 
 	/* private demodulator data */
-	int first:1;
+	unsigned int first:1;
 };
 
 #define dprintk(args...) \

diff -upr linux-2.6.19-rc5-mm2-a/sound/arm/sa11xx-uda1341.c linux-2.6.19-rc5-mm2-b/sound/arm/sa11xx-uda1341.c

sound/arm/sa11xx-uda1341.c +1 -1
@@ -125,7 +125,7 @@ struct audio_stream {
 #else
 	dma_regs_t *dma_regs;	/* points to our DMA registers */
 #endif
-	int active:1;		/* we are using this stream for transfer now */
+	unsigned int active:1;	/* we are using this stream for transfer now */
 	int period;		/* current transfer period */
 	int periods;		/* current count of periods registerd in the DMA engine */
 	int tx_spin;		/* are we recoding - flag used to do DMA trans. for sync */
Signature · 1 line
-- 

---
~Randy