[PATCH] serial_ns16550: switch to ns16550_priv structure
Antony Pavlov
antonynpavlov at gmail.com
Fri Aug 5 03:36:41 EDT 2011
On 5 August 2011 10:43, Sascha Hauer <s.hauer at 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 at 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
More information about the barebox
mailing list