* [PATCH] tty: serial: msm_serial: Constify msm_uart_pops
@ 2020-11-04 23:51 Rikard Falkeborn
2020-11-05 16:09 ` Jeffrey Hugo
2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
0 siblings, 2 replies; 3+ messages in thread
From: Rikard Falkeborn @ 2020-11-04 23:51 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Jiri Slaby, Andy Gross, Bjorn Andersson, linux-arm-msm,
linux-serial, linux-kernel, Rikard Falkeborn
The only usage of msm_uart_pops is to assign its address to the ops
field in the uart_port struct, which is a pointer to const. Make it
const to allow the compiler to put it in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
drivers/tty/serial/msm_serial.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index 87f005e5d2af..18e16159aabb 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -1525,7 +1525,7 @@ static void msm_poll_put_char(struct uart_port *port, unsigned char c)
}
#endif
-static struct uart_ops msm_uart_pops = {
+static const struct uart_ops msm_uart_pops = {
.tx_empty = msm_tx_empty,
.set_mctrl = msm_set_mctrl,
.get_mctrl = msm_get_mctrl,
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tty: serial: msm_serial: Constify msm_uart_pops
2020-11-04 23:51 [PATCH] tty: serial: msm_serial: Constify msm_uart_pops Rikard Falkeborn
@ 2020-11-05 16:09 ` Jeffrey Hugo
2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey Hugo @ 2020-11-05 16:09 UTC (permalink / raw)
To: Rikard Falkeborn
Cc: Greg Kroah-Hartman, Jiri Slaby, Andy Gross, Bjorn Andersson, MSM,
linux-serial, lkml
On Wed, Nov 4, 2020 at 4:54 PM Rikard Falkeborn
<rikard.falkeborn@gmail.com> wrote:
>
> The only usage of msm_uart_pops is to assign its address to the ops
> field in the uart_port struct, which is a pointer to const. Make it
> const to allow the compiler to put it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tty: serial: msm_serial: Constify msm_uart_pops
2020-11-04 23:51 [PATCH] tty: serial: msm_serial: Constify msm_uart_pops Rikard Falkeborn
2020-11-05 16:09 ` Jeffrey Hugo
@ 2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2020-12-29 20:15 UTC (permalink / raw)
To: Rikard Falkeborn; +Cc: linux-arm-msm
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
On Thu, 5 Nov 2020 00:51:34 +0100 you wrote:
> The only usage of msm_uart_pops is to assign its address to the ops
> field in the uart_port struct, which is a pointer to const. Make it
> const to allow the compiler to put it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
> drivers/tty/serial/msm_serial.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- tty: serial: msm_serial: Constify msm_uart_pops
https://git.kernel.org/qcom/c/0d66442dfdbd
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-29 20:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 23:51 [PATCH] tty: serial: msm_serial: Constify msm_uart_pops Rikard Falkeborn
2020-11-05 16:09 ` Jeffrey Hugo
2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).