public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjanv@redhat.com>
To: Kurt Garloff <garloff@suse.de>,
	Arjan van de Ven <arjanv@redhat.com>,
	akpm@osdl.org, linux-scsi@vger.kernel.org
Subject: Re: fix corruption in qla1280
Date: Mon, 14 Jul 2003 21:01:48 +0000	[thread overview]
Message-ID: <20030714210148.B32473@devserv.devel.redhat.com> (raw)
In-Reply-To: <20030714204315.GL6108@nbkurt.garloff.de>; from garloff@suse.de on Mon, Jul 14, 2003 at 10:43:15PM +0200


On Mon, Jul 14, 2003 at 10:43:15PM +0200, Kurt Garloff wrote:
> Arjan,
> 
> On Mon, Jul 14, 2003 at 09:24:37AM +0000, Arjan van de Ven wrote:
> > In C, doing >> 32 on a 32 bit wide variable is undefined behavior, and the
> > code that gets generated by gcc (using the cpu shr) effectively means that
> > it's a nop. The patch below to qla1280.c fixes such a case, doing
> > >>16 twice looks more expensive but gcc optimizes it out while keeping
> > correct behavior.
> 
> If it's really a 32 bit variable, 
> #define pci_dma_hi32(a)		(0)
> would be correct. Shifting a 32bit value 32times to the right is just 0.
> What do I miss?

it's only a 32 bit variable on 32 bit platforms
(or rather, when dma_addr_t is 32 bit.. the ifdefs for that get evil)

      reply	other threads:[~2003-07-14 20:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-14  9:24 fix corruption in qla1280 Arjan van de Ven
2003-07-14 20:43 ` Kurt Garloff
2003-07-14 21:01   ` Arjan van de Ven [this message]

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=20030714210148.B32473@devserv.devel.redhat.com \
    --to=arjanv@redhat.com \
    --cc=akpm@osdl.org \
    --cc=garloff@suse.de \
    --cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox