* [PATCH] xen-platform: Constify dev_pm_ops
@ 2020-05-09 13:47 Rikard Falkeborn
2020-05-11 8:12 ` Jürgen Groß
0 siblings, 1 reply; 2+ messages in thread
From: Rikard Falkeborn @ 2020-05-09 13:47 UTC (permalink / raw)
To: boris.ostrovsky, jgross, sstabellini
Cc: xen-devel, linux-kernel, Rikard Falkeborn
dev_pm_ops is never modified, so mark it const to allow the compiler to
put it in read-only memory.
Before:
text data bss dec hex filename
2457 1668 256 4381 111d drivers/xen/platform-pci.o
After:
text data bss dec hex filename
2681 1444 256 4381 111d drivers/xen/platform-pci.o
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
drivers/xen/platform-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index 59e85e408c23..dd911e1ff782 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -168,7 +168,7 @@ static const struct pci_device_id platform_pci_tbl[] = {
{0,}
};
-static struct dev_pm_ops platform_pm_ops = {
+static const struct dev_pm_ops platform_pm_ops = {
.resume_noirq = platform_pci_resume,
};
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xen-platform: Constify dev_pm_ops
2020-05-09 13:47 [PATCH] xen-platform: Constify dev_pm_ops Rikard Falkeborn
@ 2020-05-11 8:12 ` Jürgen Groß
0 siblings, 0 replies; 2+ messages in thread
From: Jürgen Groß @ 2020-05-11 8:12 UTC (permalink / raw)
To: Rikard Falkeborn, boris.ostrovsky, sstabellini; +Cc: xen-devel, linux-kernel
On 09.05.20 15:47, Rikard Falkeborn wrote:
> dev_pm_ops is never modified, so mark it const to allow the compiler to
> put it in read-only memory.
>
> Before:
> text data bss dec hex filename
> 2457 1668 256 4381 111d drivers/xen/platform-pci.o
>
> After:
> text data bss dec hex filename
> 2681 1444 256 4381 111d drivers/xen/platform-pci.o
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-11 8:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 13:47 [PATCH] xen-platform: Constify dev_pm_ops Rikard Falkeborn
2020-05-11 8:12 ` Jürgen Groß
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).