* [PATCH] HID: intel-ish-hid: constify device_type structure
@ 2017-02-11 7:10 Bhumika Goyal
2017-02-11 9:39 ` Srinivas Pandruvada
2017-02-14 14:33 ` Jiri Kosina
0 siblings, 2 replies; 3+ messages in thread
From: Bhumika Goyal @ 2017-02-11 7:10 UTC (permalink / raw)
To: julia.lawall, srinivas.pandruvada, jikos, benjamin.tissoires,
linux-input, linux-kernel
Cc: Bhumika Goyal
Declare device_type structure as const as it is only stored in the
type field of a device structure. This field is of type const, so add
const to the declaration of device_type structure.
File size before: drivers/hid/intel-ish-hid/ishtp/bus.o
text data bss dec hex filename
4260 336 16 4612 1204 hid/intel-ish-hid/ishtp/bus.o
File size after: drivers/hid/intel-ish-hid/ishtp/bus.o
text data bss dec hex filename
4324 272 16 4612 1204 hid/intel-ish-hid/ishtp/bus.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/hid/intel-ish-hid/ishtp/bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c
index f4cbc74..5f382fe 100644
--- a/drivers/hid/intel-ish-hid/ishtp/bus.c
+++ b/drivers/hid/intel-ish-hid/ishtp/bus.c
@@ -358,7 +358,7 @@ static void ishtp_cl_dev_release(struct device *dev)
kfree(to_ishtp_cl_device(dev));
}
-static struct device_type ishtp_cl_device_type = {
+static const struct device_type ishtp_cl_device_type = {
.release = ishtp_cl_dev_release,
};
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: intel-ish-hid: constify device_type structure
2017-02-11 7:10 [PATCH] HID: intel-ish-hid: constify device_type structure Bhumika Goyal
@ 2017-02-11 9:39 ` Srinivas Pandruvada
2017-02-14 14:33 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Srinivas Pandruvada @ 2017-02-11 9:39 UTC (permalink / raw)
To: Bhumika Goyal, julia.lawall, jikos, benjamin.tissoires,
linux-input, linux-kernel
On Sat, 2017-02-11 at 12:40 +0530, Bhumika Goyal wrote:
> Declare device_type structure as const as it is only stored in the
> type field of a device structure. This field is of type const, so add
> const to the declaration of device_type structure.
>
> File size before: drivers/hid/intel-ish-hid/ishtp/bus.o
> text data bss dec hex
> filename
> 4260 336 16 4612 1204
> hid/intel-ish-hid/ishtp/bus.o
>
> File size after: drivers/hid/intel-ish-hid/ishtp/bus.o
> text data bss dec hex
> filename
> 4324 272 16 4612 1204
> hid/intel-ish-hid/ishtp/bus.o
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> drivers/hid/intel-ish-hid/ishtp/bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c
> b/drivers/hid/intel-ish-hid/ishtp/bus.c
> index f4cbc74..5f382fe 100644
> --- a/drivers/hid/intel-ish-hid/ishtp/bus.c
> +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c
> @@ -358,7 +358,7 @@ static void ishtp_cl_dev_release(struct device
> *dev)
> kfree(to_ishtp_cl_device(dev));
> }
>
> -static struct device_type ishtp_cl_device_type = {
> +static const struct device_type ishtp_cl_device_type = {
> .release = ishtp_cl_dev_release,
> };
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: intel-ish-hid: constify device_type structure
2017-02-11 7:10 [PATCH] HID: intel-ish-hid: constify device_type structure Bhumika Goyal
2017-02-11 9:39 ` Srinivas Pandruvada
@ 2017-02-14 14:33 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2017-02-14 14:33 UTC (permalink / raw)
To: Bhumika Goyal
Cc: julia.lawall, srinivas.pandruvada, benjamin.tissoires,
linux-input, linux-kernel
On Sat, 11 Feb 2017, Bhumika Goyal wrote:
> Declare device_type structure as const as it is only stored in the
> type field of a device structure. This field is of type const, so add
> const to the declaration of device_type structure.
>
> File size before: drivers/hid/intel-ish-hid/ishtp/bus.o
> text data bss dec hex filename
> 4260 336 16 4612 1204 hid/intel-ish-hid/ishtp/bus.o
>
> File size after: drivers/hid/intel-ish-hid/ishtp/bus.o
> text data bss dec hex filename
> 4324 272 16 4612 1204 hid/intel-ish-hid/ishtp/bus.o
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
> drivers/hid/intel-ish-hid/ishtp/bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c
> index f4cbc74..5f382fe 100644
> --- a/drivers/hid/intel-ish-hid/ishtp/bus.c
> +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c
> @@ -358,7 +358,7 @@ static void ishtp_cl_dev_release(struct device *dev)
> kfree(to_ishtp_cl_device(dev));
> }
>
> -static struct device_type ishtp_cl_device_type = {
> +static const struct device_type ishtp_cl_device_type = {
> .release = ishtp_cl_dev_release,
> };
Applied to hid.git#for-4.11/intel-ish, thanks.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-14 14:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-11 7:10 [PATCH] HID: intel-ish-hid: constify device_type structure Bhumika Goyal
2017-02-11 9:39 ` Srinivas Pandruvada
2017-02-14 14:33 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).