All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: sahara : make of_device_ids const.
@ 2017-06-27 11:41 Arvind Yadav
  2017-07-18 10:35 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-06-27 11:41 UTC (permalink / raw)
  To: herbert, davem; +Cc: linux-crypto, linux-kernel

of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by <linux/of.h> work with const
of_device_ids. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
   9759	   2736	      8	  12503	   30d7	drivers/crypto/sahara.o

File size after constify:
   text	   data	    bss	    dec	    hex	filename
  10367	   2128	      8	  12503	   30d7	drivers/crypto/sahara.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/crypto/sahara.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index 1d9ecd3..c2174ec 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -1382,7 +1382,7 @@ static void sahara_unregister_algs(struct sahara_dev *dev)
 };
 MODULE_DEVICE_TABLE(platform, sahara_platform_ids);
 
-static struct of_device_id sahara_dt_ids[] = {
+static const struct of_device_id sahara_dt_ids[] = {
 	{ .compatible = "fsl,imx53-sahara" },
 	{ .compatible = "fsl,imx27-sahara" },
 	{ /* sentinel */ }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] crypto: sahara : make of_device_ids const.
  2017-06-27 11:41 [PATCH] crypto: sahara : make of_device_ids const Arvind Yadav
@ 2017-07-18 10:35 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2017-07-18 10:35 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: davem, linux-crypto, linux-kernel

On Tue, Jun 27, 2017 at 05:11:23PM +0530, Arvind Yadav wrote:
> of_device_ids are not supposed to change at runtime. All functions
> working with of_device_ids provided by <linux/of.h> work with const
> of_device_ids. So mark the non-const structs as const.
> 
> File size before:
>    text	   data	    bss	    dec	    hex	filename
>    9759	   2736	      8	  12503	   30d7	drivers/crypto/sahara.o
> 
> File size after constify:
>    text	   data	    bss	    dec	    hex	filename
>   10367	   2128	      8	  12503	   30d7	drivers/crypto/sahara.o
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-18 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 11:41 [PATCH] crypto: sahara : make of_device_ids const Arvind Yadav
2017-07-18 10:35 ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.