Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1564182 > unrolled thread

[PATCH] mailbox: mailbox-xgene-slimpro: constify mbox_chan_ops structure

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-01-21 18:00 +0100
Last post2017-01-21 18:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] mailbox: mailbox-xgene-slimpro: constify mbox_chan_ops structure Bhumika Goyal <bhumirks@gmail.com> - 2017-01-21 18:00 +0100

#1564182 — [PATCH] mailbox: mailbox-xgene-slimpro: constify mbox_chan_ops structure

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-01-21 18:00 +0100
Subject[PATCH] mailbox: mailbox-xgene-slimpro: constify mbox_chan_ops structure
Message-ID<t27bb-6iA-3@gated-at.bofh.it>
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
   1592	    248	      0	   1840	    730	mailbox/mailbox-xgene-slimpro.o

File size after:
  text	   data	    bss	    dec	    hex	filename
   1648	    192	      0	   1840	    730 mailbox/mailbox-xgene-slimpro.o

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

diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c b/drivers/mailbox/mailbox-xgene-slimpro.c
index dd2afbc..a704016 100644
--- a/drivers/mailbox/mailbox-xgene-slimpro.c
+++ b/drivers/mailbox/mailbox-xgene-slimpro.c
@@ -174,7 +174,7 @@ static void slimpro_mbox_shutdown(struct mbox_chan *chan)
 	devm_free_irq(mb_chan->dev, mb_chan->irq, mb_chan);
 }
 
-static struct mbox_chan_ops slimpro_mbox_ops = {
+static const struct mbox_chan_ops slimpro_mbox_ops = {
 	.send_data = slimpro_mbox_send_data,
 	.startup = slimpro_mbox_startup,
 	.shutdown = slimpro_mbox_shutdown,
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web