lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALMYJDv2wWuLHucARDMMoAE_zqDce6BDUMt6U4hAPT3=DiLMYA@mail.gmail.com>
Date:	Thu, 2 May 2013 13:54:30 +0530
From:	Santosh Y <santoshsy@...il.com>
To:	Dolev Raviv <draviv@...eaurora.org>
Cc:	linux-scsi@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V4] scsi: ufs: add support for query requests

> +
> +/**
> + * ufshcd_compose_upiu - form UFS Protocol Information Unit(UPIU)
> + * @hba - UFS hba
> + * @lrb - pointer to local reference block
> + */
> +static int ufshcd_compose_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> +{
> +       u32 upiu_flags;
> +       int ret = 0;
> +
> +       switch (lrbp->command_type) {
> +       case UTP_CMD_TYPE_SCSI:
>         case UTP_CMD_TYPE_DEV_MANAGE:
> -               /* For query function implementation */
> +               ufshcd_prepare_req_desc(lrbp, &upiu_flags);
> +               if (lrbp->cmd && lrbp->command_type == UTP_CMD_TYPE_SCSI)

Sorry, probably missed it in the initial review. Here no need to check
for 'lrbp->cmd'.

> +                       ufshcd_prepare_utp_scsi_cmd_upiu(lrbp, upiu_flags);
> +               else if (lrbp->cmd)

no need to check here also

> +                       ufshcd_prepare_utp_query_req_upiu(hba, lrbp,
> +                                                               upiu_flags);
> +               else {
> +                       dev_err(hba->dev, "%s: Invalid UPIU request\n",
> +                               __func__);
> +                       ret = -EINVAL;
> +               }

remove this else part, this condition will never be true.

>                 break;
>         case UTP_CMD_TYPE_UFS:
>                 /* For UFS native command implementation */
> +               dev_err(hba->dev, "%s: UFS native command are not supported\n",
> +                       __func__);
> +               ret = -ENOTSUPP;
> +               break;
> +       default:
> +               ret = -ENOTSUPP;
> +               dev_err(hba->dev, "%s: unknown command type: 0x%x\n",
> +                               __func__, lrbp->command_type);
>                 break;
>         } /* end of switch */
> +
> +       return ret;
>  }
>


-- 
~Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ