xen-platform: Constify dev_pm_ops
PATCH 1/1 xen-platform: Constify dev_pm_ops
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 <[email protected]>
--- drivers/xen/platform-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/platform-pci.c +1 -1
@@ -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, };
Signature · 1 line
2.26.2
Quoted 4 lines · Rikard Falkeborn
dev_pm_opsis never modified, so mark it const to allow the compiler to put it in read-only memory.Before:
Quoted 8 lines
text data bss dec hex filename 2457 1668 256 4381 111d drivers/xen/platform-pci.oAfter:
text data bss dec hex filename 2681 1444 256 4381 111d drivers/xen/platform-pci.oSigned-off-by Rikard Falkeborn <[email protected]>
Reviewed-by Juergen Gross <[email protected]>
Juergen