diff mbox

[rdma-next,1/2] nes: Change accelerated flag to bool

Message ID 20171217182139.17096-2-shiraz.saleem@intel.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show

Commit Message

Shiraz Saleem Dec. 17, 2017, 6:21 p.m. UTC
The accelerated flag only utilizes two values: 0 and 1.
Modify accelerated flag in struct nes_cm_node to bool.

Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
---
 drivers/infiniband/hw/nes/nes_cm.c | 2 +-
 drivers/infiniband/hw/nes/nes_cm.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Yuval Shaia Dec. 18, 2017, 8:20 a.m. UTC | #1
On Sun, Dec 17, 2017 at 12:21:38PM -0600, Shiraz Saleem wrote:
> The accelerated flag only utilizes two values: 0 and 1.
> Modify accelerated flag in struct nes_cm_node to bool.
> 
> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
> ---
>  drivers/infiniband/hw/nes/nes_cm.c | 2 +-
>  drivers/infiniband/hw/nes/nes_cm.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
> index c56ca2a..6cdfbf8 100644
> --- a/drivers/infiniband/hw/nes/nes_cm.c
> +++ b/drivers/infiniband/hw/nes/nes_cm.c
> @@ -1365,7 +1365,7 @@ static int mini_cm_del_listen(struct nes_cm_core *cm_core,
>  static inline int mini_cm_accelerated(struct nes_cm_core *cm_core,
>  				      struct nes_cm_node *cm_node)
>  {
> -	cm_node->accelerated = 1;
> +	cm_node->accelerated = true;
>  
>  	if (cm_node->accept_pend) {
>  		BUG_ON(!cm_node->listener);
> diff --git a/drivers/infiniband/hw/nes/nes_cm.h b/drivers/infiniband/hw/nes/nes_cm.h
> index d827d03..d462797 100644
> --- a/drivers/infiniband/hw/nes/nes_cm.h
> +++ b/drivers/infiniband/hw/nes/nes_cm.h
> @@ -341,7 +341,7 @@ struct nes_cm_node {
>  	u16                       mpa_frame_size;
>  	struct iw_cm_id           *cm_id;
>  	struct list_head          list;
> -	int                       accelerated;
> +	bool                      accelerated;
>  	struct nes_cm_listener    *listener;
>  	enum nes_cm_conn_type     conn_type;
>  	struct nes_vnic           *nesvnic;
> -- 

Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>

> 2.8.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jason Gunthorpe Dec. 22, 2017, 11:44 p.m. UTC | #2
On Sun, Dec 17, 2017 at 12:21:38PM -0600, Shiraz Saleem wrote:
> The accelerated flag only utilizes two values: 0 and 1.
> Modify accelerated flag in struct nes_cm_node to bool.
> 
> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
>  drivers/infiniband/hw/nes/nes_cm.c | 2 +-
>  drivers/infiniband/hw/nes/nes_cm.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

I took this to for-next, the other one will wait until the -rc
dependent stuff gets done later..

Thanks,
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index c56ca2a..6cdfbf8 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1365,7 +1365,7 @@  static int mini_cm_del_listen(struct nes_cm_core *cm_core,
 static inline int mini_cm_accelerated(struct nes_cm_core *cm_core,
 				      struct nes_cm_node *cm_node)
 {
-	cm_node->accelerated = 1;
+	cm_node->accelerated = true;
 
 	if (cm_node->accept_pend) {
 		BUG_ON(!cm_node->listener);
diff --git a/drivers/infiniband/hw/nes/nes_cm.h b/drivers/infiniband/hw/nes/nes_cm.h
index d827d03..d462797 100644
--- a/drivers/infiniband/hw/nes/nes_cm.h
+++ b/drivers/infiniband/hw/nes/nes_cm.h
@@ -341,7 +341,7 @@  struct nes_cm_node {
 	u16                       mpa_frame_size;
 	struct iw_cm_id           *cm_id;
 	struct list_head          list;
-	int                       accelerated;
+	bool                      accelerated;
 	struct nes_cm_listener    *listener;
 	enum nes_cm_conn_type     conn_type;
 	struct nes_vnic           *nesvnic;