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] [day] [month] [year] [list]
Date:   Tue,  8 Oct 2019 15:01:49 +0200
From:   Andrzej Pietrasiewicz <andrzej.p@...labora.com>
To:     dri-devel@...ts.freedesktop.org
Cc:     kernel@...labora.com,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Sean Paul <sean@...rly.run>, David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, linux-kernel@...r.kernel.org
Subject: [PATCH] drm: Fix comment doc for format_modifiers

The parameter passes an array of uint64_t rather than an array
of structs, but the first words of the comment suggest that it passes
an array of structs - if the reader stops reading at the word "struct".

If the commit is read beyond that point the reader will likely confuse
"drm_format<SPACE>modifiers" with "drm_format<UNDERSCORE>modifiers" and
understand the meaning as "passing an array of elements which are of type
struct drm_format_modifier". That is not correct.

Only if the reader is able to read the comment as
"array of struct drm_format<SPACE>modifiers" will they be close to the
correct meaning. But still not quite there, because the modifiers do not
influence struct drm_format in any way - it is not clear what "a modifier
of a struct" would be.

The comment is changed to simply say that the parameter passes an array of
format modifiers, which is the correct meaning.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@...labora.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@...ux.intel.com>
---
 drivers/gpu/drm/drm_plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index d6ad60ab0d38..0d4f9172c0dd 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -160,7 +160,7 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
  * @funcs: callbacks for the new plane
  * @formats: array of supported formats (DRM_FORMAT\_\*)
  * @format_count: number of elements in @formats
- * @format_modifiers: array of struct drm_format modifiers terminated by
+ * @format_modifiers: array of format modifiers terminated by
  *                    DRM_FORMAT_MOD_INVALID
  * @type: type of plane (overlay, primary, cursor)
  * @name: printf style format string for the plane name, or NULL for default name
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ