* [PATCH] net: make sock_prot_memory_pressure() return "const char *"
@ 2019-10-03 21:44 Alexey Dobriyan
2019-10-04 21:30 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2019-10-03 21:44 UTC (permalink / raw)
To: davem; +Cc: netdev
This function returns string literals which are "const char *".
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
net/core/sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3493,7 +3493,7 @@ static long sock_prot_memory_allocated(struct proto *proto)
return proto->memory_allocated != NULL ? proto_memory_allocated(proto) : -1L;
}
-static char *sock_prot_memory_pressure(struct proto *proto)
+static const char *sock_prot_memory_pressure(struct proto *proto)
{
return proto->memory_pressure != NULL ?
proto_memory_pressure(proto) ? "yes" : "no" : "NI";
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net: make sock_prot_memory_pressure() return "const char *"
2019-10-03 21:44 [PATCH] net: make sock_prot_memory_pressure() return "const char *" Alexey Dobriyan
@ 2019-10-04 21:30 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-10-04 21:30 UTC (permalink / raw)
To: adobriyan; +Cc: netdev
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Fri, 4 Oct 2019 00:44:40 +0300
> This function returns string literals which are "const char *".
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-04 21:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03 21:44 [PATCH] net: make sock_prot_memory_pressure() return "const char *" Alexey Dobriyan
2019-10-04 21:30 ` David Miller
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).