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:	Thu, 18 Jun 2015 11:01:44 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Fabian Frederick <fabf@...net.be>
cc:	linux-kernel@...r.kernel.org, Julia Lawall <Julia.Lawall@...6.fr>,
	linux-input@...r.kernel.org
Subject: Re: [PATCH 1/1 linux-next] HID: use swap() in cp_report_fixup()

On Wed, 10 Jun 2015, Fabian Frederick wrote:

> Use kernel.h macro definition.
> 
> Thanks to Julia Lawall for Coccinelle scripting support.
> 
> Signed-off-by: Fabian Frederick <fabf@...net.be>

Applied to for-4.2/upstream. Thanks.

> ---
>  drivers/hid/hid-cypress.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/hid/hid-cypress.c b/drivers/hid/hid-cypress.c
> index c4ef3bc..1b764d1 100644
> --- a/drivers/hid/hid-cypress.c
> +++ b/drivers/hid/hid-cypress.c
> @@ -41,13 +41,9 @@ static __u8 *cp_report_fixup(struct hid_device *hdev, __u8 *rdesc,
>  
>  	for (i = 0; i < *rsize - 4; i++)
>  		if (rdesc[i] == 0x29 && rdesc[i + 2] == 0x19) {
> -			__u8 tmp;
> -
>  			rdesc[i] = 0x19;
>  			rdesc[i + 2] = 0x29;
> -			tmp = rdesc[i + 3];
> -			rdesc[i + 3] = rdesc[i + 1];
> -			rdesc[i + 1] = tmp;
> +			swap(rdesc[i + 3], rdesc[i + 1]);
>  		}
>  	return rdesc;
>  }

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ