Re: [PATCH] uas: use the BIT() macro

2015-11-05 Thread Hans de Goede

Hi,

On 05-11-15 16:20, Oliver Neukum wrote:

Use this macro to make the driver more readable.

Signed-off-by: Oliver Neukum 


Looks good to me:

Reviewed-by: Hans de Goede 

Regards,

Hans



---
  drivers/usb/storage/uas.c | 24 
  1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index eb68162..45ed241 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -49,18 +49,18 @@ struct uas_dev_info {
  };

  enum {
-   SUBMIT_STATUS_URB   = (1 << 1),
-   ALLOC_DATA_IN_URB   = (1 << 2),
-   SUBMIT_DATA_IN_URB  = (1 << 3),
-   ALLOC_DATA_OUT_URB  = (1 << 4),
-   SUBMIT_DATA_OUT_URB = (1 << 5),
-   ALLOC_CMD_URB   = (1 << 6),
-   SUBMIT_CMD_URB  = (1 << 7),
-   COMMAND_INFLIGHT= (1 << 8),
-   DATA_IN_URB_INFLIGHT= (1 << 9),
-   DATA_OUT_URB_INFLIGHT   = (1 << 10),
-   COMMAND_ABORTED = (1 << 11),
-   IS_IN_WORK_LIST = (1 << 12),
+   SUBMIT_STATUS_URB   = BIT(1),
+   ALLOC_DATA_IN_URB   = BIT(2),
+   SUBMIT_DATA_IN_URB  = BIT(3),
+   ALLOC_DATA_OUT_URB  = BIT(4),
+   SUBMIT_DATA_OUT_URB = BIT(5),
+   ALLOC_CMD_URB   = BIT(6),
+   SUBMIT_CMD_URB  = BIT(7),
+   COMMAND_INFLIGHT= BIT(8),
+   DATA_IN_URB_INFLIGHT= BIT(9),
+   DATA_OUT_URB_INFLIGHT   = BIT(10),
+   COMMAND_ABORTED = BIT(11),
+   IS_IN_WORK_LIST = BIT(12),
  };

  /* Overrides scsi_pointer */


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] uas: use the BIT() macro

2015-11-05 Thread Oliver Neukum
Use this macro to make the driver more readable.

Signed-off-by: Oliver Neukum 
---
 drivers/usb/storage/uas.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index eb68162..45ed241 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -49,18 +49,18 @@ struct uas_dev_info {
 };
 
 enum {
-   SUBMIT_STATUS_URB   = (1 << 1),
-   ALLOC_DATA_IN_URB   = (1 << 2),
-   SUBMIT_DATA_IN_URB  = (1 << 3),
-   ALLOC_DATA_OUT_URB  = (1 << 4),
-   SUBMIT_DATA_OUT_URB = (1 << 5),
-   ALLOC_CMD_URB   = (1 << 6),
-   SUBMIT_CMD_URB  = (1 << 7),
-   COMMAND_INFLIGHT= (1 << 8),
-   DATA_IN_URB_INFLIGHT= (1 << 9),
-   DATA_OUT_URB_INFLIGHT   = (1 << 10),
-   COMMAND_ABORTED = (1 << 11),
-   IS_IN_WORK_LIST = (1 << 12),
+   SUBMIT_STATUS_URB   = BIT(1),
+   ALLOC_DATA_IN_URB   = BIT(2),
+   SUBMIT_DATA_IN_URB  = BIT(3),
+   ALLOC_DATA_OUT_URB  = BIT(4),
+   SUBMIT_DATA_OUT_URB = BIT(5),
+   ALLOC_CMD_URB   = BIT(6),
+   SUBMIT_CMD_URB  = BIT(7),
+   COMMAND_INFLIGHT= BIT(8),
+   DATA_IN_URB_INFLIGHT= BIT(9),
+   DATA_OUT_URB_INFLIGHT   = BIT(10),
+   COMMAND_ABORTED = BIT(11),
+   IS_IN_WORK_LIST = BIT(12),
 };
 
 /* Overrides scsi_pointer */
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html