Staging: rdma: amso1100: Fix multiple assignments on single line.
Subsystems (2)
PATCH 2195/2195 Staging: rdma: amso1100: Fix multiple assignments on single line.
Multiple assignments should be avoided.
For example:
cm_event.ird = cm_event.ord = 128;
Should be:
cm_event.ird = 128;
cm_event.ord = 128;
--- drivers/staging/rdma/amso1100/c2_ae.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/rdma/amso1100/c2_ae.c +4 -2
@@ -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);
Signature · 6 lines
2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 21 lines · 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 <[email protected]>--- drivers/staging/rdma/amso1100/c2_ae.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/staging/rdma/amso1100/c2_ae.c +0
-0
drivers/staging/rdma/amso1100/c2_ae.c void c2_ae_event(struct c2_dev *c2dev, u32 mq_index) · line 177
Quoted 6 lines
drivers/staging/rdma/amso1100/c2_ae.c +2
-1@@ -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.
Quoted 16 lines
drivers/staging/rdma/amso1100/c2_ae.c +2
-2pr_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
Quoted 4 lines
_______________________________________________
devel mailing list [email protected]
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Weston Silbaugh
Multiple assignments should be avoided.
For example:
Quoted 8 lines
cm_event.ird = cm_event.ord = 128;
Should be:
cm_event.ird = 128;
cm_event.ord = 128;Signed-off-by Weston Silbaugh <[email protected]>
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html