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>] [day] [month] [year] [list]
Message-ID: <4AC6FEC5.4000808@freemail.hu>
Date:	Sat, 03 Oct 2009 09:35:33 +0200
From:	Németh Márton <nm127@...email.hu>
To:	Jean-Francois Moine <moinejf@...e.fr>,
	Thomas Kaiser <thomas@...ser-linux.li>
CC:	V4L Mailing List <linux-media@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/3] pac7311: remove magic value for SKIP

From: Márton Németh <nm127@...email.hu>

Change the magic value 0xaa to SKIP for better understandability.

The change was tested with Labtec Webcam 2200.

Signed-off-by: Márton Németh <nm127@...email.hu>
---
diff -upr a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c
--- a/drivers/media/video/gspca/pac7311.c	2009-09-28 17:40:19.000000000 +0200
+++ b/drivers/media/video/gspca/pac7311.c	2009-10-03 08:27:36.000000000 +0200
@@ -316,7 +316,8 @@ static const __u8 start_7302[] = {
 	0, 0				/* end of sequence */
 };

-/* page 3 - the value 0xaa says skip the index - see reg_w_page() */
+#define SKIP		0xaa
+/* page 3 - the value SKIP says skip the index - see reg_w_page() */
 static const __u8 page3_7302[] = {
 	0x90, 0x40, 0x03, 0x50, 0xc2, 0x01, 0x14, 0x16,
 	0x14, 0x12, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00,
@@ -383,13 +384,13 @@ static const __u8 start_7311[] = {
 	0, 0				/* end of sequence */
 };

-/* page 4 - the value 0xaa says skip the index - see reg_w_page() */
+/* page 4 - the value SKIP says skip the index - see reg_w_page() */
 static const __u8 page4_7311[] = {
-	0xaa, 0xaa, 0x04, 0x54, 0x07, 0x2b, 0x09, 0x0f,
-	0x09, 0x00, 0xaa, 0xaa, 0x07, 0x00, 0x00, 0x62,
-	0x08, 0xaa, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x03, 0xa0, 0x01, 0xf4, 0xaa,
-	0xaa, 0x00, 0x08, 0xaa, 0x03, 0xaa, 0x00, 0x68,
+	SKIP, SKIP, 0x04, 0x54, 0x07, 0x2b, 0x09, 0x0f,
+	0x09, 0x00, SKIP, SKIP, 0x07, 0x00, 0x00, 0x62,
+	0x08, SKIP, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x03, 0xa0, 0x01, 0xf4, SKIP,
+	SKIP, 0x00, 0x08, SKIP, 0x03, SKIP, 0x00, 0x68,
 	0xca, 0x10, 0x06, 0x78, 0x00, 0x00, 0x00, 0x00,
 	0x23, 0x28, 0x04, 0x11, 0x00, 0x00
 };
@@ -438,7 +439,7 @@ static void reg_w_page(struct gspca_dev
 	int index;

 	for (index = 0; index < len; index++) {
-		if (page[index] == 0xaa)		/* skip this index */
+		if (page[index] == SKIP)		/* skip this index */
 			continue;
 		gspca_dev->usb_buf[0] = page[index];
 		usb_control_msg(gspca_dev->dev,
--
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