diff mbox series

[v2,2/3] accel/ivpu: remove DRIVER_DATE conditional drm_driver init

Message ID 20241028185141.3756176-2-jani.nikula@intel.com (mailing list archive)
State New
Headers show
Series [v2,1/3] drm/xen: remove redundant initialization info print | expand

Commit Message

Jani Nikula Oct. 28, 2024, 6:51 p.m. UTC
The ivpu struct drm_driver has conditional initialization based on #ifdef
DRIVER_DATE, which is never defined anywhere. Neither are the macros
referenced within the block: DRIVER_DATE, DRIVER_MAJOR, DRIVER_MINOR,
and DRIVER_PATCHLEVEL. With the struct drm_driver date member going away
anyway, just remove the conditional compilation.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>

---

Note: I prefer to merge this together with the other patches via
drm-misc-next.

Cc: David Airlie <airlied@gmail.com>
Cc: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Oded Gabbay <ogabbay@kernel.org>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/accel/ivpu/ivpu_drv.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Alex Deucher Oct. 28, 2024, 8:54 p.m. UTC | #1
On Mon, Oct 28, 2024 at 2:52 PM Jani Nikula <jani.nikula@intel.com> wrote:
>
> The ivpu struct drm_driver has conditional initialization based on #ifdef
> DRIVER_DATE, which is never defined anywhere. Neither are the macros
> referenced within the block: DRIVER_DATE, DRIVER_MAJOR, DRIVER_MINOR,
> and DRIVER_PATCHLEVEL. With the struct drm_driver date member going away
> anyway, just remove the conditional compilation.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Acked-by: Alex Deucher <alexander.deucher@amd.com>

>
> ---
>
> Note: I prefer to merge this together with the other patches via
> drm-misc-next.
>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Oded Gabbay <ogabbay@kernel.org>
> Cc: Simona Vetter <simona@ffwll.ch>
> Cc: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: dri-devel@lists.freedesktop.org
> ---
>  drivers/accel/ivpu/ivpu_drv.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
> index e7d8967c02f2..07c7e5a5f22b 100644
> --- a/drivers/accel/ivpu/ivpu_drv.c
> +++ b/drivers/accel/ivpu/ivpu_drv.c
> @@ -456,15 +456,8 @@ static const struct drm_driver driver = {
>         .name = DRIVER_NAME,
>         .desc = DRIVER_DESC,
>
> -#ifdef DRIVER_DATE
> -       .date = DRIVER_DATE,
> -       .major = DRIVER_MAJOR,
> -       .minor = DRIVER_MINOR,
> -       .patchlevel = DRIVER_PATCHLEVEL,
> -#else
>         .date = UTS_RELEASE,
>         .major = 1,
> -#endif
>  };
>
>  static void ivpu_context_abort_invalid(struct ivpu_device *vdev)
> --
> 2.39.5
>
Jacek Lawrynowicz Oct. 29, 2024, 8:38 p.m. UTC | #2
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>

On 10/28/2024 7:51 PM, Jani Nikula wrote:
> The ivpu struct drm_driver has conditional initialization based on #ifdef
> DRIVER_DATE, which is never defined anywhere. Neither are the macros
> referenced within the block: DRIVER_DATE, DRIVER_MAJOR, DRIVER_MINOR,
> and DRIVER_PATCHLEVEL. With the struct drm_driver date member going away
> anyway, just remove the conditional compilation.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> 
> ---
> 
> Note: I prefer to merge this together with the other patches via
> drm-misc-next.
> 
> Cc: David Airlie <airlied@gmail.com>
> Cc: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Oded Gabbay <ogabbay@kernel.org>
> Cc: Simona Vetter <simona@ffwll.ch>
> Cc: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: dri-devel@lists.freedesktop.org
> ---
>  drivers/accel/ivpu/ivpu_drv.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
> index e7d8967c02f2..07c7e5a5f22b 100644
> --- a/drivers/accel/ivpu/ivpu_drv.c
> +++ b/drivers/accel/ivpu/ivpu_drv.c
> @@ -456,15 +456,8 @@ static const struct drm_driver driver = {
>  	.name = DRIVER_NAME,
>  	.desc = DRIVER_DESC,
>  
> -#ifdef DRIVER_DATE
> -	.date = DRIVER_DATE,
> -	.major = DRIVER_MAJOR,
> -	.minor = DRIVER_MINOR,
> -	.patchlevel = DRIVER_PATCHLEVEL,
> -#else
>  	.date = UTS_RELEASE,
>  	.major = 1,
> -#endif
>  };
>  
>  static void ivpu_context_abort_invalid(struct ivpu_device *vdev)
diff mbox series

Patch

diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
index e7d8967c02f2..07c7e5a5f22b 100644
--- a/drivers/accel/ivpu/ivpu_drv.c
+++ b/drivers/accel/ivpu/ivpu_drv.c
@@ -456,15 +456,8 @@  static const struct drm_driver driver = {
 	.name = DRIVER_NAME,
 	.desc = DRIVER_DESC,
 
-#ifdef DRIVER_DATE
-	.date = DRIVER_DATE,
-	.major = DRIVER_MAJOR,
-	.minor = DRIVER_MINOR,
-	.patchlevel = DRIVER_PATCHLEVEL,
-#else
 	.date = UTS_RELEASE,
 	.major = 1,
-#endif
 };
 
 static void ivpu_context_abort_invalid(struct ivpu_device *vdev)