Re: [PATCH 5/5] lpfc: use rport as argument for lpfc_chk_tgt_mapped()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hannes,

On Wed, Aug 18, 2021 at 7:12 PM Hannes Reinecke <hare@xxxxxxx> wrote:
>
> We only need the rport structure for lpfc_chk_tgt_mapped().
>
> Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
> Cc: James Smart <james.smart@xxxxxxxxxxxx>
> ---
>  drivers/scsi/lpfc/lpfc_scsi.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
> index 184ca2a90414..f09330a7e667 100644
> --- a/drivers/scsi/lpfc/lpfc_scsi.c
> +++ b/drivers/scsi/lpfc/lpfc_scsi.c
> @@ -6092,19 +6092,20 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct fc_rport *rport,
>   *  0x2002 - Success
>   **/
>  static int
> -lpfc_chk_tgt_mapped(struct lpfc_vport *vport, struct scsi_cmnd *cmnd)
> +lpfc_chk_tgt_mapped(struct lpfc_vport *vport, struct fc_rport *rport)
>  {
>         struct lpfc_rport_data *rdata;
> -       struct lpfc_nodelist *pnode;
> +       struct lpfc_nodelist *pnode = NULL;

Do we need to initialise this variable ...

>         unsigned long later;
>
> -       rdata = lpfc_rport_data_from_scsi_device(cmnd->device);
> +       rdata = rport->dd_data;
>         if (!rdata) {
>                 lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP,
>                         "0797 Tgt Map rport failure: rdata x%px\n", rdata);
>                 return FAILED;
>         }
>         pnode = rdata->pnode;

... as we're assigning it here and don't use it before this line?

Thanks,

-- 
Julian Calaby

Email: julian.calaby@xxxxxxxxx
Profile: http://www.google.com/profiles/julian.calaby/



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux