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: <1420868171-2031-11-git-send-email-chris@rorvick.com>
Date:	Fri,  9 Jan 2015 23:35:56 -0600
From:	Chris Rorvick <chris@...vick.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Chris Rorvick <chris@...vick.com>,
	Alexey Khoroshilov <khoroshilov@...ras.ru>,
	Davide Berardi <berardi.dav@...il.com>,
	devel@...verdev.osuosl.org,
	Fabian Mewes <architekt@...ing4coffee.org>,
	Gulsah Kose <gulsah.1004@...il.com>,
	Himangi Saraogi <himangi774@...il.com>,
	Jerry Snitselaar <dev@...tselaar.org>,
	L. Alberto Giménez <agimenez@...valve.es>,
	linux-kernel@...r.kernel.org, Mikhail Boiko <mm.boiko@...dex.ru>,
	Monam Agarwal <monamagarwal123@...il.com>,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>,
	Stefan Hajnoczi <stefanha@...il.com>,
	Takashi Iwai <tiwai@...e.de>
Subject: [PATCH 10/25] staging: line6: Rename capability macros

Including "BIT" in the macro name is pointless.  Replace with "CAP" to
provide some context for what its value represents.

Signed-off-by: Chris Rorvick <chris@...vick.com>
---
 drivers/staging/line6/driver.c   |  8 ++++----
 drivers/staging/line6/midi.c     |  2 +-
 drivers/staging/line6/pcm.c      |  2 +-
 drivers/staging/line6/playback.c |  2 +-
 drivers/staging/line6/pod.c      |  2 +-
 drivers/staging/line6/usbdefs.h  | 12 ++++++------
 6 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index acde205..4ec87a3 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -59,7 +59,7 @@ MODULE_DEVICE_TABLE(usb, line6_id_table);
 
 #define L6PROP(dev_id, dev_name, dev_cap)\
 	{.id = dev_id,\
-	 .name = dev_name, .capabilities = LINE6_BIT_##dev_cap}
+	 .name = dev_name, .capabilities = LINE6_CAP_##dev_cap}
 
 static const struct line6_properties line6_properties_table[] = {
 	L6PROP("BassPODxt",     "BassPODxt",        CTRL_PCM_HW),
@@ -830,7 +830,7 @@ static int line6_probe(struct usb_interface *interface,
 
 	usb_set_intfdata(interface, line6);
 
-	if (properties->capabilities & LINE6_BIT_CONTROL) {
+	if (properties->capabilities & LINE6_CAP_CONTROL) {
 		/* initialize USB buffers: */
 		line6->buffer_listen =
 		    kmalloc(LINE6_BUFSIZE_LISTEN, GFP_KERNEL);
@@ -1052,7 +1052,7 @@ static int line6_suspend(struct usb_interface *interface, pm_message_t message)
 
 	snd_power_change_state(line6->card, SNDRV_CTL_POWER_D3hot);
 
-	if (line6->properties->capabilities & LINE6_BIT_CONTROL)
+	if (line6->properties->capabilities & LINE6_CAP_CONTROL)
 		line6_stop_listen(line6);
 
 	if (line6pcm != NULL) {
@@ -1071,7 +1071,7 @@ static int line6_resume(struct usb_interface *interface)
 {
 	struct usb_line6 *line6 = usb_get_intfdata(interface);
 
-	if (line6->properties->capabilities & LINE6_BIT_CONTROL)
+	if (line6->properties->capabilities & LINE6_CAP_CONTROL)
 		line6_start_listen(line6);
 
 	snd_power_change_state(line6->card, SNDRV_CTL_POWER_D0);
diff --git a/drivers/staging/line6/midi.c b/drivers/staging/line6/midi.c
index 1ac343b..c453485 100644
--- a/drivers/staging/line6/midi.c
+++ b/drivers/staging/line6/midi.c
@@ -279,7 +279,7 @@ int line6_init_midi(struct usb_line6 *line6)
 	int err;
 	struct snd_line6_midi *line6midi;
 
-	if (!(line6->properties->capabilities & LINE6_BIT_CONTROL)) {
+	if (!(line6->properties->capabilities & LINE6_CAP_CONTROL)) {
 		/* skip MIDI initialization and report success */
 		return 0;
 	}
diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c
index 86c7bcb..e09772f 100644
--- a/drivers/staging/line6/pcm.c
+++ b/drivers/staging/line6/pcm.c
@@ -424,7 +424,7 @@ int line6_init_pcm(struct usb_line6 *line6,
 	int ep_read = 0, ep_write = 0;
 	struct snd_line6_pcm *line6pcm;
 
-	if (!(line6->properties->capabilities & LINE6_BIT_PCM))
+	if (!(line6->properties->capabilities & LINE6_CAP_PCM))
 		return 0;	/* skip PCM initialization and report success */
 
 	/* initialize PCM subsystem based on device: */
diff --git a/drivers/staging/line6/playback.c b/drivers/staging/line6/playback.c
index 2ca8900..54b7f60 100644
--- a/drivers/staging/line6/playback.c
+++ b/drivers/staging/line6/playback.c
@@ -261,7 +261,7 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
 #endif
 			if (!
 			    (line6pcm->line6->
-			     properties->capabilities & LINE6_BIT_HWMON)
+			     properties->capabilities & LINE6_CAP_HWMON)
 			    && (line6pcm->flags & LINE6_BITS_PLAYBACK_STREAM)
 			    && (line6pcm->flags & LINE6_BITS_CAPTURE_STREAM))
 				add_monitor_signal(urb_out, line6pcm->prev_fbuf,
diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index 7b4ec92f..0fb1788 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -396,7 +396,7 @@ static int pod_try_init(struct usb_interface *interface,
 	   handler.
 	 */
 
-	if (pod->line6.properties->capabilities & LINE6_BIT_CONTROL) {
+	if (pod->line6.properties->capabilities & LINE6_CAP_CONTROL) {
 		pod->monitor_level = POD_SYSTEM_INVALID;
 
 		/* initiate startup procedure: */
diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h
index c897dba..d6e46ee 100644
--- a/drivers/staging/line6/usbdefs.h
+++ b/drivers/staging/line6/usbdefs.h
@@ -15,15 +15,15 @@
 #define USB_INTERVALS_PER_SECOND 1000
 
 /* device supports settings parameter via USB */
-#define LINE6_BIT_CONTROL (1 << 0)
+#define LINE6_CAP_CONTROL (1 << 0)
 /* device supports PCM input/output via USB */
-#define LINE6_BIT_PCM (1 << 1)
+#define LINE6_CAP_PCM (1 << 1)
 /* device support hardware monitoring */
-#define LINE6_BIT_HWMON (1 << 2)
+#define LINE6_CAP_HWMON (1 << 2)
 
-#define LINE6_BIT_CTRL_PCM_HW	(LINE6_BIT_CONTROL |	\
-					 LINE6_BIT_PCM |	\
-					 LINE6_BIT_HWMON)
+#define LINE6_CAP_CTRL_PCM_HW	(LINE6_CAP_CONTROL |	\
+					 LINE6_CAP_PCM |	\
+					 LINE6_CAP_HWMON)
 
 #define LINE6_FALLBACK_INTERVAL 10
 #define LINE6_FALLBACK_MAXPACKETSIZE 16
-- 
2.1.0

--
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