From: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] gcc-4.0 allyesconfig fixes
Date: Fri, 21 Jan 2005 14:13:12 +0000 [thread overview]
Message-ID: <20050121141312.GD22673@ens-lyon.fr> (raw)
In-Reply-To: <20050120220402.GB22673@ens-lyon.fr>
[-- Attachment #1: Type: text/plain, Size: 961 bytes --]
On Fri, Jan 21, 2005 at 10:10:39AM +0100, walter harms wrote:
> Hi Benoit,
> i do not think this will work. Numbers are int and i already got some
> strange effects because of that (perhaps gcc 4.0 will handle this better
> but dont count on it). please use: ret= ret << 32L;
>
> on the other side: does readl() return long() ? perhaps it can return
> a real 64bit value on a 64bit box ? then whole code is broken.
>
> re,
> walter
>
Is the following patch better ?
I checked the return type of readl, it is a 32bit integer.
--- linux-clean/drivers/net/s2io.h 2005-01-20 22:13:01.000000000 +0100
+++ linux-2.6-mm-test/drivers/net/s2io.h 2005-01-21 14:01:21.000000000 +0100
@@ -738,9 +738,9 @@ typedef struct s2io_nic {
#ifndef readq
static inline u64 readq(void __iomem *addr)
{
- u64 ret = readl(addr + 4);
- (u64) ret <<= 32;
- (u64) ret |= readl(addr);
+ u64 ret = (u64) readl(addr + 4);
+ ret <<= 32;
+ ret |= (u64) readl(addr);
return ret;
}
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2005-01-21 14:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-20 22:04 [KJ] [PATCH] gcc-4.0 allyesconfig fixes Benoit Boissinot
2005-01-21 9:10 ` walter harms
2005-01-21 10:08 ` [KJ] [2.6 patch] generic_serial.h: kill incorrect gs_debug reference Adrian Bunk
2005-01-21 10:08 ` Adrian Bunk
2005-01-21 14:13 ` Benoit Boissinot [this message]
2005-01-21 15:45 ` [KJ] [PATCH] gcc-4.0 allyesconfig fixes Matthew Wilcox
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=20050121141312.GD22673@ens-lyon.fr \
--to=benoit.boissinot@ens-lyon.org \
--cc=kernel-janitors@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 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.