drivers: serial: pl011: Fix ignored const qualifiers
When trying to build Zephyr with -Wignored-qualifiers this leads to a compiler warning like: zephyr/drivers/serial/uart_pl011_registers.h:40:1: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers] Since the return value is copied by the caller, making it const has no effect and the compiler warns that this is being ignored. This enables applications to build with additional compiler warnings turned on. Signed-off-by: Benjamin Gwin <bgwin@google.com>
This commit is contained in:
parent
9c7514cf9b
commit
47a0813561
1 changed files with 2 additions and 2 deletions
|
@ -37,9 +37,9 @@ struct pl011_regs {
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
volatile struct pl011_regs *const get_uart(const struct device *dev)
|
volatile struct pl011_regs *get_uart(const struct device *dev)
|
||||||
{
|
{
|
||||||
return (volatile struct pl011_regs *const)DEVICE_MMIO_GET(dev);
|
return (volatile struct pl011_regs *)DEVICE_MMIO_GET(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PL011_BIT_MASK(x, y) (((2 << x) - 1) << y)
|
#define PL011_BIT_MASK(x, y) (((2 << x) - 1) << y)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue