* [PATCH 1/9] HID: amd_sfh: Constify lowlevel HID driver
2023-01-30 3:59 [PATCH 0/9] HID: Constify lowlevel HID drivers Thomas Weißschuh
@ 2023-01-30 3:59 ` Thomas Weißschuh
2023-01-30 3:59 ` [PATCH 2/9] HID: hyperv: " Thomas Weißschuh
` (9 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Thomas Weißschuh @ 2023-01-30 3:59 UTC (permalink / raw)
To: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging,
Thomas Weißschuh
Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structure, too.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c
index 1b18291fc5af..705b52337068 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c
@@ -112,7 +112,7 @@ void amdtp_hid_wakeup(struct hid_device *hid)
}
}
-static struct hid_ll_driver amdtp_hid_ll_driver = {
+static const struct hid_ll_driver amdtp_hid_ll_driver = {
.parse = amdtp_hid_parse,
.start = amdtp_hid_start,
.stop = amdtp_hid_stop,
--
2.39.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/9] HID: hyperv: Constify lowlevel HID driver
2023-01-30 3:59 [PATCH 0/9] HID: Constify lowlevel HID drivers Thomas Weißschuh
2023-01-30 3:59 ` [PATCH 1/9] HID: amd_sfh: Constify lowlevel HID driver Thomas Weißschuh
@ 2023-01-30 3:59 ` Thomas Weißschuh
2023-01-30 15:42 ` Wei Liu
2023-01-30 3:59 ` [PATCH 3/9] HID: logitech-dj: " Thomas Weißschuh
` (8 subsequent siblings)
10 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh @ 2023-01-30 3:59 UTC (permalink / raw)
To: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging,
Thomas Weißschuh
Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structure, too.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/hid/hid-hyperv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index cf12f17e6533..819eb38eb5df 100644
--- a/drivers/hid/hid-hyperv.c
+++ b/drivers/hid/hid-hyperv.c
@@ -424,7 +424,7 @@ static int mousevsc_hid_raw_request(struct hid_device *hid,
return 0;
}
-static struct hid_ll_driver mousevsc_ll_driver = {
+static const struct hid_ll_driver mousevsc_ll_driver = {
.parse = mousevsc_hid_parse,
.open = mousevsc_hid_open,
.close = mousevsc_hid_close,
--
2.39.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 2/9] HID: hyperv: Constify lowlevel HID driver
2023-01-30 3:59 ` [PATCH 2/9] HID: hyperv: " Thomas Weißschuh
@ 2023-01-30 15:42 ` Wei Liu
0 siblings, 0 replies; 17+ messages in thread
From: Wei Liu @ 2023-01-30 15:42 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman, linux-input,
linux-kernel, linux-hyperv, platform-driver-x86, acpi4asus-user,
greybus-dev, linux-staging
On Mon, Jan 30, 2023 at 03:59:38AM +0000, Thomas Weißschuh wrote:
> Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
> the lowlevel HID drivers are only exposed as const.
>
> Take advantage of this to constify the underlying structure, too.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Wei Liu <wei.liu@kernel.org>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/9] HID: logitech-dj: Constify lowlevel HID driver
2023-01-30 3:59 [PATCH 0/9] HID: Constify lowlevel HID drivers Thomas Weißschuh
2023-01-30 3:59 ` [PATCH 1/9] HID: amd_sfh: Constify lowlevel HID driver Thomas Weißschuh
2023-01-30 3:59 ` [PATCH 2/9] HID: hyperv: " Thomas Weißschuh
@ 2023-01-30 3:59 ` Thomas Weißschuh
2023-01-30 3:59 ` [PATCH 4/9] HID: steam: " Thomas Weißschuh
` (7 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Thomas Weißschuh @ 2023-01-30 3:59 UTC (permalink / raw)
To: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging,
Thomas Weißschuh
Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structure, too.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/hid/hid-logitech-dj.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index c358778e070b..62180414efcc 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -554,7 +554,7 @@ static const u8 hid_reportid_size_map[NUMBER_OF_HID_REPORTS] = {
#define LOGITECH_DJ_INTERFACE_NUMBER 0x02
-static struct hid_ll_driver logi_dj_ll_driver;
+static const struct hid_ll_driver logi_dj_ll_driver;
static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev);
static void delayedwork_callback(struct work_struct *work);
@@ -1506,7 +1506,7 @@ static bool logi_dj_ll_may_wakeup(struct hid_device *hid)
return hid_hw_may_wakeup(djrcv_dev->hidpp);
}
-static struct hid_ll_driver logi_dj_ll_driver = {
+static const struct hid_ll_driver logi_dj_ll_driver = {
.parse = logi_dj_ll_parse,
.start = logi_dj_ll_start,
.stop = logi_dj_ll_stop,
--
2.39.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 4/9] HID: steam: Constify lowlevel HID driver
2023-01-30 3:59 [PATCH 0/9] HID: Constify lowlevel HID drivers Thomas Weißschuh
` (2 preceding siblings ...)
2023-01-30 3:59 ` [PATCH 3/9] HID: logitech-dj: " Thomas Weißschuh
@ 2023-01-30 3:59 ` Thomas Weißschuh
2023-01-30 3:59 ` [PATCH 5/9] HID: intel-ish-hid: " Thomas Weißschuh
` (6 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Thomas Weißschuh @ 2023-01-30 3:59 UTC (permalink / raw)
To: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging,
Thomas Weißschuh
Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structure, too.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/hid/hid-steam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-steam.c b/drivers/hid/hid-steam.c
index 8ee43cb225fc..29ec8b34741a 100644
--- a/drivers/hid/hid-steam.c
+++ b/drivers/hid/hid-steam.c
@@ -674,7 +674,7 @@ static int steam_client_ll_raw_request(struct hid_device *hdev,
report_type, reqtype);
}
-static struct hid_ll_driver steam_client_ll_driver = {
+static const struct hid_ll_driver steam_client_ll_driver = {
.parse = steam_client_ll_parse,
.start = steam_client_ll_start,
.stop = steam_client_ll_stop,
--
2.39.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 5/9] HID: intel-ish-hid: Constify lowlevel HID driver
2023-01-30 3:59 [PATCH 0/9] HID: Constify lowlevel HID drivers Thomas Weißschuh
` (3 preceding siblings ...)
2023-01-30 3:59 ` [PATCH 4/9] HID: steam: " Thomas Weißschuh
@ 2023-01-30 3:59 ` Thomas Weißschuh
2023-01-30 3:59 ` [PATCH 6/9] HID: surface-hid: " Thomas Weißschuh
` (5 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Thomas Weißschuh @ 2023-01-30 3:59 UTC (permalink / raw)
To: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging,
Thomas Weißschuh
Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structure, too.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c b/drivers/hid/intel-ish-hid/ishtp-hid.c
index 14c271d7d8a9..00c6f0ebf356 100644
--- a/drivers/hid/intel-ish-hid/ishtp-hid.c
+++ b/drivers/hid/intel-ish-hid/ishtp-hid.c
@@ -183,7 +183,7 @@ void ishtp_hid_wakeup(struct hid_device *hid)
wake_up_interruptible(&hid_data->hid_wait);
}
-static struct hid_ll_driver ishtp_hid_ll_driver = {
+static const struct hid_ll_driver ishtp_hid_ll_driver = {
.parse = ishtp_hid_parse,
.start = ishtp_hid_start,
.stop = ishtp_hid_stop,
--
2.39.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 6/9] HID: surface-hid: Constify lowlevel HID driver
2023-01-30 3:59 [PATCH 0/9] HID: Constify lowlevel HID drivers Thomas Weißschuh
` (4 preceding siblings ...)
2023-01-30 3:59 ` [PATCH 5/9] HID: intel-ish-hid: " Thomas Weißschuh
@ 2023-01-30 3:59 ` Thomas Weißschuh
2023-01-30 11:53 ` Maximilian Luz
2023-01-30 3:59 ` [PATCH 7/9] platform/x86: asus-tf103c-dock: " Thomas Weißschuh
` (4 subsequent siblings)
10 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh @ 2023-01-30 3:59 UTC (permalink / raw)
To: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging,
Thomas Weißschuh
Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structure, too.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/hid/surface-hid/surface_hid_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/surface-hid/surface_hid_core.c b/drivers/hid/surface-hid/surface_hid_core.c
index 87637f813de2..a3e9cceddfac 100644
--- a/drivers/hid/surface-hid/surface_hid_core.c
+++ b/drivers/hid/surface-hid/surface_hid_core.c
@@ -174,7 +174,7 @@ static int surface_hid_raw_request(struct hid_device *hid, unsigned char reportn
return -EIO;
}
-static struct hid_ll_driver surface_hid_ll_driver = {
+static const struct hid_ll_driver surface_hid_ll_driver = {
.start = surface_hid_start,
.stop = surface_hid_stop,
.open = surface_hid_open,
--
2.39.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 6/9] HID: surface-hid: Constify lowlevel HID driver
2023-01-30 3:59 ` [PATCH 6/9] HID: surface-hid: " Thomas Weißschuh
@ 2023-01-30 11:53 ` Maximilian Luz
0 siblings, 0 replies; 17+ messages in thread
From: Maximilian Luz @ 2023-01-30 11:53 UTC (permalink / raw)
To: Thomas Weißschuh, Basavaraj Natikar, Jiri Kosina,
Benjamin Tissoires, K. Y. Srinivasan, Haiyang Zhang, Wei Liu,
Dexuan Cui, Filipe Laíns, Srinivas Pandruvada,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging
On 1/30/23 04:59, Thomas Weißschuh wrote:
> Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
> the lowlevel HID drivers are only exposed as const.
>
> Take advantage of this to constify the underlying structure, too.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Looks good to me.
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
> ---
> drivers/hid/surface-hid/surface_hid_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/surface-hid/surface_hid_core.c b/drivers/hid/surface-hid/surface_hid_core.c
> index 87637f813de2..a3e9cceddfac 100644
> --- a/drivers/hid/surface-hid/surface_hid_core.c
> +++ b/drivers/hid/surface-hid/surface_hid_core.c
> @@ -174,7 +174,7 @@ static int surface_hid_raw_request(struct hid_device *hid, unsigned char reportn
> return -EIO;
> }
>
> -static struct hid_ll_driver surface_hid_ll_driver = {
> +static const struct hid_ll_driver surface_hid_ll_driver = {
> .start = surface_hid_start,
> .stop = surface_hid_stop,
> .open = surface_hid_open,
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 7/9] platform/x86: asus-tf103c-dock: Constify lowlevel HID driver
2023-01-30 3:59 [PATCH 0/9] HID: Constify lowlevel HID drivers Thomas Weißschuh
` (5 preceding siblings ...)
2023-01-30 3:59 ` [PATCH 6/9] HID: surface-hid: " Thomas Weißschuh
@ 2023-01-30 3:59 ` Thomas Weißschuh
2023-01-30 3:59 ` [PATCH 8/9] platform/x86: asus-tf103c-dock: Constify toprow keymap Thomas Weißschuh
` (3 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Thomas Weißschuh @ 2023-01-30 3:59 UTC (permalink / raw)
To: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging,
Thomas Weißschuh
Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structure, too.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/platform/x86/asus-tf103c-dock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/asus-tf103c-dock.c b/drivers/platform/x86/asus-tf103c-dock.c
index 62310e06282b..84c45e8f51ad 100644
--- a/drivers/platform/x86/asus-tf103c-dock.c
+++ b/drivers/platform/x86/asus-tf103c-dock.c
@@ -250,7 +250,7 @@ static int tf103c_dock_hid_raw_request(struct hid_device *hid, u8 reportnum,
return 0;
}
-static struct hid_ll_driver tf103c_dock_hid_ll_driver = {
+static const struct hid_ll_driver tf103c_dock_hid_ll_driver = {
.parse = tf103c_dock_hid_parse,
.start = tf103c_dock_hid_start,
.stop = tf103c_dock_hid_stop,
--
2.39.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 8/9] platform/x86: asus-tf103c-dock: Constify toprow keymap
2023-01-30 3:59 [PATCH 0/9] HID: Constify lowlevel HID drivers Thomas Weißschuh
` (6 preceding siblings ...)
2023-01-30 3:59 ` [PATCH 7/9] platform/x86: asus-tf103c-dock: " Thomas Weißschuh
@ 2023-01-30 3:59 ` Thomas Weißschuh
2023-01-30 3:59 ` [PATCH 9/9] staging: greybus: hid: Constify lowlevel HID driver Thomas Weißschuh
` (2 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Thomas Weißschuh @ 2023-01-30 3:59 UTC (permalink / raw)
To: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging,
Thomas Weißschuh
This structure is never modified, make it const.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/platform/x86/asus-tf103c-dock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/asus-tf103c-dock.c b/drivers/platform/x86/asus-tf103c-dock.c
index 84c45e8f51ad..aeb1138464df 100644
--- a/drivers/platform/x86/asus-tf103c-dock.c
+++ b/drivers/platform/x86/asus-tf103c-dock.c
@@ -259,7 +259,7 @@ static const struct hid_ll_driver tf103c_dock_hid_ll_driver = {
.raw_request = tf103c_dock_hid_raw_request,
};
-static int tf103c_dock_toprow_codes[13][2] = {
+static const int tf103c_dock_toprow_codes[13][2] = {
/* Normal, AltGr pressed */
{ KEY_POWER, KEY_F1 },
{ KEY_RFKILL, KEY_F2 },
--
2.39.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 9/9] staging: greybus: hid: Constify lowlevel HID driver
2023-01-30 3:59 [PATCH 0/9] HID: Constify lowlevel HID drivers Thomas Weißschuh
` (7 preceding siblings ...)
2023-01-30 3:59 ` [PATCH 8/9] platform/x86: asus-tf103c-dock: Constify toprow keymap Thomas Weißschuh
@ 2023-01-30 3:59 ` Thomas Weißschuh
2023-01-31 10:15 ` Greg Kroah-Hartman
2023-01-30 8:36 ` [PATCH 0/9] HID: Constify lowlevel HID drivers Hans de Goede
2023-02-06 15:24 ` Benjamin Tissoires
10 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh @ 2023-01-30 3:59 UTC (permalink / raw)
To: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging,
Thomas Weißschuh
Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structure, too.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/staging/greybus/hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c
index adb91286803a..15335c38cb26 100644
--- a/drivers/staging/greybus/hid.c
+++ b/drivers/staging/greybus/hid.c
@@ -381,7 +381,7 @@ static int gb_hid_power(struct hid_device *hid, int lvl)
}
/* HID structure to pass callbacks */
-static struct hid_ll_driver gb_hid_ll_driver = {
+static const struct hid_ll_driver gb_hid_ll_driver = {
.parse = gb_hid_parse,
.start = gb_hid_start,
.stop = gb_hid_stop,
--
2.39.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 9/9] staging: greybus: hid: Constify lowlevel HID driver
2023-01-30 3:59 ` [PATCH 9/9] staging: greybus: hid: Constify lowlevel HID driver Thomas Weißschuh
@ 2023-01-31 10:15 ` Greg Kroah-Hartman
0 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2023-01-31 10:15 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Hans de Goede, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, linux-input, linux-kernel,
linux-hyperv, platform-driver-x86, acpi4asus-user, greybus-dev,
linux-staging
On Mon, Jan 30, 2023 at 03:59:45AM +0000, Thomas Weißschuh wrote:
> Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
> the lowlevel HID drivers are only exposed as const.
>
> Take advantage of this to constify the underlying structure, too.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/9] HID: Constify lowlevel HID drivers
2023-01-30 3:59 [PATCH 0/9] HID: Constify lowlevel HID drivers Thomas Weißschuh
` (8 preceding siblings ...)
2023-01-30 3:59 ` [PATCH 9/9] staging: greybus: hid: Constify lowlevel HID driver Thomas Weißschuh
@ 2023-01-30 8:36 ` Hans de Goede
2023-01-30 13:26 ` Thomas Weißschuh
2023-02-06 15:24 ` Benjamin Tissoires
10 siblings, 1 reply; 17+ messages in thread
From: Hans de Goede @ 2023-01-30 8:36 UTC (permalink / raw)
To: Thomas Weißschuh, Basavaraj Natikar, Jiri Kosina,
Benjamin Tissoires, K. Y. Srinivasan, Haiyang Zhang, Wei Liu,
Dexuan Cui, Filipe Laíns, Srinivas Pandruvada,
Maximilian Luz, Corentin Chary, Mark Gross, Viresh Kumar,
Johan Hovold, Alex Elder, Greg Kroah-Hartman
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging
Hi,
On 1/30/23 04:59, Thomas Weißschuh wrote:
> Since 52d225346904 ("HID: Make lowlevel driver structs const") the
> lowlevel HID drivers are only exposed as const.
>
> Take advantage of this to constify the underlying structures, too.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Thanks, series looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
I'll also pick up / merge patches 7 + 8 into pdx86/for-next
sometime this week.
Regards,
Hans
> ---
> Thomas Weißschuh (9):
> HID: amd_sfh: Constify lowlevel HID driver
> HID: hyperv: Constify lowlevel HID driver
> HID: logitech-dj: Constify lowlevel HID driver
> HID: steam: Constify lowlevel HID driver
> HID: intel-ish-hid: Constify lowlevel HID driver
> HID: surface-hid: Constify lowlevel HID driver
> platform/x86: asus-tf103c-dock: Constify lowlevel HID driver
> platform/x86: asus-tf103c-dock: Constify toprow keymap
> staging: greybus: hid: Constify lowlevel HID driver
>
> drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 2 +-
> drivers/hid/hid-hyperv.c | 2 +-
> drivers/hid/hid-logitech-dj.c | 4 ++--
> drivers/hid/hid-steam.c | 2 +-
> drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +-
> drivers/hid/surface-hid/surface_hid_core.c | 2 +-
> drivers/platform/x86/asus-tf103c-dock.c | 4 ++--
> drivers/staging/greybus/hid.c | 2 +-
> 8 files changed, 10 insertions(+), 10 deletions(-)
> ---
> base-commit: e04955db6a7c3fc4a1e6978649b61a6f5f8028e3
> change-id: 20230130-hid-const-ll-driver-fcfdd3af11b8
>
> Best regards,
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/9] HID: Constify lowlevel HID drivers
2023-01-30 8:36 ` [PATCH 0/9] HID: Constify lowlevel HID drivers Hans de Goede
@ 2023-01-30 13:26 ` Thomas Weißschuh
2023-01-30 13:28 ` Hans de Goede
0 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh @ 2023-01-30 13:26 UTC (permalink / raw)
To: Hans de Goede
Cc: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Mark Gross, Viresh Kumar, Johan Hovold,
Alex Elder, Greg Kroah-Hartman, linux-input, linux-kernel,
linux-hyperv, platform-driver-x86, acpi4asus-user, greybus-dev,
linux-staging
Hi Hans,
On Mon, Jan 30, 2023 at 09:36:32AM +0100, Hans de Goede wrote:
> Hi,
>
> On 1/30/23 04:59, Thomas Weißschuh wrote:
> > Since 52d225346904 ("HID: Make lowlevel driver structs const") the
> > lowlevel HID drivers are only exposed as const.
> >
> > Take advantage of this to constify the underlying structures, too.
> >
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>
> Thanks, series looks good to me:
>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>
> I'll also pick up / merge patches 7 + 8 into pdx86/for-next
> sometime this week.
Please note that patch 7 depends on commit 52d225346904
("HID: Make lowlevel driver structs const") which is not yet in Linus'
tree, only in the HID tree (branch for-6.3/hid-core).
Maybe it's better to take it via the HID tree or I can resend when the
prerequisites are in Linus' tree.
> Regards,
>
> Hans
>
>
>
> > ---
> > Thomas Weißschuh (9):
> > HID: amd_sfh: Constify lowlevel HID driver
> > HID: hyperv: Constify lowlevel HID driver
> > HID: logitech-dj: Constify lowlevel HID driver
> > HID: steam: Constify lowlevel HID driver
> > HID: intel-ish-hid: Constify lowlevel HID driver
> > HID: surface-hid: Constify lowlevel HID driver
> > platform/x86: asus-tf103c-dock: Constify lowlevel HID driver
> > platform/x86: asus-tf103c-dock: Constify toprow keymap
> > staging: greybus: hid: Constify lowlevel HID driver
> >
> > drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 2 +-
> > drivers/hid/hid-hyperv.c | 2 +-
> > drivers/hid/hid-logitech-dj.c | 4 ++--
> > drivers/hid/hid-steam.c | 2 +-
> > drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +-
> > drivers/hid/surface-hid/surface_hid_core.c | 2 +-
> > drivers/platform/x86/asus-tf103c-dock.c | 4 ++--
> > drivers/staging/greybus/hid.c | 2 +-
> > 8 files changed, 10 insertions(+), 10 deletions(-)
> > ---
> > base-commit: e04955db6a7c3fc4a1e6978649b61a6f5f8028e3
> > change-id: 20230130-hid-const-ll-driver-fcfdd3af11b8
> >
> > Best regards,
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/9] HID: Constify lowlevel HID drivers
2023-01-30 13:26 ` Thomas Weißschuh
@ 2023-01-30 13:28 ` Hans de Goede
0 siblings, 0 replies; 17+ messages in thread
From: Hans de Goede @ 2023-01-30 13:28 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires,
K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
Filipe Laíns, Srinivas Pandruvada, Maximilian Luz,
Corentin Chary, Mark Gross, Viresh Kumar, Johan Hovold,
Alex Elder, Greg Kroah-Hartman, linux-input, linux-kernel,
linux-hyperv, platform-driver-x86, acpi4asus-user, greybus-dev,
linux-staging
Hi,
On 1/30/23 14:26, Thomas Weißschuh wrote:
> Hi Hans,
>
> On Mon, Jan 30, 2023 at 09:36:32AM +0100, Hans de Goede wrote:
>> Hi,
>>
>> On 1/30/23 04:59, Thomas Weißschuh wrote:
>>> Since 52d225346904 ("HID: Make lowlevel driver structs const") the
>>> lowlevel HID drivers are only exposed as const.
>>>
>>> Take advantage of this to constify the underlying structures, too.
>>>
>>> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>>
>> Thanks, series looks good to me:
>>
>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>>
>> I'll also pick up / merge patches 7 + 8 into pdx86/for-next
>> sometime this week.
>
> Please note that patch 7 depends on commit 52d225346904
> ("HID: Make lowlevel driver structs const") which is not yet in Linus'
> tree, only in the HID tree (branch for-6.3/hid-core).
>
> Maybe it's better to take it via the HID tree or I can resend when the
> prerequisites are in Linus' tree.
Ah yes then it would be better to take the entire set through the HID tree,
here is my ack for that:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
>>> ---
>>> Thomas Weißschuh (9):
>>> HID: amd_sfh: Constify lowlevel HID driver
>>> HID: hyperv: Constify lowlevel HID driver
>>> HID: logitech-dj: Constify lowlevel HID driver
>>> HID: steam: Constify lowlevel HID driver
>>> HID: intel-ish-hid: Constify lowlevel HID driver
>>> HID: surface-hid: Constify lowlevel HID driver
>>> platform/x86: asus-tf103c-dock: Constify lowlevel HID driver
>>> platform/x86: asus-tf103c-dock: Constify toprow keymap
>>> staging: greybus: hid: Constify lowlevel HID driver
>>>
>>> drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 2 +-
>>> drivers/hid/hid-hyperv.c | 2 +-
>>> drivers/hid/hid-logitech-dj.c | 4 ++--
>>> drivers/hid/hid-steam.c | 2 +-
>>> drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +-
>>> drivers/hid/surface-hid/surface_hid_core.c | 2 +-
>>> drivers/platform/x86/asus-tf103c-dock.c | 4 ++--
>>> drivers/staging/greybus/hid.c | 2 +-
>>> 8 files changed, 10 insertions(+), 10 deletions(-)
>>> ---
>>> base-commit: e04955db6a7c3fc4a1e6978649b61a6f5f8028e3
>>> change-id: 20230130-hid-const-ll-driver-fcfdd3af11b8
>>>
>>> Best regards,
>>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/9] HID: Constify lowlevel HID drivers
2023-01-30 3:59 [PATCH 0/9] HID: Constify lowlevel HID drivers Thomas Weißschuh
` (9 preceding siblings ...)
2023-01-30 8:36 ` [PATCH 0/9] HID: Constify lowlevel HID drivers Hans de Goede
@ 2023-02-06 15:24 ` Benjamin Tissoires
10 siblings, 0 replies; 17+ messages in thread
From: Benjamin Tissoires @ 2023-02-06 15:24 UTC (permalink / raw)
To: Basavaraj Natikar, Jiri Kosina, K. Y. Srinivasan, Haiyang Zhang,
Wei Liu, Dexuan Cui, Filipe Laíns, Srinivas Pandruvada,
Maximilian Luz, Corentin Chary, Hans de Goede, Mark Gross,
Viresh Kumar, Johan Hovold, Alex Elder, Greg Kroah-Hartman,
Thomas Weißschuh
Cc: linux-input, linux-kernel, linux-hyperv, platform-driver-x86,
acpi4asus-user, greybus-dev, linux-staging
On Mon, 30 Jan 2023 03:59:36 +0000, Thomas Weißschuh wrote:
> Since 52d225346904 ("HID: Make lowlevel driver structs const") the
> lowlevel HID drivers are only exposed as const.
>
> Take advantage of this to constify the underlying structures, too.
>
>
Applied to hid/hid.git (for-6.3/hid-core), thanks!
[1/9] HID: amd_sfh: Constify lowlevel HID driver
https://git.kernel.org/hid/hid/c/65b7015bfe16
[2/9] HID: hyperv: Constify lowlevel HID driver
https://git.kernel.org/hid/hid/c/d38213a911c5
[3/9] HID: logitech-dj: Constify lowlevel HID driver
https://git.kernel.org/hid/hid/c/662eee8d46df
[4/9] HID: steam: Constify lowlevel HID driver
https://git.kernel.org/hid/hid/c/ddb6792f0ef2
[5/9] HID: intel-ish-hid: Constify lowlevel HID driver
https://git.kernel.org/hid/hid/c/3352c3e0bf9b
[6/9] HID: surface-hid: Constify lowlevel HID driver
https://git.kernel.org/hid/hid/c/dd350afc1757
[7/9] platform/x86: asus-tf103c-dock: Constify lowlevel HID driver
https://git.kernel.org/hid/hid/c/63509b149f1b
[8/9] platform/x86: asus-tf103c-dock: Constify toprow keymap
https://git.kernel.org/hid/hid/c/783c3394b493
[9/9] staging: greybus: hid: Constify lowlevel HID driver
https://git.kernel.org/hid/hid/c/ff17bb876014
Cheers,
--
Benjamin Tissoires <benjamin.tissoires@redhat.com>
^ permalink raw reply [flat|nested] 17+ messages in thread