dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Yang Li <yang.lee@linux.alibaba.com>,
	"christian.koenig@amd.com" <christian.koenig@amd.com>
Cc: "dick.kennedy@broadcom.com" <dick.kennedy@broadcom.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"james.smart@broadcom.com" <james.smart@broadcom.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [PATCH] scsi: lpfc: Remove unneeded return variable
Date: Thu, 4 Feb 2021 09:48:07 +0000	[thread overview]
Message-ID: <SN4PR0401MB3598D8B3DDA6C490AA934DE19BB39@SN4PR0401MB3598.namprd04.prod.outlook.com> (raw)
In-Reply-To: 1612424125-91111-1-git-send-email-yang.lee@linux.alibaba.com

On 04/02/2021 08:37, Yang Li wrote:
> This patch removes unneeded return variables, using only
> '1' instead.
> It fixes the following warning detected by coccinelle:
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  drivers/scsi/lpfc/lpfc_sli.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index 95caad7..31f97f6 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -3376,7 +3376,6 @@ struct lpfc_hbq_init *lpfc_hbq_defs[] = {
>  			  struct lpfc_iocbq *saveq)
>  {
>  	struct lpfc_iocbq *cmdiocbp;
> -	int rc = 1;
>  	unsigned long iflag;
>  
>  	cmdiocbp = lpfc_sli_iocbq_lookup(phba, pring, saveq);
> @@ -3501,7 +3500,7 @@ struct lpfc_hbq_init *lpfc_hbq_defs[] = {
>  		}
>  	}
>  
> -	return rc;
> +	return 1;
>  }
>  
>  /**
> 

I suppose this is in 'lpfc_sli_process_sol_iocb()'. It's return 
value doesn't get handled either:

                case LPFC_SOL_IOCB:                                              
                        spin_unlock_irqrestore(&phba->hbalock, iflag);           
                        rc = lpfc_sli_process_sol_iocb(phba, pring, saveq);      
                        spin_lock_irqsave(&phba->hbalock, iflag);                
                        break;                                                   
[...]                                                       
                }                                                                
                                                                                 
                if (free_saveq) {                                                
                        list_for_each_entry_safe(rspiocbp, next_iocb,            
                                                 &saveq->list, list) {           
                                list_del_init(&rspiocbp->list);                  
                                __lpfc_sli_release_iocbq(phba, rspiocbp);        
                        }                                                        
                        __lpfc_sli_release_iocbq(phba, saveq);                   
                }                                                                
                rspiocbp = NULL;                                                 
        }                                                                        
        spin_unlock_irqrestore(&phba->hbalock, iflag);                           
        return rspiocbp;
}

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2021-02-04 10:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04  7:35 [PATCH] scsi: lpfc: Remove unneeded return variable Yang Li
2021-02-04  9:48 ` Johannes Thumshirn [this message]

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=SN4PR0401MB3598D8B3DDA6C490AA934DE19BB39@SN4PR0401MB3598.namprd04.prod.outlook.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=christian.koenig@amd.com \
    --cc=dick.kennedy@broadcom.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=james.smart@broadcom.com \
    --cc=jejb@linux.ibm.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yang.lee@linux.alibaba.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;
as well as URLs for NNTP newsgroup(s).