From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: lduncan@suse.com, cleech@redhat.com, jejb@linux.vnet.ibm.com,
martin.petersen@oracle.com
Cc: open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] scsi: scsi_transport_fc: constify attribute_group structures.
Date: Fri, 14 Jul 2017 13:53:29 +0530 [thread overview]
Message-ID: <1500020610-15973-4-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1500020610-15973-1-git-send-email-arvind.yadav.cs@gmail.com>
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/transport_class.h>
work with const attribute_group. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
34122 1932 4 36058 8cda drivers/scsi/scsi_transport_fc.o
File size After adding 'const':
text data bss dec hex filename
34186 1868 4 36058 8cda drivers/scsi/scsi_transport_fc.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/scsi/scsi_transport_fc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 7e24aa3..eda39cc 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -1808,7 +1808,7 @@ static FC_DEVICE_ATTR(host, reset_statistics, S_IWUSR, NULL,
NULL
};
-static struct attribute_group fc_statistics_group = {
+static const struct attribute_group fc_statistics_group = {
.name = "statistics",
.attrs = fc_statistics_attrs,
};
--
1.9.1
next prev parent reply other threads:[~2017-07-14 8:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 8:23 [PATCH 0/4] constify scsi " Arvind Yadav
2017-07-14 8:23 ` [PATCH 1/4] scsi: scsi_transport_iscsi: constify " Arvind Yadav
2017-07-14 8:23 ` [PATCH 2/4] scsi: iscsi_boot_sysfs: " Arvind Yadav
2017-07-14 8:23 ` Arvind Yadav [this message]
2017-07-14 8:23 ` [PATCH 4/4] scsi: scsi_transport_spi: " Arvind Yadav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1500020610-15973-4-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=cleech@redhat.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=lduncan@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=open-iscsi@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®