Skip to contentSkip to conversation

scsi: ufs-exynos: add UFS host support for Exynos SoCs

PATCH Julia Lawall 2 participants 2 messages Mar 19, 2020 SCSI

lore
Share & tools
lore
#0 lore raw

Perhaps this is intentional, but please check lines 931-935.

julia

---------- Forwarded message ----------
Date: Thu, 19 Mar 2020 09:31:14 +0800
From: kbuild test robot <[email protected]>
To: [email protected]
Cc: Julia Lawall <[email protected]>
Subject: Re: [PATCH v2 4/5] scsi: ufs-exynos: add UFS host support for Exynos
SoCs

CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Alim Akhtar <[email protected]>
CC: [email protected], [email protected], [email protected]

Hi Alim,

I love your patch! Perhaps something to improve:

[auto build test WARNING on phy/next]
[also build test WARNING on scsi/for-next robh/for-next mkp-scsi/for-next v5.6-rc6 next-20200318] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Alim-Akhtar/exynos-ufs-Add-support-for-UFS-HCI/20200319-022156
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git next

:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago

If you fix the issue, kindly add following tag

Quoted 1 line
Quoted 1 line

drivers/scsi/ufs/ufs-exynos.c:931:8-10: WARNING: possible condition with no effect (if == else)

# https://github.com/0day-ci/linux/commit/a0a2731081dba4edfad146c501203adb97d5947b
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout a0a2731081dba4edfad146c501203adb97d5947b
vim +931 drivers/scsi/ufs/ufs-exynos.c

a0a2731081dba4 Alim Akhtar 2020-03-18  898
a0a2731081dba4 Alim Akhtar 2020-03-18  899  static void exynos_ufs_specify_pwr_mode(struct device_node *np,
a0a2731081dba4 Alim Akhtar 2020-03-18  900  				struct exynos_ufs *ufs)
a0a2731081dba4 Alim Akhtar 2020-03-18  901  {
a0a2731081dba4 Alim Akhtar 2020-03-18  902  	struct uic_pwr_mode *pwr = &ufs->pwr_req;
a0a2731081dba4 Alim Akhtar 2020-03-18  903  	const char *str = NULL;
a0a2731081dba4 Alim Akhtar 2020-03-18  904
a0a2731081dba4 Alim Akhtar 2020-03-18  905  	if (!of_property_read_string(np, "ufs,pwr-attr-mode", &str)) {
a0a2731081dba4 Alim Akhtar 2020-03-18  906  		if (!strncmp(str, "FAST", sizeof("FAST")))
a0a2731081dba4 Alim Akhtar 2020-03-18  907  			pwr->mode = FAST_MODE;
a0a2731081dba4 Alim Akhtar 2020-03-18  908  		else if (!strncmp(str, "SLOW", sizeof("SLOW")))
a0a2731081dba4 Alim Akhtar 2020-03-18  909  			pwr->mode = SLOW_MODE;
a0a2731081dba4 Alim Akhtar 2020-03-18  910  		else if (!strncmp(str, "FAST_auto", sizeof("FAST_auto")))
a0a2731081dba4 Alim Akhtar 2020-03-18  911  			pwr->mode = FASTAUTO_MODE;
a0a2731081dba4 Alim Akhtar 2020-03-18  912  		else if (!strncmp(str, "SLOW_auto", sizeof("SLOW_auto")))
a0a2731081dba4 Alim Akhtar 2020-03-18  913  			pwr->mode = SLOWAUTO_MODE;
a0a2731081dba4 Alim Akhtar 2020-03-18  914  		else
a0a2731081dba4 Alim Akhtar 2020-03-18  915  			pwr->mode = FAST_MODE;
a0a2731081dba4 Alim Akhtar 2020-03-18  916  	} else {
a0a2731081dba4 Alim Akhtar 2020-03-18  917  		pwr->mode = FAST_MODE;
a0a2731081dba4 Alim Akhtar 2020-03-18  918  	}
a0a2731081dba4 Alim Akhtar 2020-03-18  919
a0a2731081dba4 Alim Akhtar 2020-03-18  920  	if (of_property_read_u32(np, "ufs,pwr-attr-lane", &pwr->lane))
a0a2731081dba4 Alim Akhtar 2020-03-18  921  		pwr->lane = 1;
a0a2731081dba4 Alim Akhtar 2020-03-18  922
a0a2731081dba4 Alim Akhtar 2020-03-18  923  	if (of_property_read_u32(np, "ufs,pwr-attr-gear", &pwr->gear))
a0a2731081dba4 Alim Akhtar 2020-03-18  924  		pwr->gear = 1;
a0a2731081dba4 Alim Akhtar 2020-03-18  925
a0a2731081dba4 Alim Akhtar 2020-03-18  926  	if (IS_UFS_PWR_MODE_HS(pwr->mode)) {
a0a2731081dba4 Alim Akhtar 2020-03-18  927  		if (!of_property_read_string(np,
a0a2731081dba4 Alim Akhtar 2020-03-18  928  					"ufs,pwr-attr-hs-series", &str)) {
a0a2731081dba4 Alim Akhtar 2020-03-18  929  			if (!strncmp(str, "HS_rate_b", sizeof("HS_rate_b")))
a0a2731081dba4 Alim Akhtar 2020-03-18  930  				pwr->hs_series = PA_HS_MODE_B;
a0a2731081dba4 Alim Akhtar 2020-03-18 @931  			else if (!strncmp(str, "HS_rate_a",
a0a2731081dba4 Alim Akhtar 2020-03-18  932  					sizeof("HS_rate_a")))
a0a2731081dba4 Alim Akhtar 2020-03-18  933  				pwr->hs_series = PA_HS_MODE_A;
a0a2731081dba4 Alim Akhtar 2020-03-18  934  			else
a0a2731081dba4 Alim Akhtar 2020-03-18  935  				pwr->hs_series = PA_HS_MODE_A;
a0a2731081dba4 Alim Akhtar 2020-03-18  936  		} else {
a0a2731081dba4 Alim Akhtar 2020-03-18  937  			pwr->hs_series = PA_HS_MODE_A;
a0a2731081dba4 Alim Akhtar 2020-03-18  938  		}
a0a2731081dba4 Alim Akhtar 2020-03-18  939  	}
a0a2731081dba4 Alim Akhtar 2020-03-18  940
a0a2731081dba4 Alim Akhtar 2020-03-18  941  	if (of_property_read_u32_array(
a0a2731081dba4 Alim Akhtar 2020-03-18  942  		np, "ufs,pwr-local-l2-timer", pwr->l_l2_timer, 3)) {
a0a2731081dba4 Alim Akhtar 2020-03-18  943  		pwr->l_l2_timer[0] = FC0PROTTIMEOUTVAL;
a0a2731081dba4 Alim Akhtar 2020-03-18  944  		pwr->l_l2_timer[1] = TC0REPLAYTIMEOUTVAL;
a0a2731081dba4 Alim Akhtar 2020-03-18  945  		pwr->l_l2_timer[2] = AFC0REQTIMEOUTVAL;
a0a2731081dba4 Alim Akhtar 2020-03-18  946  	}
a0a2731081dba4 Alim Akhtar 2020-03-18  947
a0a2731081dba4 Alim Akhtar 2020-03-18  948  	if (of_property_read_u32_array(
a0a2731081dba4 Alim Akhtar 2020-03-18  949  		np, "ufs,pwr-remote-l2-timer", pwr->r_l2_timer, 3)) {
a0a2731081dba4 Alim Akhtar 2020-03-18  950  		pwr->r_l2_timer[0] = FC0PROTTIMEOUTVAL;
a0a2731081dba4 Alim Akhtar 2020-03-18  951  		pwr->r_l2_timer[1] = TC0REPLAYTIMEOUTVAL;
a0a2731081dba4 Alim Akhtar 2020-03-18  952  		pwr->r_l2_timer[2] = AFC0REQTIMEOUTVAL;
a0a2731081dba4 Alim Akhtar 2020-03-18  953  	}
a0a2731081dba4 Alim Akhtar 2020-03-18  954  }
a0a2731081dba4 Alim Akhtar 2020-03-18  955

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

#1 lore raw

Hi Julia

Quoted 7 lines

-----Original Message-----
From: Julia Lawall <[email protected]>
Sent: 19 March 2020 14:59
To: Alim Akhtar <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH v2 4/5] scsi: ufs-exynos: add UFS host support for

Exynos

Quoted 4 lines

SoCs

Perhaps this is intentional, but please check lines 931-935.

Quoted 8 lines

julia

---------- Forwarded message ----------
Date: Thu, 19 Mar 2020 09:31:14 +0800
From: kbuild test robot <[email protected]>
To: [email protected]
Cc: Julia Lawall <[email protected]>
Subject: Re: [PATCH v2 4/5] scsi: ufs-exynos: add UFS host support for

Exynos

Quoted 9 lines

SoCs

CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Alim Akhtar <[email protected]>
CC: [email protected], [email protected], linux- [email protected]

Quoted 6 lines

Hi Alim,

I love your patch! Perhaps something to improve:

[auto build test WARNING on phy/next]
[also build test WARNING on scsi/for-next robh/for-next mkp-scsi/for-next

v5.6-

Quoted 1 line

rc6 next-20200318] [if your patch is applied to the wrong git tree, please

drop us

Quoted 1 line

a note to help improve the system. BTW, we also suggest to use '--base'

option

Quoted 8 lines

to specify the base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]

url: https://protect2.fireeye.com/url?k=03b4933f-5e785abb-03b51870-
0cc47aa8f5ba-1d3ee5e67b031afb&u=https://github.com/0day- ci/linux/commits/Alim-Akhtar/exynos-ufs-Add-support-for-UFS-HCI/20200319- 022156
base:

https://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git next

Quoted 7 lines

:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago

If you fix the issue, kindly add following tag

Thanks for review, I have just fixed this and posted V3, PTAL

Quoted 13 lines
Quoted 2 lines
Quoted 2 lines

drivers/scsi/ufs/ufs-exynos.c:931:8-10: WARNING: possible condition with no effect (if == else)

# https://protect2.fireeye.com/url?k=8ebed792-d3721e16-8ebf5cdd-
0cc47aa8f5ba-3629a5edceef073b&u=https://github.com/0day- ci/linux/commit/a0a2731081dba4edfad146c501203adb97d5947b
git remote add linux-review https://protect2.fireeye.com/url?k=c8ef01ac-
9523c828-c8ee8ae3-0cc47aa8f5ba- 8639b30cb2586a0f&u=https://github.com/0day-ci/linux
git remote update linux-review
git checkout a0a2731081dba4edfad146c501203adb97d5947b
vim +931 drivers/scsi/ufs/ufs-exynos.c

Quoted 4 lines

a0a2731081dba4 Alim Akhtar 2020-03-18 898 a0a2731081dba4 Alim Akhtar 2020-03-18 899 static void exynos_ufs_specify_pwr_mode(struct device_node *np, a0a2731081dba4 Alim Akhtar 2020-03-18 900

struct

Quoted 7 lines

exynos_ufs *ufs)

a0a2731081dba4 Alim Akhtar 2020-03-18  901  {
a0a2731081dba4 Alim Akhtar 2020-03-18  902  	struct uic_pwr_mode *pwr =
&ufs->pwr_req;
a0a2731081dba4 Alim Akhtar 2020-03-18  903  	const char *str = NULL;
a0a2731081dba4 Alim Akhtar 2020-03-18  904
a0a2731081dba4 Alim Akhtar 2020-03-18  905  	if
Quoted 6 lines

(!of_property_read_string(np, "ufs,pwr-attr-mode", &str)) {
a0a2731081dba4 Alim Akhtar 2020-03-18 906 if (!strncmp(str,
"FAST", sizeof("FAST")))
a0a2731081dba4 Alim Akhtar 2020-03-18 907 pwr->mode =
FAST_MODE;
a0a2731081dba4 Alim Akhtar 2020-03-18 908 else if

(!strncmp(str,

Quoted 4 lines

"SLOW", sizeof("SLOW")))
a0a2731081dba4 Alim Akhtar 2020-03-18 909 pwr->mode =
SLOW_MODE;
a0a2731081dba4 Alim Akhtar 2020-03-18 910 else if

(!strncmp(str,

Quoted 4 lines

"FAST_auto", sizeof("FAST_auto")))
a0a2731081dba4 Alim Akhtar 2020-03-18 911 pwr->mode =
FASTAUTO_MODE;
a0a2731081dba4 Alim Akhtar 2020-03-18 912 else if

(!strncmp(str,

Quoted 40 lines

"SLOW_auto", sizeof("SLOW_auto")))
a0a2731081dba4 Alim Akhtar 2020-03-18 913 pwr->mode =
SLOWAUTO_MODE;

a0a2731081dba4 Alim Akhtar 2020-03-18  914  		else
a0a2731081dba4 Alim Akhtar 2020-03-18  915  			pwr->mode =
FAST_MODE;
a0a2731081dba4 Alim Akhtar 2020-03-18  916  	} else {
a0a2731081dba4 Alim Akhtar 2020-03-18  917  		pwr->mode =
FAST_MODE;
a0a2731081dba4 Alim Akhtar 2020-03-18  918  	}
a0a2731081dba4 Alim Akhtar 2020-03-18  919
a0a2731081dba4 Alim Akhtar 2020-03-18  920  	if (of_property_read_u32(np,
"ufs,pwr-attr-lane", &pwr->lane))
a0a2731081dba4 Alim Akhtar 2020-03-18  921  		pwr->lane = 1;
a0a2731081dba4 Alim Akhtar 2020-03-18  922
a0a2731081dba4 Alim Akhtar 2020-03-18  923  	if (of_property_read_u32(np,
"ufs,pwr-attr-gear", &pwr->gear))
a0a2731081dba4 Alim Akhtar 2020-03-18  924  		pwr->gear = 1;
a0a2731081dba4 Alim Akhtar 2020-03-18  925
a0a2731081dba4 Alim Akhtar 2020-03-18  926  	if

(IS_UFS_PWR_MODE_HS(pwr->mode)) {
a0a2731081dba4 Alim Akhtar 2020-03-18 927 if
(!of_property_read_string(np, a0a2731081dba4 Alim Akhtar 2020-03-18 928

	"ufs,pwr-attr-hs-series", &str)) {

a0a2731081dba4 Alim Akhtar 2020-03-18 929 if
(!strncmp(str, "HS_rate_b", sizeof("HS_rate_b")))
a0a2731081dba4 Alim Akhtar 2020-03-18 930 pwr-

Quoted 1 line

hs_series = PA_HS_MODE_B;

a0a2731081dba4 Alim Akhtar 2020-03-18 @931 else if
(!strncmp(str, "HS_rate_a", a0a2731081dba4 Alim Akhtar 2020-03-18 932

	sizeof("HS_rate_a")))

a0a2731081dba4 Alim Akhtar 2020-03-18 933 pwr-

Quoted 1 line

hs_series = PA_HS_MODE_A;

a0a2731081dba4 Alim Akhtar 2020-03-18  934  			else
a0a2731081dba4 Alim Akhtar 2020-03-18  935  				pwr-
Quoted 1 line

hs_series = PA_HS_MODE_A;

a0a2731081dba4 Alim Akhtar 2020-03-18  936  		} else {
a0a2731081dba4 Alim Akhtar 2020-03-18  937  			pwr-
Quoted 7 lines
Quoted 1 line

hs_series = PA_HS_MODE_A;

a0a2731081dba4 Alim Akhtar 2020-03-18  938  		}
a0a2731081dba4 Alim Akhtar 2020-03-18  939  	}
a0a2731081dba4 Alim Akhtar 2020-03-18  940
a0a2731081dba4 Alim Akhtar 2020-03-18  941  	if

(of_property_read_u32_array(
a0a2731081dba4 Alim Akhtar 2020-03-18 942 np,

"ufs,pwr-local-l2-

Quoted 19 lines

timer", pwr->l_l2_timer, 3)) {
a0a2731081dba4 Alim Akhtar 2020-03-18 943 pwr->l_l2_timer[0] =
FC0PROTTIMEOUTVAL;
a0a2731081dba4 Alim Akhtar 2020-03-18 944 pwr->l_l2_timer[1] =
TC0REPLAYTIMEOUTVAL;
a0a2731081dba4 Alim Akhtar 2020-03-18 945 pwr->l_l2_timer[2] =
AFC0REQTIMEOUTVAL;

a0a2731081dba4 Alim Akhtar 2020-03-18  946  	}
a0a2731081dba4 Alim Akhtar 2020-03-18  947
a0a2731081dba4 Alim Akhtar 2020-03-18  948  	if

(of_property_read_u32_array(
a0a2731081dba4 Alim Akhtar 2020-03-18 949 np, "ufs,pwr-remote-
l2-timer", pwr->r_l2_timer, 3)) {
a0a2731081dba4 Alim Akhtar 2020-03-18 950 pwr->r_l2_timer[0] =
FC0PROTTIMEOUTVAL;
a0a2731081dba4 Alim Akhtar 2020-03-18 951 pwr->r_l2_timer[1] =
TC0REPLAYTIMEOUTVAL;
a0a2731081dba4 Alim Akhtar 2020-03-18 952 pwr->r_l2_timer[2] =
AFC0REQTIMEOUTVAL;

Quoted 8 lines
a0a2731081dba4 Alim Akhtar 2020-03-18  953  	}
a0a2731081dba4 Alim Akhtar 2020-03-18  954  }
a0a2731081dba4 Alim Akhtar 2020-03-18  955

---
0-DAY CI Kernel Test Service, Intel Corporation
https://protect2.fireeye.com/url?k=c28ebd30-9f4274b4-c28f367f-

0cc47aa8f5ba-85fd58e3389c5682&u=https://lists.01.org/hyperkitty/list/kbuild-

Quoted 1 line

[email protected]