lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87bkuwza83.fsf@intel.com>
Date:   Mon, 13 Jun 2022 21:31:24 +0300
From:   Jani Nikula <jani.nikula@...ux.intel.com>
To:     José Expósito <jose.exposito89@...il.com>,
        javierm@...hat.com
Cc:     davidgow@...gle.com, dlatypov@...gle.com, tzimmermann@...e.de,
        maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
        airlied@...ux.ie, daniel@...ll.ch, dri-devel@...ts.freedesktop.org,
        kunit-dev@...glegroups.com, linux-kernel@...r.kernel.org,
        José Expósito 
        <jose.exposito89@...il.com>
Subject: Re: [PATCH v3 1/3] drm/rect: Add DRM_RECT_INIT() macro

On Mon, 13 Jun 2022, José Expósito <jose.exposito89@...il.com> wrote:
> Add a helper macro to initialize a rectangle from x, y, width and
> height information.
>
> Signed-off-by: José Expósito <jose.exposito89@...il.com>

Reviewed-by: Jani Nikula <jani.nikula@...el.com>

> ---
>  include/drm/drm_rect.h | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/include/drm/drm_rect.h b/include/drm/drm_rect.h
> index 6f6e19bd4dac..e8d94fca2703 100644
> --- a/include/drm/drm_rect.h
> +++ b/include/drm/drm_rect.h
> @@ -47,6 +47,22 @@ struct drm_rect {
>  	int x1, y1, x2, y2;
>  };
>  
> +/**
> + * DRM_RECT_INIT - initialize a rectangle from x/y/w/h
> + * @x: x coordinate
> + * @y: y coordinate
> + * @w: width
> + * @h: height
> + *
> + * RETURNS:
> + * A new rectangle of the specified size.
> + */
> +#define DRM_RECT_INIT(x, y, w, h) ((struct drm_rect){ \
> +		.x1 = (x), \
> +		.y1 = (y), \
> +		.x2 = (x) + (w), \
> +		.y2 = (y) + (h) })
> +
>  /**
>   * DRM_RECT_FMT - printf string for &struct drm_rect
>   */

-- 
Jani Nikula, Intel Open Source Graphics Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ