All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: Caleb Connolly <caleb@connolly.tech>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "ejb@linux.ibm.com" <ejb@linux.ibm.com>,
	"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
	"cang@codeaurora.org" <cang@codeaurora.org>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"jaegeuk@kernel.org" <jaegeuk@kernel.org>,
	"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>
Subject: RE: [PATCH v3 1/3] scsi: ufshcd: use a function to calculate versions
Date: Thu, 11 Mar 2021 07:35:27 +0000	[thread overview]
Message-ID: <DM6PR04MB657599A46A10F959FCC23485FC909@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <f8284c73-34d1-e1a7-6c47-563a0057a9c0@connolly.tech>

> Hi Avri,
> 
> On 10/03/2021 4:34 pm, Avri Altman wrote:
> >> @@ -9298,10 +9291,7 @@ int ufshcd_init(struct ufs_hba *hba, void
> __iomem
> >> *mmio_base, unsigned int irq)
> >>          /* Get UFS version supported by the controller */
> >>          hba->ufs_version = ufshcd_get_ufs_version(hba);
> >>
> >> -       if ((hba->ufs_version != UFSHCI_VERSION_10) &&
> >> -           (hba->ufs_version != UFSHCI_VERSION_11) &&
> >> -           (hba->ufs_version != UFSHCI_VERSION_20) &&
> >> -           (hba->ufs_version != UFSHCI_VERSION_21))
> >> +       if (hba->ufs_version < ufshci_version(1, 0))
> >>                  dev_err(hba->dev, "invalid UFS version 0x%x\n",
> >>                          hba->ufs_version);
> > Here you replaces the specific allowable values, with an expression
> > That doesn't really reflects those values.
> 
> I took this approach based on feedback from previous patches:
> 
> https://lore.kernel.org/linux-
> scsi/d1b23943b6b3ae6c1f6af041cc592932@codeaurora.org/
> 
> https://lkml.org/lkml/2020/4/25/159
> 
> 
> Patch 3 of this series removes this check entirely, as it is neither
> accurate or useful.
I noticed that.

> 
> The driver does not fail when printing this error, nor is the list of
> "valid" UFS versions here kept up to date, I struggle to see a situation
> in which that error message would actually be helpful. Responses to
> previous patches (above) that added UFS 3.0 to the list have all
> suggested that removing this check is a more sensible approach.
OK.

Thanks,
Avri

  reply	other threads:[~2021-03-11  7:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 15:33 v3: scsi: ufshcd: use a macro for UFS versions Caleb Connolly
2021-03-10 15:33 ` [PATCH v3 1/3] scsi: ufshcd: use a function to calculate versions Caleb Connolly
2021-03-10 16:34   ` Avri Altman
2021-03-10 17:06     ` Caleb Connolly
2021-03-11  7:35       ` Avri Altman [this message]
2021-03-10 15:33 ` [PATCH v3 2/3] scsi: ufs: qcom: use ufshci_version function Caleb Connolly
2021-03-10 15:34 ` [PATCH v3 3/3] scsi: ufshcd: remove version check Caleb Connolly
2021-03-11  8:19 ` v3: scsi: ufshcd: use a macro for UFS versions Bean Huo
2021-03-17  3:21 ` Martin K. Petersen
2021-03-19  3:46 ` Martin K. Petersen

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=DM6PR04MB657599A46A10F959FCC23485FC909@DM6PR04MB6575.namprd04.prod.outlook.com \
    --to=avri.altman@wdc.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=beanhuo@micron.com \
    --cc=caleb@connolly.tech \
    --cc=cang@codeaurora.org \
    --cc=ejb@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=jaegeuk@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanley.chu@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.