Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@mandrakesoft.com>
To: Pete Popov <ppopov@mvista.com>
Cc: Linux MIPS mailing list <linux-mips@linux-mips.org>
Subject: Re: Success! Full CardBus/EXCA on PCI->Cardbus Bridge + DbAU1500
Date: Fri, 21 Mar 2003 21:54:20 +0100	[thread overview]
Message-ID: <86n0jophj7.fsf@trasno.mitica> (raw)
In-Reply-To: <1048273049.14211.56.camel@zeus.mvista.com> (Pete Popov's message of "21 Mar 2003 10:57:29 -0800")

>>>>> "pete" == Pete Popov <ppopov@mvista.com> writes:

Hi
>> Index: io.h
>> ===================================================================
>> RCS file: /home/cvs/linux/include/asm-mips/io.h,v
>> retrieving revision 1.29.2.20
>> diff -u -r1.29.2.20 io.h
>> --- io.h        25 Feb 2003 22:03:12 -0000      1.29.2.20
>> +++ io.h        14 Mar 2003 21:50:14 -0000
>> @@ -332,12 +332,25 @@
>> SLOW_DOWN_IO;                                                   \
>> } while(0)
>> °
>> -#define outw_p(val,port)                                               \
>> -do {                                                                   \
>> -       *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) = \
>> -               __ioswab16(val);                                        \
>> -       SLOW_DOWN_IO;                                                   \
>> -} while(0)
>> +/* baitisj */
>> +static inline u16 outw_p(u16 val, unsigned long port)
>> +{
>> +    register u16 retval;
>> +    do {
>> +        retval = *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) =
>> +            __ioswab16(val);
>> +        SLOW_DOWN_IO;
>> +    } while(0);
>> +    return retval;
>> +}

static inline u16 outw_p(u16 val, unsigned long port)
{
        u16 retval; 
        retval = *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) =
               __ioswab16(val);
               SLOW_DOWN_IO;
        return retval;
}

while do construct inside a function shouldn't be needed when you have
a function.  And register is obsolete :)

Later, Juan.

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

      reply	other threads:[~2003-03-21 20:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-14 20:23 Success! Full CardBus/EXCA on PCI->Cardbus Bridge + DbAU1500 Jeff Baitis
2003-03-14 21:34 ` Pete Popov
2003-03-14 21:57   ` Jeff Baitis
2003-03-21 18:57     ` Pete Popov
2003-03-21 20:54       ` Juan Quintela [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=86n0jophj7.fsf@trasno.mitica \
    --to=quintela@mandrakesoft.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ppopov@mvista.com \
    /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