All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] Cast of lvalue warning in the last k 2.4.27-rc2 ...
@ 2004-06-29 14:00 Joel Soete
  0 siblings, 0 replies; only message in thread
From: Joel Soete @ 2004-06-29 14:00 UTC (permalink / raw)
  To: James Bottomley; +Cc: parisc-linux

Hello James,

If still some interest for 2.4 I just backport some 2.6 stuff for your dr=
iver
53c700 to cleanup '... lvalues is deprecated warning':
--- linux-2.4.27-rc2-pa4mm/drivers/scsi/53c700.h.Orig	2004-06-29 10:24:01=
.766864352
+0200
+++ linux-2.4.27-rc2-pa4mm/drivers/scsi/53c700.h	2004-06-29 10:30:27.6472=
01624
+0200
@@ -109,18 +109,25 @@
 static inline void
 NCR_700_set_SXFER(Scsi_Device *SDp, __u8 sxfer)
 {
-	((unsigned long)SDp->hostdata) &=3D 0xffffff00;
-	((unsigned long)SDp->hostdata) |=3D sxfer & 0xff;
+	unsigned long l =3D (unsigned long)SDp->hostdata;
+
+	l &=3D 0xffffff00;
+	l |=3D sxfer & 0xff;
+	SDp->hostdata =3D (void *)l;
 }
-static inline __u8 NCR_700_get_SXFER(Scsi_Device *SDp)
+static inline __u8
+NCR_700_get_SXFER(Scsi_Device *SDp)
 {
 	return (((unsigned long)SDp->hostdata) & 0xff);
 }
 static inline void
 NCR_700_set_depth(Scsi_Device *SDp, __u8 depth)
 {
-	((unsigned long)SDp->hostdata) &=3D 0xffff00ff;
-	((unsigned long)SDp->hostdata) |=3D (0xff00 & (depth << 8));
+	unsigned long l =3D (unsigned long)SDp->hostdata;
+
+	l &=3D 0xffff00ff;
+	l |=3D (0xff00 & (depth << 8));
+	SDp->hostdata =3D (void *)l;
 }
 static inline __u8
 NCR_700_get_depth(Scsi_Device *SDp)
@@ -140,12 +147,18 @@
 static inline void
 NCR_700_set_flag(Scsi_Device *SDp, __u32 flag)
 {
-	((unsigned long)SDp->hostdata) |=3D (flag & 0xffff0000);
+	unsigned long l =3D (unsigned long)SDp->hostdata;
+
+	l |=3D (flag & 0xffff0000);
+	SDp->hostdata =3D (void *)l;
 }
 static inline void
 NCR_700_clear_flag(Scsi_Device *SDp, __u32 flag)
 {
-	((unsigned long)SDp->hostdata) &=3D ~(flag & 0xffff0000);
+	unsigned long l =3D (unsigned long)SDp->hostdata;
+
+	l &=3D ~(flag & 0xffff0000);
+	SDp->hostdata =3D (void *)l;
 }
 
 /* These represent the Nexus hashing functions.  A Nexus in SCSI terms
=3D=3D=3D=3D=3D=3D=3D=3D=3D><=3D=3D=3D=3D=3D=3D=3D=3D=3D

hth,
    Joel

PS: btw I also have similar small patches for upstream (crc32.c, readdir.=
c,
fbcon.c, ...). Do you know who can help me to submit it to Marcelo (I alr=
eady
try directly but no audience $) )

-------------------------------------------------------------------------=
--
NEW: Tiscali ADSL LIGHT, 28,95 EUR/mois, c'est le moment de faire le pas!=

http://reg.tiscali.be/default.asp?lg=3Dfr




_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-29 14:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-29 14:00 [parisc-linux] Cast of lvalue warning in the last k 2.4.27-rc2 Joel Soete

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.