diff mbox

rbd: add parentheses to object request iterator macros

Message ID 51152572.1060602@inktank.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Elder Feb. 8, 2013, 4:18 p.m. UTC
The for_each_obj_request*() macros should parenthesize their uses of
the ireq parameter.

Signed-off-by: Alex Elder <elder@inktank.com>
---
 drivers/block/rbd.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Josh Durgin Feb. 19, 2013, 7:15 p.m. UTC | #1
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>

On 02/08/2013 08:18 AM, Alex Elder wrote:
> The for_each_obj_request*() macros should parenthesize their uses of
> the ireq parameter.
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
>   drivers/block/rbd.c |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index 982963e..6e9e2c2 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -226,11 +226,11 @@ struct rbd_img_request {
>   };
>
>   #define for_each_obj_request(ireq, oreq) \
> -	list_for_each_entry(oreq, &ireq->obj_requests, links)
> +	list_for_each_entry(oreq, &(ireq)->obj_requests, links)
>   #define for_each_obj_request_from(ireq, oreq) \
> -	list_for_each_entry_from(oreq, &ireq->obj_requests, links)
> +	list_for_each_entry_from(oreq, &(ireq)->obj_requests, links)
>   #define for_each_obj_request_safe(ireq, oreq, n) \
> -	list_for_each_entry_safe_reverse(oreq, n, &ireq->obj_requests, links)
> +	list_for_each_entry_safe_reverse(oreq, n, &(ireq)->obj_requests, links)
>
>   struct rbd_snap {
>   	struct	device		dev;
>

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

Patch

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 982963e..6e9e2c2 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -226,11 +226,11 @@  struct rbd_img_request {
 };

 #define for_each_obj_request(ireq, oreq) \
-	list_for_each_entry(oreq, &ireq->obj_requests, links)
+	list_for_each_entry(oreq, &(ireq)->obj_requests, links)
 #define for_each_obj_request_from(ireq, oreq) \
-	list_for_each_entry_from(oreq, &ireq->obj_requests, links)
+	list_for_each_entry_from(oreq, &(ireq)->obj_requests, links)
 #define for_each_obj_request_safe(ireq, oreq, n) \
-	list_for_each_entry_safe_reverse(oreq, n, &ireq->obj_requests, links)
+	list_for_each_entry_safe_reverse(oreq, n, &(ireq)->obj_requests, links)

 struct rbd_snap {
 	struct	device		dev;