diff mbox

[1/1] ufs: scsi: fix sparse errors in ufshcd_system_suspend

Message ID 000301cfe0ed$e5221200$af663600$@codeaurora.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

subhashj@codeaurora.org Oct. 5, 2014, 10:44 p.m. UTC
Looks good, Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>

-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Dolev Raviv
Sent: Sunday, October 05, 2014 7:10 AM
To: James.Bottomley@HansenPartnership.com; hch@infradead.org
Cc: linux-scsi@vger.kernel.org; linux-arm-msm@vger.kernel.org;
santoshsy@gmail.com; Dolev Raviv
Subject: [PATCH 1/1] ufs: scsi: fix sparse errors in ufshcd_system_suspend

This patch fixes newly introduced sparse warning in ufshcd_system_suspend,
introduced by UFS power management series.

Sparse warning:
drivers/scsi/ufs/ufshcd.c:5118 ufshcd_system_suspend()
error: we previously assumed 'hba' could be null (see line 5089)

To fix it, we return 0 in case HBA is not initialized or is not powered.

Signed-off-by: Dolev Raviv <draviv@codeaurora.org>

--
1.8.5.2
--
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the
body of a message to majordomo@vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Christoph Hellwig Oct. 11, 2014, 11:06 a.m. UTC | #1
On Sun, Oct 05, 2014 at 03:44:16PM -0700, Subhash Jadavani wrote:
> Looks good, Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>

I'm getting a bit lost with all the UFS fixes, can you prepared a series
with all the fixups required for 3.18 for me please?

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoph Hellwig Oct. 21, 2014, 2:05 p.m. UTC | #2
On Sat, Oct 11, 2014 at 04:06:29AM -0700, Christoph Hellwig wrote:
> On Sun, Oct 05, 2014 at 03:44:16PM -0700, Subhash Jadavani wrote:
> > Looks good, Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
> 
> I'm getting a bit lost with all the UFS fixes, can you prepared a series
> with all the fixups required for 3.18 for me please?

Are you going to prepare a set of fixups for 3.18, or should I try to
cram them together?  I supect you'd do a much better job than I could.
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
subhashj@codeaurora.org Oct. 21, 2014, 6:50 p.m. UTC | #3
> Are you going to prepare a set of fixups for 3.18, or should I try to cram
them together?  I supect you'd do a much better job than I could.

Agreed. There are 3 patches already posted for sparse warning fixes but then
there were 5 new reports of sparse warning. So we (Dolev Raviv and myself)
would try to fix them soon and post all 8 patches as single patch series so
that it would be easy trace. In addition, there will be one more fix for the
issue reported by Akinobu Mita, will include it in the same in patch series.
We should be able to send you these fixes by early next week if not earlier.

-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Christoph Hellwig
Sent: Tuesday, October 21, 2014 7:06 AM
To: Subhash Jadavani
Cc: 'Dolev Raviv'; James.Bottomley@HansenPartnership.com;
linux-scsi@vger.kernel.org; linux-arm-msm@vger.kernel.org;
santoshsy@gmail.com
Subject: Re: [PATCH 1/1] ufs: scsi: fix sparse errors in
ufshcd_system_suspend

On Sat, Oct 11, 2014 at 04:06:29AM -0700, Christoph Hellwig wrote:
> On Sun, Oct 05, 2014 at 03:44:16PM -0700, Subhash Jadavani wrote:
> > Looks good, Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
> 
> I'm getting a bit lost with all the UFS fixes, can you prepared a 
> series with all the fixups required for 3.18 for me please?

Are you going to prepare a set of fixups for 3.18, or should I try to cram
them together?  I supect you'd do a much better job than I could.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the
body of a message to majordomo@vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index
497c38a..836ea72 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -5087,7 +5087,7 @@  int ufshcd_system_suspend(struct ufs_hba *hba)
 	int ret = 0;
 
 	if (!hba || !hba->is_powered)
-		goto out;
+		return 0;
 
 	if (pm_runtime_suspended(hba->dev)) {
 		if (hba->rpm_lvl == hba->spm_lvl)