lkml.org 
[lkml]   [2006]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] serial: serial_txx9 driver update
Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
>
> serial_txx9_verify_port(struct uart_port *port, struct serial_struct *ser)
> {
> - if (ser->irq < 0 ||
> - ser->baud_base < 9600 || ser->type != PORT_TXX9)
> + unsigned long new_port = (unsigned long)ser->port +
> + ((unsigned long)ser->port_high << ((sizeof(long) - sizeof(int)) * 8));

Are you sure about this part? Shifting something left by sizeof(something)
seems very strange. It'll give different results on 64-bit machines for
the same hardware. Are you sure it wasn't supposed to be an addition?

If this was indeed intended then can you please explain why?

If it was supposed to be an addition, wouldn't this be more clearly
expressed by defining a suitable structure and using sizeof(that structure)
to work out the address range?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-22 08:39    [W:0.861 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site