All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Joel Soete" <soete.joel@tiscali.be>
To: "James Bottomley" <jejb@parisc-linux.org>
Cc: parisc-linux@parisc-linux.org
Subject: [parisc-linux] Cast of lvalue warning in the last k 2.4.27-rc2 ...
Date: Tue, 29 Jun 2004 16:00:56 +0200	[thread overview]
Message-ID: <40BDA020000122B5@ocpmta3.freegates.net> (raw)

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

                 reply	other threads:[~2004-06-29 14:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40BDA020000122B5@ocpmta3.freegates.net \
    --to=soete.joel@tiscali.be \
    --cc=jejb@parisc-linux.org \
    --cc=parisc-linux@parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.