public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Weihang Li <liweihang@huawei.com>
Cc: dledford@redhat.com, jgg@nvidia.com, linux-rdma@vger.kernel.org,
	linuxarm@huawei.com
Subject: Re: [PATCH for-next 3/6] RDMA/core: Add necessary spaces
Date: Tue, 6 Apr 2021 11:41:41 +0300	[thread overview]
Message-ID: <YGwexRBkApaxvnGp@unreal> (raw)
In-Reply-To: <1617697184-48683-4-git-send-email-liweihang@huawei.com>

On Tue, Apr 06, 2021 at 04:19:41PM +0800, Weihang Li wrote:
> From: Wenpeng Liang <liangwenpeng@huawei.com>
> 
> Space is required before '(', around '==' and around '='.
> 
> Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
> Signed-off-by: Weihang Li <liweihang@huawei.com>
> ---
>  drivers/infiniband/core/cm.c      | 2 +-
>  drivers/infiniband/core/cm_msgs.h | 4 ++--
>  drivers/infiniband/core/iwcm.c    | 2 +-
>  drivers/infiniband/core/ucma.c    | 4 ++--
>  4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
> index 32c836b..28c8d13 100644
> --- a/drivers/infiniband/core/cm.c
> +++ b/drivers/infiniband/core/cm.c
> @@ -3099,7 +3099,7 @@ int ib_send_cm_mra(struct ib_cm_id *cm_id,
>  	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
>  
>  	spin_lock_irqsave(&cm_id_priv->lock, flags);
> -	switch(cm_id_priv->id.state) {
> +	switch (cm_id_priv->id.state) {
>  	case IB_CM_REQ_RCVD:
>  		cm_state = IB_CM_MRA_REQ_SENT;
>  		lap_state = cm_id->lap_state;
> diff --git a/drivers/infiniband/core/cm_msgs.h b/drivers/infiniband/core/cm_msgs.h
> index 0cc4065..8462de7 100644
> --- a/drivers/infiniband/core/cm_msgs.h
> +++ b/drivers/infiniband/core/cm_msgs.h
> @@ -22,7 +22,7 @@
>  static inline enum ib_qp_type cm_req_get_qp_type(struct cm_req_msg *req_msg)
>  {
>  	u8 transport_type = IBA_GET(CM_REQ_TRANSPORT_SERVICE_TYPE, req_msg);
> -	switch(transport_type) {
> +	switch (transport_type) {
>  	case 0: return IB_QPT_RC;
>  	case 1: return IB_QPT_UC;
>  	case 3:
> @@ -37,7 +37,7 @@ static inline enum ib_qp_type cm_req_get_qp_type(struct cm_req_msg *req_msg)
>  static inline void cm_req_set_qp_type(struct cm_req_msg *req_msg,
>  				      enum ib_qp_type qp_type)
>  {
> -	switch(qp_type) {
> +	switch (qp_type) {
>  	case IB_QPT_UC:
>  		IBA_SET(CM_REQ_TRANSPORT_SERVICE_TYPE, req_msg, 1);
>  		break;
> diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
> index da8adad..ee5ab1c 100644
> --- a/drivers/infiniband/core/iwcm.c
> +++ b/drivers/infiniband/core/iwcm.c
> @@ -211,7 +211,7 @@ static void free_cm_id(struct iwcm_id_private *cm_id_priv)
>   */
>  static int iwcm_deref_id(struct iwcm_id_private *cm_id_priv)
>  {
> -	BUG_ON(atomic_read(&cm_id_priv->refcount)==0);
> +	BUG_ON(atomic_read(&cm_id_priv->refcount) == 0);

Simply delete this BUG_ON.

Thanks

>  	if (atomic_dec_and_test(&cm_id_priv->refcount)) {
>  		BUG_ON(!list_empty(&cm_id_priv->work_list));
>  		free_cm_id(cm_id_priv);
> diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
> index 21dda69..15d57ba 100644
> --- a/drivers/infiniband/core/ucma.c
> +++ b/drivers/infiniband/core/ucma.c
> @@ -231,7 +231,7 @@ static void ucma_copy_conn_event(struct rdma_ucm_conn_param *dst,
>  		memcpy(dst->private_data, src->private_data,
>  		       src->private_data_len);
>  	dst->private_data_len = src->private_data_len;
> -	dst->responder_resources =src->responder_resources;
> +	dst->responder_resources = src->responder_resources;
>  	dst->initiator_depth = src->initiator_depth;
>  	dst->flow_control = src->flow_control;
>  	dst->retry_count = src->retry_count;
> @@ -1034,7 +1034,7 @@ static void ucma_copy_conn_param(struct rdma_cm_id *id,
>  {
>  	dst->private_data = src->private_data;
>  	dst->private_data_len = src->private_data_len;
> -	dst->responder_resources =src->responder_resources;
> +	dst->responder_resources = src->responder_resources;
>  	dst->initiator_depth = src->initiator_depth;
>  	dst->flow_control = src->flow_control;
>  	dst->retry_count = src->retry_count;
> -- 
> 2.8.1
> 

  reply	other threads:[~2021-04-06  8:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  8:19 [PATCH for-next 0/6] RDMA/core: Correct some coding-style issues Weihang Li
2021-04-06  8:19 ` [PATCH for-next 1/6] RDMA/core: Print the function name by __func__ instead of an fixed string Weihang Li
2021-04-06  8:19 ` [PATCH for-next 2/6] RDMA/core: Remove the redundant return statements Weihang Li
2021-04-06  8:19 ` [PATCH for-next 3/6] RDMA/core: Add necessary spaces Weihang Li
2021-04-06  8:41   ` Leon Romanovsky [this message]
2021-04-06 11:56     ` liweihang
2021-04-06  8:19 ` [PATCH for-next 4/6] RDMA/core: Remove redundant spaces Weihang Li
2021-04-06  8:43   ` Leon Romanovsky
2021-04-06 12:19     ` liweihang
2021-04-06  8:19 ` [PATCH for-next 5/6] RDMA/core: Correct format of braces Weihang Li
2021-04-06  8:19 ` [PATCH for-next 6/6] RDMA/core: Correct format of block comments Weihang Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YGwexRBkApaxvnGp@unreal \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=liweihang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox