[PATCH 2/3] drm/sysfb: Share helpers for integer validation
Javier Martinez Canillas
javierm at redhat.com
Wed Apr 9 11:57:58 UTC 2025
Thomas Zimmermann <tzimmermann at suse.de> writes:
> Provide sysfb helpers for validating framebuffer integer values
> against limits. Update drivers. If a driver did not specify a limit
> for a certain value, use INT_MAX.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> ---
> drivers/gpu/drm/sysfb/drm_sysfb.c | 27 ++++++++++++++++++++++
> drivers/gpu/drm/sysfb/drm_sysfb_helper.h | 9 ++++++++
> drivers/gpu/drm/sysfb/efidrm.c | 29 ++++--------------------
> drivers/gpu/drm/sysfb/ofdrm.c | 12 ++--------
> drivers/gpu/drm/sysfb/simpledrm.c | 14 ++----------
> drivers/gpu/drm/sysfb/vesadrm.c | 29 ++++--------------------
> 6 files changed, 48 insertions(+), 72 deletions(-)
>
> diff --git a/drivers/gpu/drm/sysfb/drm_sysfb.c b/drivers/gpu/drm/sysfb/drm_sysfb.c
> index c083d21fd9cab..97547ea5e2131 100644
> --- a/drivers/gpu/drm/sysfb/drm_sysfb.c
> +++ b/drivers/gpu/drm/sysfb/drm_sysfb.c
> @@ -1,8 +1,35 @@
> // SPDX-License-Identifier: GPL-2.0-only
>
> +#include <linux/export.h>
> +#include <linux/limits.h>
> +#include <linux/minmax.h>
> #include <linux/module.h>
>
> +#include <drm/drm_print.h>
> +
> #include "drm_sysfb_helper.h"
>
> MODULE_DESCRIPTION("Helpers for DRM sysfb drivers");
> MODULE_LICENSE("GPL");
> +
I think the convention is to put these MODULE_* macros at the end of the file?
Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
More information about the dri-devel
mailing list