lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 21 Jan 2017 22:27:13 +0530
From:   Bhumika Goyal <bhumirks@...il.com>
To:     julia.lawall@...6.fr, jassisinghbrar@...il.com,
        linux-kernel@...r.kernel.org
Cc:     Bhumika Goyal <bhumirks@...il.com>
Subject: [PATCH] mailbox: hi6220-mailbox: constify mbox_chan_ops structure

Declare mbox_chan_ops structure as const as it is only stored in the ops
field of a mbox_controller structure. This field is of type const, so
add const to structure declaration of mbox_chan_ops structure.

File size before:
   text	   data	    bss	    dec	    hex	filename
   2411	    248	      0	   2659	    a63	drivers/mailbox/hi6220-mailbox.o

File size after:
  text	   data	    bss	    dec	    hex	filename
   2467	    192	      0	   2659	    a63	drivers/mailbox/hi6220-mailbox.o

Signed-off-by: Bhumika Goyal <bhumirks@...il.com>
---
 drivers/mailbox/hi6220-mailbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mailbox/hi6220-mailbox.c b/drivers/mailbox/hi6220-mailbox.c
index 613722d..519376d 100644
--- a/drivers/mailbox/hi6220-mailbox.c
+++ b/drivers/mailbox/hi6220-mailbox.c
@@ -221,7 +221,7 @@ static void hi6220_mbox_shutdown(struct mbox_chan *chan)
 	mbox->irq_map_chan[mchan->ack_irq] = NULL;
 }
 
-static struct mbox_chan_ops hi6220_mbox_ops = {
+static const struct mbox_chan_ops hi6220_mbox_ops = {
 	.send_data    = hi6220_mbox_send_data,
 	.startup      = hi6220_mbox_startup,
 	.shutdown     = hi6220_mbox_shutdown,
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ