Re: [PATCH 1/2] iommu/hyper-v: Constify hyperv_ir_domain_ops

2020-05-26 Thread Wei Liu
On Mon, May 25, 2020 at 11:49:57PM +0200, Rikard Falkeborn wrote:
> The struct hyperv_ir_domain_ops is not modified and can be made const to
> allow the compiler to put it in read-only memory.
> 
> Before:
>textdata bss dec hex filename
>29161180112052161460 drivers/iommu/hyperv-iommu.o
> 
> After:
>textdata bss dec hex filename
>30441052112052161460 drivers/iommu/hyperv-iommu.o
> 
> Signed-off-by: Rikard Falkeborn 

Acked-by: Wei Liu 

> ---
>  drivers/iommu/hyperv-iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/hyperv-iommu.c b/drivers/iommu/hyperv-iommu.c
> index a386b83e0e34..3c0c67a99c7b 100644
> --- a/drivers/iommu/hyperv-iommu.c
> +++ b/drivers/iommu/hyperv-iommu.c
> @@ -131,7 +131,7 @@ static int hyperv_irq_remapping_activate(struct 
> irq_domain *domain,
>   return 0;
>  }
>  
> -static struct irq_domain_ops hyperv_ir_domain_ops = {
> +static const struct irq_domain_ops hyperv_ir_domain_ops = {
>   .alloc = hyperv_irq_remapping_alloc,
>   .free = hyperv_irq_remapping_free,
>   .activate = hyperv_irq_remapping_activate,
> -- 
> 2.26.2
> 


[PATCH 1/2] iommu/hyper-v: Constify hyperv_ir_domain_ops

2020-05-25 Thread Rikard Falkeborn
The struct hyperv_ir_domain_ops is not modified and can be made const to
allow the compiler to put it in read-only memory.

Before:
   textdata bss dec hex filename
   29161180112052161460 drivers/iommu/hyperv-iommu.o

After:
   textdata bss dec hex filename
   30441052112052161460 drivers/iommu/hyperv-iommu.o

Signed-off-by: Rikard Falkeborn 
---
 drivers/iommu/hyperv-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/hyperv-iommu.c b/drivers/iommu/hyperv-iommu.c
index a386b83e0e34..3c0c67a99c7b 100644
--- a/drivers/iommu/hyperv-iommu.c
+++ b/drivers/iommu/hyperv-iommu.c
@@ -131,7 +131,7 @@ static int hyperv_irq_remapping_activate(struct irq_domain 
*domain,
return 0;
 }
 
-static struct irq_domain_ops hyperv_ir_domain_ops = {
+static const struct irq_domain_ops hyperv_ir_domain_ops = {
.alloc = hyperv_irq_remapping_alloc,
.free = hyperv_irq_remapping_free,
.activate = hyperv_irq_remapping_activate,
-- 
2.26.2