From: Bhumika Goyal <bhumirks@gmail.com>
To: julia.lawall@lip6.fr, stefanr@s5r6.in-berlin.de,
linux1394-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Cc: Bhumika Goyal <bhumirks@gmail.com>
Subject: [PATCH] firewire: core-device: constify device_type structures
Date: Sat, 21 Jan 2017 22:31:35 +0530 [thread overview]
Message-ID: <1485018095-22733-1-git-send-email-bhumirks@gmail.com> (raw)
Declare device_type structures as const as they are only stored in the type
field of a device structure. This field is of type const, so device_type
structures having similar properties can be declared const too.
File size before:
text data bss dec hex filename
8120 889 72 9081 2379 drivers/firewire/core-device.o
File size after:
text data bss dec hex filename
8248 761 72 9081 2379 drivers/firewire/core-device.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/firewire/core-device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index f9e3aee..9def58c 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -689,7 +689,7 @@ static void fw_unit_release(struct device *dev)
kfree(unit);
}
-static struct device_type fw_unit_type = {
+static const struct device_type fw_unit_type = {
.uevent = fw_unit_uevent,
.release = fw_unit_release,
};
@@ -849,7 +849,7 @@ static void fw_device_release(struct device *dev)
fw_card_put(card);
}
-static struct device_type fw_device_type = {
+static const struct device_type fw_device_type = {
.release = fw_device_release,
};
--
2.7.4
reply other threads:[~2017-01-21 17:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1485018095-22733-1-git-send-email-bhumirks@gmail.com \
--to=bhumirks@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=stefanr@s5r6.in-berlin.de \
/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®