public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Alim Akhtar <alim.akhtar@samsung.com>
Cc: robh+dt@kernel.org, devicetree@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 4/5] scsi: ufs-exynos: add UFS host support for Exynos SoCs
Date: Thu, 19 Mar 2020 10:29:26 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.2003191028360.3010@hadrien> (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 <lkp@intel.com>
To: kbuild@lists.01.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH v2 4/5] scsi: ufs-exynos: add UFS host support for Exynos
    SoCs

CC: kbuild-all@lists.01.org
In-Reply-To: <20200318111144.39525-5-alim.akhtar@samsung.com>
References: <20200318111144.39525-5-alim.akhtar@samsung.com>
TO: Alim Akhtar <alim.akhtar@samsung.com>
CC: robh+dt@kernel.org, devicetree@vger.kernel.org, linux-scsi@vger.kernel.org

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
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>

>> 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/kbuild-all@lists.01.org

             reply	other threads:[~2020-03-19  9:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200319092934epcas5p2442a8a995c1028ad7beb76bbe137aed9@epcas5p2.samsung.com>
2020-03-19  9:29 ` Julia Lawall [this message]
2020-03-19 15:08   ` [PATCH v2 4/5] scsi: ufs-exynos: add UFS host support for Exynos SoCs Alim Akhtar
     [not found] <CGME20200318111811epcas5p10b0e21b0454bd8881d4ce8e187839c98@epcas5p1.samsung.com>
2020-03-18 11:11 ` [PATCH v2 0/5] exynos-ufs: Add support for UFS HCI Alim Akhtar
2020-03-18 11:11   ` [PATCH v2 4/5] scsi: ufs-exynos: add UFS host support for Exynos SoCs Alim Akhtar

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=alpine.DEB.2.21.2003191028360.3010@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=alim.akhtar@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox