All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2195/2195] Staging: rdma: amso1100: Fix multiple assignments on single line.
@ 2015-10-25 10:35 Weston Silbaugh
  0 siblings, 0 replies; 4+ messages in thread
From: Weston Silbaugh @ 2015-10-25 10:35 UTC (permalink / raw
  To: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b, Weston Silbaugh

Multiple assignments should be avoided.

For example:

cm_event.ird = cm_event.ord = 128;

Should be:

cm_event.ird = 128;
cm_event.ord = 128;

Signed-off-by: Weston Silbaugh <weston.silbaugh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/staging/rdma/amso1100/c2_ae.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rdma/amso1100/c2_ae.c b/drivers/staging/rdma/amso1100/c2_ae.c
index eb7a92b..20d98b7 100644
--- a/drivers/staging/rdma/amso1100/c2_ae.c
+++ b/drivers/staging/rdma/amso1100/c2_ae.c
@@ -173,7 +173,8 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
 	resource_user_context =
 	    (void *) (unsigned long) wr->ae.ae_generic.user_context;
 
-	status = cm_event.status = c2_convert_cm_status(c2_wr_get_result(wr));
+	status = c2_convert_cm_status(c2_wr_get_result(wr));
+	cm_event.status = c2_convert_cm_status(c2_wr_get_result(wr));
 
 	pr_debug("event received c2_dev=%p, event_id=%d, "
 		"resource_indicator=%d, user_context=%p, status = %d\n",
@@ -294,7 +295,8 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
 		 * Until ird/ord negotiation via MPAv2 support is added, send
 		 * max supported values
 		 */
-		cm_event.ird = cm_event.ord = 128;
+		cm_event.ird = 128;
+		cm_event.ord = 128;
 
 		if (cm_id->event_handler)
 			cm_id->event_handler(cm_id, &cm_event);
-- 
2.4.3

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2195/2195] Staging: rdma: amso1100: Fix multiple assignments on single line.
@ 2015-10-25 10:50 Weston Silbaugh
       [not found] ` <1445770206-9645-1-git-send-email-weston.silbaugh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Weston Silbaugh @ 2015-10-25 10:50 UTC (permalink / raw
  To: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b, Weston Silbaugh

Multiple assignments should be avoided.

For example:

cm_event.ird = cm_event.ord = 128;

Should be:

cm_event.ird = 128;
cm_event.ord = 128;

Signed-off-by: Weston Silbaugh <weston.silbaugh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/staging/rdma/amso1100/c2_ae.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rdma/amso1100/c2_ae.c b/drivers/staging/rdma/amso1100/c2_ae.c
index eb7a92b..20d98b7 100644
--- a/drivers/staging/rdma/amso1100/c2_ae.c
+++ b/drivers/staging/rdma/amso1100/c2_ae.c
@@ -173,7 +173,8 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
 	resource_user_context =
 	    (void *) (unsigned long) wr->ae.ae_generic.user_context;
 
-	status = cm_event.status = c2_convert_cm_status(c2_wr_get_result(wr));
+	status = c2_convert_cm_status(c2_wr_get_result(wr));
+	cm_event.status = c2_convert_cm_status(c2_wr_get_result(wr));
 
 	pr_debug("event received c2_dev=%p, event_id=%d, "
 		"resource_indicator=%d, user_context=%p, status = %d\n",
@@ -294,7 +295,8 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
 		 * Until ird/ord negotiation via MPAv2 support is added, send
 		 * max supported values
 		 */
-		cm_event.ird = cm_event.ord = 128;
+		cm_event.ird = 128;
+		cm_event.ord = 128;
 
 		if (cm_id->event_handler)
 			cm_id->event_handler(cm_id, &cm_event);
-- 
2.4.3

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2195/2195] Staging: rdma: amso1100: Fix multiple assignments on single line.
       [not found] ` <1445770206-9645-1-git-send-email-weston.silbaugh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-10-25 11:12   ` Leon Romanovsky
  2015-10-25 16:31   ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2015-10-25 11:12 UTC (permalink / raw
  To: Weston Silbaugh
  Cc: gregkh, linux-rdma, devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b

On Sun, Oct 25, 2015 at 12:50 PM, Weston Silbaugh
<weston.silbaugh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Multiple assignments should be avoided.
>
> For example:
>
> cm_event.ird = cm_event.ord = 128;
>
> Should be:
>
> cm_event.ird = 128;
> cm_event.ord = 128;
>
> Signed-off-by: Weston Silbaugh <weston.silbaugh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/staging/rdma/amso1100/c2_ae.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rdma/amso1100/c2_ae.c b/drivers/staging/rdma/amso1100/c2_ae.c
> index eb7a92b..20d98b7 100644
> --- a/drivers/staging/rdma/amso1100/c2_ae.c
> +++ b/drivers/staging/rdma/amso1100/c2_ae.c
> @@ -173,7 +173,8 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
>         resource_user_context =
>             (void *) (unsigned long) wr->ae.ae_generic.user_context;
>
> -       status = cm_event.status = c2_convert_cm_status(c2_wr_get_result(wr));
> +       status = c2_convert_cm_status(c2_wr_get_result(wr));
> +       cm_event.status = c2_convert_cm_status(c2_wr_get_result(wr));
This is wrong fro two reasons:
1. In case of wrong status it will print twice the same error line
"Unable to convert CM status"
2. The better solution will be to rewrite the patch to remove "status
variable" at all.

>
>         pr_debug("event received c2_dev=%p, event_id=%d, "
>                 "resource_indicator=%d, user_context=%p, status = %d\n",
> @@ -294,7 +295,8 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
>                  * Until ird/ord negotiation via MPAv2 support is added, send
>                  * max supported values
>                  */
> -               cm_event.ird = cm_event.ord = 128;
> +               cm_event.ird = 128;
> +               cm_event.ord = 128;
>
>                 if (cm_id->event_handler)
>                         cm_id->event_handler(cm_id, &cm_event);
> --
> 2.4.3
>
> _______________________________________________
> devel mailing list
> devel-tBiZLqfeLfOHmIFyCCdPziST3g8Odh+X@public.gmane.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2195/2195] Staging: rdma: amso1100: Fix multiple assignments on single line.
       [not found] ` <1445770206-9645-1-git-send-email-weston.silbaugh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2015-10-25 11:12   ` Leon Romanovsky
@ 2015-10-25 16:31   ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2015-10-25 16:31 UTC (permalink / raw
  To: Weston Silbaugh
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b

On Sun, Oct 25, 2015 at 04:50:06AM -0600, Weston Silbaugh wrote:
> Multiple assignments should be avoided.
> 
> For example:
> 
> cm_event.ird = cm_event.ord = 128;
> 
> Should be:
> 
> cm_event.ird = 128;
> cm_event.ord = 128;
> 
> Signed-off-by: Weston Silbaugh <weston.silbaugh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Where are the 2194 other patches in this series?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-25 16:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-25 10:50 [PATCH 2195/2195] Staging: rdma: amso1100: Fix multiple assignments on single line Weston Silbaugh
     [not found] ` <1445770206-9645-1-git-send-email-weston.silbaugh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-25 11:12   ` Leon Romanovsky
2015-10-25 16:31   ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2015-10-25 10:35 Weston Silbaugh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.