Re: [PATCH v3] serial: 8250_uniphier: add UniPhier serial driver

From: One Thousand Gnomes
Date: Tue May 19 2015 - 05:49:13 EST


> I intentionally use deeper indentation for *_SHIFT
> because I want to clearly show UNIPHIER_UART_LCR_SHIFT
> belongs to UNIPHIER_UART_LCR_MCR register.

Seems sensible to do it that way to me and a lot of other bits of the
kernel do.

The only other question I have is about the unipher_serial_out. If I am
writing a "special" register then the sequence becomes

- read 32bits
- modify
- write 32bits

That means that it's no longer atomic safe as the kernel expects.
Checking the users FCR seems safe, LCR is probably safe and MCR likewise
so I don't see a problem but I think it's worth noting in case anyone
else does.

Finally can you add a comment in serial_in and serial_out where one
switch case drops through into the next so its obvious to anyone looking
at Coverity and other analyser output that this drop through was
intentional ?

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/