* [PATCH v3 0/2] scsi: ufs: convert probe to use dev_err_probe()
@ 2023-08-14 18:43 Brian Masney
2023-08-14 18:43 ` [PATCH v3 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init Brian Masney
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Brian Masney @ 2023-08-14 18:43 UTC (permalink / raw)
To: jejb, martin.petersen
Cc: alim.akhtar, avri.altman, bvanassche, linux-scsi, linux-kernel,
hugo, quic_nguyenb
The following two log messages are shown on bootup due to an
-EPROBE_DEFER when booting on a Qualcomm sa8775p development board:
ufshcd-qcom 1d84000.ufs: ufshcd_variant_hba_init: variant qcom init
failed err -517
ufshcd-qcom 1d84000.ufs: Initialization failed
This patch series converts the relevant two probe functions over to use
dev_err_probe() so that these messages are not shown on bootup.
Changes since v2
https://lore.kernel.org/lkml/20230809191054.2197963-1-bmasney@redhat.com/
- Add error code to message in second patch
Changes since v1
https://lore.kernel.org/lkml/20230808142650.1713432-1-bmasney@redhat.com/
- Dropped code cleanup from first patch
Brian Masney (2):
scsi: ufs: core: convert to dev_err_probe() in hba_init
scsi: ufs: host: convert to dev_err_probe() in pltfrm_init
drivers/ufs/core/ufshcd.c | 5 +++--
drivers/ufs/host/ufshcd-pltfrm.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init
2023-08-14 18:43 [PATCH v3 0/2] scsi: ufs: convert probe to use dev_err_probe() Brian Masney
@ 2023-08-14 18:43 ` Brian Masney
2023-08-14 19:31 ` Bart Van Assche
2023-08-14 18:43 ` [PATCH v3 2/2] scsi: ufs: host: convert to dev_err_probe() in pltfrm_init Brian Masney
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Brian Masney @ 2023-08-14 18:43 UTC (permalink / raw)
To: jejb, martin.petersen
Cc: alim.akhtar, avri.altman, bvanassche, linux-scsi, linux-kernel,
hugo, quic_nguyenb
Convert ufshcd_variant_hba_init() over to use dev_err_probe() to avoid
log messages like the following on bootup:
ufshcd-qcom 1d84000.ufs: ufshcd_variant_hba_init: variant qcom init
failed err -517
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
Changes since v2
- None
Changes since v1
- Dropped code cleanup
drivers/ufs/core/ufshcd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 129446775796..409d176542e1 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -9235,8 +9235,9 @@ static int ufshcd_variant_hba_init(struct ufs_hba *hba)
err = ufshcd_vops_init(hba);
if (err)
- dev_err(hba->dev, "%s: variant %s init failed err %d\n",
- __func__, ufshcd_get_var_name(hba), err);
+ dev_err_probe(hba->dev, err,
+ "%s: variant %s init failed err %d\n",
+ __func__, ufshcd_get_var_name(hba), err);
out:
return err;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 2/2] scsi: ufs: host: convert to dev_err_probe() in pltfrm_init
2023-08-14 18:43 [PATCH v3 0/2] scsi: ufs: convert probe to use dev_err_probe() Brian Masney
2023-08-14 18:43 ` [PATCH v3 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init Brian Masney
@ 2023-08-14 18:43 ` Brian Masney
2023-08-15 3:25 ` Bao D. Nguyen
2023-08-21 20:45 ` [PATCH v3 0/2] scsi: ufs: convert probe to use dev_err_probe() Martin K. Petersen
2023-08-25 1:12 ` Martin K. Petersen
3 siblings, 1 reply; 9+ messages in thread
From: Brian Masney @ 2023-08-14 18:43 UTC (permalink / raw)
To: jejb, martin.petersen
Cc: alim.akhtar, avri.altman, bvanassche, linux-scsi, linux-kernel,
hugo, quic_nguyenb
Convert ufshcd_pltfrm_init() over to use dev_err_probe() to avoid
the following log message on bootup due to an -EPROBE_DEFER return
code:
ufshcd-qcom 1d84000.ufs: Initialization failed
While this line is changed, let's also go ahead and add the error code
to the message as well.
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
Changes since v2
- Add error code to message
Changes since v1
- None
drivers/ufs/host/ufshcd-pltfrm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/ufs/host/ufshcd-pltfrm.c b/drivers/ufs/host/ufshcd-pltfrm.c
index 0b7430033047..c81a14f9eaf5 100644
--- a/drivers/ufs/host/ufshcd-pltfrm.c
+++ b/drivers/ufs/host/ufshcd-pltfrm.c
@@ -373,7 +373,8 @@ int ufshcd_pltfrm_init(struct platform_device *pdev,
err = ufshcd_init(hba, mmio_base, irq);
if (err) {
- dev_err(dev, "Initialization failed\n");
+ dev_err_probe(dev, err, "Initialization failed with error %d\n",
+ err);
goto dealloc_host;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init
2023-08-14 18:43 ` [PATCH v3 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init Brian Masney
@ 2023-08-14 19:31 ` Bart Van Assche
2023-08-14 21:18 ` Brian Masney
0 siblings, 1 reply; 9+ messages in thread
From: Bart Van Assche @ 2023-08-14 19:31 UTC (permalink / raw)
To: Brian Masney, jejb, martin.petersen
Cc: alim.akhtar, avri.altman, linux-scsi, linux-kernel, hugo, quic_nguyenb
On 8/14/23 11:43, Brian Masney wrote:
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 129446775796..409d176542e1 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -9235,8 +9235,9 @@ static int ufshcd_variant_hba_init(struct ufs_hba *hba)
>
> err = ufshcd_vops_init(hba);
> if (err)
> - dev_err(hba->dev, "%s: variant %s init failed err %d\n",
> - __func__, ufshcd_get_var_name(hba), err);
> + dev_err_probe(hba->dev, err,
> + "%s: variant %s init failed err %d\n",
> + __func__, ufshcd_get_var_name(hba), err);
> out:
> return err;
> }
This opportunity could have been used to improve the grammar of the reported
error message. Anyway:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init
2023-08-14 19:31 ` Bart Van Assche
@ 2023-08-14 21:18 ` Brian Masney
2023-08-14 21:24 ` Bart Van Assche
0 siblings, 1 reply; 9+ messages in thread
From: Brian Masney @ 2023-08-14 21:18 UTC (permalink / raw)
To: Bart Van Assche
Cc: jejb, martin.petersen, alim.akhtar, avri.altman, linux-scsi,
linux-kernel, hugo, quic_nguyenb
On Mon, Aug 14, 2023 at 12:31:31PM -0700, Bart Van Assche wrote:
> On 8/14/23 11:43, Brian Masney wrote:
> > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> > index 129446775796..409d176542e1 100644
> > --- a/drivers/ufs/core/ufshcd.c
> > +++ b/drivers/ufs/core/ufshcd.c
> > @@ -9235,8 +9235,9 @@ static int ufshcd_variant_hba_init(struct ufs_hba *hba)
> > err = ufshcd_vops_init(hba);
> > if (err)
> > - dev_err(hba->dev, "%s: variant %s init failed err %d\n",
> > - __func__, ufshcd_get_var_name(hba), err);
> > + dev_err_probe(hba->dev, err,
> > + "%s: variant %s init failed err %d\n",
> > + __func__, ufshcd_get_var_name(hba), err);
> > out:
> > return err;
> > }
>
> This opportunity could have been used to improve the grammar of the reported
> error message. Anyway:
That's what I originally did in v1, however I was asked to split out the
cleanup into a different patch. Split out, I think the cleanup on it's
own isn't worth it's own patch, so that's why I dropped it.
https://lore.kernel.org/lkml/20230808142650.1713432-2-bmasney@redhat.com/
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Thanks!
Brian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init
2023-08-14 21:18 ` Brian Masney
@ 2023-08-14 21:24 ` Bart Van Assche
0 siblings, 0 replies; 9+ messages in thread
From: Bart Van Assche @ 2023-08-14 21:24 UTC (permalink / raw)
To: Brian Masney
Cc: jejb, martin.petersen, alim.akhtar, avri.altman, linux-scsi,
linux-kernel, hugo, quic_nguyenb
On 8/14/23 14:18, Brian Masney wrote:
> On Mon, Aug 14, 2023 at 12:31:31PM -0700, Bart Van Assche wrote:
>> On 8/14/23 11:43, Brian Masney wrote:
>>> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
>>> index 129446775796..409d176542e1 100644
>>> --- a/drivers/ufs/core/ufshcd.c
>>> +++ b/drivers/ufs/core/ufshcd.c
>>> @@ -9235,8 +9235,9 @@ static int ufshcd_variant_hba_init(struct ufs_hba *hba)
>>> err = ufshcd_vops_init(hba);
>>> if (err)
>>> - dev_err(hba->dev, "%s: variant %s init failed err %d\n",
>>> - __func__, ufshcd_get_var_name(hba), err);
>>> + dev_err_probe(hba->dev, err,
>>> + "%s: variant %s init failed err %d\n",
>>> + __func__, ufshcd_get_var_name(hba), err);
>>> out:
>>> return err;
>>> }
>>
>> This opportunity could have been used to improve the grammar of the reported
>> error message. Anyway:
>
> That's what I originally did in v1, however I was asked to split out the
> cleanup into a different patch. Split out, I think the cleanup on it's
> own isn't worth it's own patch, so that's why I dropped it.
>
> https://lore.kernel.org/lkml/20230808142650.1713432-2-bmasney@redhat.com/
Changing an error message and introducing dev_err_probe() at the same time is
fine. I don't think that is what the reviewer complained about. The complaint
probably was about renaming 'err' into 'ret' and about changing 'goto out'
into 'return 0'?
Thanks,
Bart.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 2/2] scsi: ufs: host: convert to dev_err_probe() in pltfrm_init
2023-08-14 18:43 ` [PATCH v3 2/2] scsi: ufs: host: convert to dev_err_probe() in pltfrm_init Brian Masney
@ 2023-08-15 3:25 ` Bao D. Nguyen
0 siblings, 0 replies; 9+ messages in thread
From: Bao D. Nguyen @ 2023-08-15 3:25 UTC (permalink / raw)
To: Brian Masney, jejb, martin.petersen
Cc: alim.akhtar, avri.altman, bvanassche, linux-scsi, linux-kernel, hugo
> diff --git a/drivers/ufs/host/ufshcd-pltfrm.c b/drivers/ufs/host/ufshcd-pltfrm.c
> index 0b7430033047..c81a14f9eaf5 100644
> --- a/drivers/ufs/host/ufshcd-pltfrm.c
> +++ b/drivers/ufs/host/ufshcd-pltfrm.c
> @@ -373,7 +373,8 @@ int ufshcd_pltfrm_init(struct platform_device *pdev,
>
> err = ufshcd_init(hba, mmio_base, irq);
> if (err) {
> - dev_err(dev, "Initialization failed\n");
> + dev_err_probe(dev, err, "Initialization failed with error %d\n",
> + err);
> goto dealloc_host;
> }
>
Reviewed-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 0/2] scsi: ufs: convert probe to use dev_err_probe()
2023-08-14 18:43 [PATCH v3 0/2] scsi: ufs: convert probe to use dev_err_probe() Brian Masney
2023-08-14 18:43 ` [PATCH v3 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init Brian Masney
2023-08-14 18:43 ` [PATCH v3 2/2] scsi: ufs: host: convert to dev_err_probe() in pltfrm_init Brian Masney
@ 2023-08-21 20:45 ` Martin K. Petersen
2023-08-25 1:12 ` Martin K. Petersen
3 siblings, 0 replies; 9+ messages in thread
From: Martin K. Petersen @ 2023-08-21 20:45 UTC (permalink / raw)
To: Brian Masney
Cc: jejb, martin.petersen, alim.akhtar, avri.altman, bvanassche,
linux-scsi, linux-kernel, hugo, quic_nguyenb
Brian,
> The following two log messages are shown on bootup due to an
> -EPROBE_DEFER when booting on a Qualcomm sa8775p development board:
>
> ufshcd-qcom 1d84000.ufs: ufshcd_variant_hba_init: variant qcom init
> failed err -517
> ufshcd-qcom 1d84000.ufs: Initialization failed
>
> This patch series converts the relevant two probe functions over to use
> dev_err_probe() so that these messages are not shown on bootup.
Applied to 6.6/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 0/2] scsi: ufs: convert probe to use dev_err_probe()
2023-08-14 18:43 [PATCH v3 0/2] scsi: ufs: convert probe to use dev_err_probe() Brian Masney
` (2 preceding siblings ...)
2023-08-21 20:45 ` [PATCH v3 0/2] scsi: ufs: convert probe to use dev_err_probe() Martin K. Petersen
@ 2023-08-25 1:12 ` Martin K. Petersen
3 siblings, 0 replies; 9+ messages in thread
From: Martin K. Petersen @ 2023-08-25 1:12 UTC (permalink / raw)
To: jejb, Brian Masney
Cc: Martin K . Petersen, alim.akhtar, avri.altman, bvanassche,
linux-scsi, linux-kernel, hugo, quic_nguyenb
On Mon, 14 Aug 2023 14:43:50 -0400, Brian Masney wrote:
> The following two log messages are shown on bootup due to an
> -EPROBE_DEFER when booting on a Qualcomm sa8775p development board:
>
> ufshcd-qcom 1d84000.ufs: ufshcd_variant_hba_init: variant qcom init
> failed err -517
> ufshcd-qcom 1d84000.ufs: Initialization failed
>
> [...]
Applied to 6.6/scsi-queue, thanks!
[1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init
https://git.kernel.org/mkp/scsi/c/137523237172
[2/2] scsi: ufs: host: convert to dev_err_probe() in pltfrm_init
https://git.kernel.org/mkp/scsi/c/517f8eb3fa64
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-08-25 1:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-14 18:43 [PATCH v3 0/2] scsi: ufs: convert probe to use dev_err_probe() Brian Masney
2023-08-14 18:43 ` [PATCH v3 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init Brian Masney
2023-08-14 19:31 ` Bart Van Assche
2023-08-14 21:18 ` Brian Masney
2023-08-14 21:24 ` Bart Van Assche
2023-08-14 18:43 ` [PATCH v3 2/2] scsi: ufs: host: convert to dev_err_probe() in pltfrm_init Brian Masney
2023-08-15 3:25 ` Bao D. Nguyen
2023-08-21 20:45 ` [PATCH v3 0/2] scsi: ufs: convert probe to use dev_err_probe() Martin K. Petersen
2023-08-25 1:12 ` Martin K. Petersen
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).