diff mbox series

[v3,1/2] ns16550: specify uart param for ns_{read,write}_reg as const

Message ID 20210819190625.476165-1-marmarek@invisiblethingslab.com (mailing list archive)
State New, archived
Headers show
Series [v3,1/2] ns16550: specify uart param for ns_{read,write}_reg as const | expand

Commit Message

Marek Marczykowski-Górecki Aug. 19, 2021, 7:06 p.m. UTC
They don't modify it, after all.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
New in v3. There was "ns16550: do not override fifo size if explicitly
set" here before, but it's already committed.
---
 xen/drivers/char/ns16550.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jan Beulich Aug. 20, 2021, 6:33 a.m. UTC | #1
On 19.08.2021 21:06, Marek Marczykowski-Górecki wrote:
> They don't modify it, after all.
> 
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

Thanks for taking this extra step.

Jan
diff mbox series

Patch

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 97b85b0225cc..20da8fd3b421 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -108,7 +108,7 @@  struct ns16550_config_param {
 
 static void ns16550_delayed_resume(void *data);
 
-static u8 ns_read_reg(struct ns16550 *uart, unsigned int reg)
+static u8 ns_read_reg(const struct ns16550 *uart, unsigned int reg)
 {
     void __iomem *addr = uart->remapped_io_base + (reg << uart->reg_shift);
 #ifdef CONFIG_HAS_IOPORTS
@@ -126,7 +126,7 @@  static u8 ns_read_reg(struct ns16550 *uart, unsigned int reg)
     }
 }
 
-static void ns_write_reg(struct ns16550 *uart, unsigned int reg, u8 c)
+static void ns_write_reg(const struct ns16550 *uart, unsigned int reg, u8 c)
 {
     void __iomem *addr = uart->remapped_io_base + (reg << uart->reg_shift);
 #ifdef CONFIG_HAS_IOPORTS