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]
Date:   Mon, 19 Jun 2023 08:18:31 +0300
From:   Dan Carpenter <dan.carpenter@...aro.org>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Jiri Kosina <jikos@...nel.org>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-input@...r.kernel.org
Subject: Re: [PATCH] HID: Reorder fields in 'struct hid_field'

On Sun, Jun 18, 2023 at 10:08:07AM +0200, Christophe JAILLET wrote:
> diff --git a/include/linux/hid.h b/include/linux/hid.h
> index 39e21e3815ad..5be5e671c263 100644
> --- a/include/linux/hid.h
> +++ b/include/linux/hid.h
> @@ -480,9 +480,9 @@ struct hid_field {
>  	__s32     physical_maximum;
>  	__s32     unit_exponent;
>  	unsigned  unit;
> -	bool      ignored;		/* this field is ignored in this event */
>  	struct hid_report *report;	/* associated report */
>  	unsigned index;			/* index into report->field[] */
> +	bool      ignored;		/* this field is ignored in this event */
>  	/* hidinput data */
>  	struct hid_input *hidinput;	/* associated input structure */
>  	__u16 dpad;			/* dpad input code */

You could move the dpad next to the ignored to save another 4 bytes.
I think it is still grouped logically that way but I don't really know
what dpad is so I might be wrong.

  	struct hid_report *report;	/* associated report */
  	unsigned index;			/* index into report->field[] */
	bool      ignored;		/* this field is ignored in this event */
 	/* hidinput data */
  	__u16 dpad;			/* dpad input code */
  	struct hid_input *hidinput;	/* associated input structure */

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ