mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] serial_ns16550: switch to ns16550_priv structure
Date: Fri, 5 Aug 2011 11:36:41 +0400	[thread overview]
Message-ID: <CAA4bVAFQhqVOAibqLHwb3wZiZAtmbdfKn+k2rHUuqU16n4BCtg@mail.gmail.com> (raw)
In-Reply-To: <20110805064355.GB31404@pengutronix.de>

On 5 August 2011 10:43, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> Antony, Jean,
>
> Please stop fighting battles, there's enough work for all of us ;)

;)))

I think Jean-Christophe's patch and my patch are just the same.
The difference is in details, naming, formatting etc.
IMHO in some points Jean-Christophe's patch is better,
in other point my patch is better.

I don't like 'unsigned long' type for pointer in 'struct
NS16550_plat'. (see
http://lists.infradead.org/pipermail/barebox/2011-July/003957.html).
But I think, that we must change it in separate patch.

> On Thu, Aug 04, 2011 at 06:35:08PM +0400, Antony Pavlov wrote:
>> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
>> ---
>>  drivers/serial/serial_ns16550.c |  181 +++++++++++++++++++++++----------------
>>  drivers/serial/serial_ns16550.h |   16 ++++
>>  2 files changed, 123 insertions(+), 74 deletions(-)
>>
>> diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
>> index 36d39cd..a9f565e 100644
>> --- a/drivers/serial/serial_ns16550.c
>> +++ b/drivers/serial/serial_ns16550.c
>> @@ -48,6 +48,42 @@
>>
>>  /*********** Private Functions **********************************/
>>
>> +static unsigned int ns16550_generic_readb(unsigned long base,
>> +             unsigned char reg_idx)
>> +{
>> +     return readb((char *)base + reg_idx);
>> +}
>
> Try building this with sparse enabled (make C=1):
>
>  CHECK   drivers/serial/serial_ns16550.c
> drivers/serial/serial_ns16550.c:54:16: warning: incorrect type in argument 1 (different address spaces)
> drivers/serial/serial_ns16550.c:54:16:    expected void const volatile [noderef] <asn:2>*<noident>
> drivers/serial/serial_ns16550.c:54:16:    got char *
...
> drivers/serial/serial_ns16550.c:84:9:    expected void const volatile [noderef] <asn:2>*<noident>
> drivers/serial/serial_ns16550.c:84:9:    got char *

Yeahhhh, I got many error messages from sparse, but they are very different!

I use ARCH=mips.

Do you use ARCH=arm, isn't it?

:)))

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2011-08-05  7:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 14:35 Antony Pavlov
2011-08-05  6:43 ` Sascha Hauer
2011-08-05  7:36   ` Antony Pavlov [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=CAA4bVAFQhqVOAibqLHwb3wZiZAtmbdfKn+k2rHUuqU16n4BCtg@mail.gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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