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: <211701e4ae42acd95afb24713314bce5a4c58ecf.1540580493.git.shayenneluzmoura@gmail.com>
Date:   Fri, 26 Oct 2018 16:04:45 -0300
From:   Shayenne da Luz Moura <shayenneluzmoura@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Hans de Goede <hdegoede@...hat.com>,
        Michael Thayer <michael.thayer@...cle.com>
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        outreachy-kernel@...glegroups.com
Subject: [RESEND PATCH 2/2] staging: vboxvideo: Use unsigned int instead bool

This change was suggested by checkpath.pl. Use unsigned int with bitfield
allocate only one bit to the boolean variable.

CHECK: Avoid using bool structure members because of possible alignment
issues

Signed-off-by: Shayenne da Luz Moura <shayenneluzmoura@...il.com>
---
 drivers/staging/vboxvideo/vbox_drv.h        | 14 +++++++-------
 drivers/staging/vboxvideo/vboxvideo_guest.h |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/vboxvideo/vbox_drv.h b/drivers/staging/vboxvideo/vbox_drv.h
index 594f84272957..7d3e329a6b1c 100644
--- a/drivers/staging/vboxvideo/vbox_drv.h
+++ b/drivers/staging/vboxvideo/vbox_drv.h
@@ -81,7 +81,7 @@ struct vbox_private {
 	u8 __iomem *vbva_buffers;
 	struct gen_pool *guest_pool;
 	struct vbva_buf_ctx *vbva_info;
-	bool any_pitch;
+	unsigned int any_pitch:1;
 	u32 num_crtcs;
 	/** Amount of available VRAM, including space used for buffers. */
 	u32 full_vram_size;
@@ -106,7 +106,7 @@ struct vbox_private {
 	 * depending on whether they react to a hot-plug event after the initial
 	 * mode query.
 	 */
-	bool initial_mode_queried;
+	unsigned int initial_mode_queried:1;
 	struct work_struct hotplug_work;
 	u32 input_mapping_width;
 	u32 input_mapping_height;
@@ -114,7 +114,7 @@ struct vbox_private {
 	 * Is user-space using an X.Org-style layout of one large frame-buffer
 	 * encompassing all screen ones or is the fbdev console active?
 	 */
-	bool single_framebuffer;
+	unsigned int single_framebuffer:1;
 	u32 cursor_width;
 	u32 cursor_height;
 	u32 cursor_hot_x;
@@ -139,17 +139,17 @@ struct vbox_connector {
 	struct {
 		u32 width;
 		u32 height;
-		bool disconnected;
+		unsigned int disconnected:1;
 	} mode_hint;
 };
 
 struct vbox_crtc {
 	struct drm_crtc base;
-	bool blanked;
-	bool disconnected;
+	unsigned int blanked:1;
+	unsigned int disconnected:1;
 	unsigned int crtc_id;
 	u32 fb_offset;
-	bool cursor_enabled;
+	unsigned int cursor_enabled:1;
 	u32 x_hint;
 	u32 y_hint;
 };
diff --git a/drivers/staging/vboxvideo/vboxvideo_guest.h b/drivers/staging/vboxvideo/vboxvideo_guest.h
index d09da841711a..7a98fb4fb108 100644
--- a/drivers/staging/vboxvideo/vboxvideo_guest.h
+++ b/drivers/staging/vboxvideo/vboxvideo_guest.h
@@ -36,7 +36,7 @@ struct vbva_buf_ctx {
 	/** Length of the buffer in bytes */
 	u32 buffer_length;
 	/** Set if we wrote to the buffer faster than the host could read it */
-	bool buffer_overflow;
+	unsigned int buffer_overflow:1;
 	/** VBVA record that we are currently preparing for the host, or NULL */
 	struct vbva_record *record;
 	/**
-- 
2.19.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ