* [Intel-gfx] [PATCH 30/36] drm/i915/huc: use const struct bus_type pointers
[not found] <20230313182918.1312597-1-gregkh@linuxfoundation.org>
@ 2023-03-13 18:29 ` Greg Kroah-Hartman
2023-03-15 10:15 ` Tvrtko Ursulin
0 siblings, 1 reply; 2+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-13 18:29 UTC (permalink / raw)
To: linux-kernel
Cc: Alan Previn, rafael, Greg Kroah-Hartman, intel-gfx, dri-devel,
Daniel Vetter, Rodrigo Vivi, David Airlie, Vitaly Lubart
The struct bus_type pointers in the functions
intel_huc_register_gsc_notifier() and
intel_huc_unregister_gsc_notifier() should be a const pointer, as the
structure is not modified anywhere in the functions, and the pointer
they are passed will be a const * in the near future.
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Tony Ye <tony.ye@intel.com>
Cc: Vitaly Lubart <vitaly.lubart@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Note, this is a patch that is a prepatory cleanup as part of a larger
series of patches that is working on resolving some old driver core
design mistakes. It will build and apply cleanly on top of 6.3-rc2 on
its own, but I'd prefer if I could take it through my driver-core tree
so that the driver core changes can be taken through there for 6.4-rc1.
drivers/gpu/drm/i915/gt/uc/intel_huc.c | 4 ++--
drivers/gpu/drm/i915/gt/uc/intel_huc.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.c b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
index 410905da8e97..8b453bd7c953 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_huc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
@@ -183,7 +183,7 @@ static int gsc_notifier(struct notifier_block *nb, unsigned long action, void *d
return 0;
}
-void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus)
+void intel_huc_register_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus)
{
int ret;
@@ -200,7 +200,7 @@ void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus
}
}
-void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, struct bus_type *bus)
+void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus)
{
if (!huc->delayed_load.nb.notifier_call)
return;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.h b/drivers/gpu/drm/i915/gt/uc/intel_huc.h
index 52db03620c60..05d4832f8461 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_huc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.h
@@ -51,8 +51,8 @@ int intel_huc_check_status(struct intel_huc *huc);
void intel_huc_update_auth_status(struct intel_huc *huc);
bool intel_huc_is_authenticated(struct intel_huc *huc);
-void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus);
-void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, struct bus_type *bus);
+void intel_huc_register_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus);
+void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus);
static inline int intel_huc_sanitize(struct intel_huc *huc)
{
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Intel-gfx] [PATCH 30/36] drm/i915/huc: use const struct bus_type pointers
2023-03-13 18:29 ` [Intel-gfx] [PATCH 30/36] drm/i915/huc: use const struct bus_type pointers Greg Kroah-Hartman
@ 2023-03-15 10:15 ` Tvrtko Ursulin
0 siblings, 0 replies; 2+ messages in thread
From: Tvrtko Ursulin @ 2023-03-15 10:15 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel
Cc: Alan Previn, rafael, intel-gfx, dri-devel, Daniel Vetter,
Rodrigo Vivi, David Airlie, Vitaly Lubart
On 13/03/2023 18:29, Greg Kroah-Hartman wrote:
> The struct bus_type pointers in the functions
> intel_huc_register_gsc_notifier() and
> intel_huc_unregister_gsc_notifier() should be a const pointer, as the
> structure is not modified anywhere in the functions, and the pointer
> they are passed will be a const * in the near future.
>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
> Cc: John Harrison <John.C.Harrison@Intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Tony Ye <tony.ye@intel.com>
> Cc: Vitaly Lubart <vitaly.lubart@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> Note, this is a patch that is a prepatory cleanup as part of a larger
> series of patches that is working on resolving some old driver core
> design mistakes. It will build and apply cleanly on top of 6.3-rc2 on
> its own, but I'd prefer if I could take it through my driver-core tree
> so that the driver core changes can be taken through there for 6.4-rc1.
Sounds fine to me.
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
>
> drivers/gpu/drm/i915/gt/uc/intel_huc.c | 4 ++--
> drivers/gpu/drm/i915/gt/uc/intel_huc.h | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.c b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
> index 410905da8e97..8b453bd7c953 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_huc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
> @@ -183,7 +183,7 @@ static int gsc_notifier(struct notifier_block *nb, unsigned long action, void *d
> return 0;
> }
>
> -void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus)
> +void intel_huc_register_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus)
> {
> int ret;
>
> @@ -200,7 +200,7 @@ void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus
> }
> }
>
> -void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, struct bus_type *bus)
> +void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus)
> {
> if (!huc->delayed_load.nb.notifier_call)
> return;
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.h b/drivers/gpu/drm/i915/gt/uc/intel_huc.h
> index 52db03620c60..05d4832f8461 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_huc.h
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.h
> @@ -51,8 +51,8 @@ int intel_huc_check_status(struct intel_huc *huc);
> void intel_huc_update_auth_status(struct intel_huc *huc);
> bool intel_huc_is_authenticated(struct intel_huc *huc);
>
> -void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus);
> -void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, struct bus_type *bus);
> +void intel_huc_register_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus);
> +void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus);
>
> static inline int intel_huc_sanitize(struct intel_huc *huc)
> {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-15 10:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230313182918.1312597-1-gregkh@linuxfoundation.org>
2023-03-13 18:29 ` [Intel-gfx] [PATCH 30/36] drm/i915/huc: use const struct bus_type pointers Greg Kroah-Hartman
2023-03-15 10:15 ` Tvrtko Ursulin
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).