linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] scsi: ufs: cleanup UFS driver
@ 2020-06-05 20:05 Bean Huo
  2020-06-05 20:05 ` [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate Bean Huo
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Bean Huo @ 2020-06-05 20:05 UTC (permalink / raw)
  To: alim.akhtar, avri.altman, asutoshd, jejb, martin.petersen,
	stanley.chu, beanhuo, bvanassche, tomas.winkler, cang, ebiggers
  Cc: linux-scsi, linux-kernel

From: Bean Huo <beanhuo@micron.com>

Cleanup, no functional change

Changelog:

v2 -v3:
    1. Change SPDX-License-Identifier: GPL-2.0 to
       SPDX-License-Identifier: GPL-2.0-or-later (Eric Biggers)
v1 - v2:
    1. Split patch (Tomas Winkler)

Bean Huo (2):
  scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate
  scsi: ufs: remove wrapper function ufshcd_setup_clocks()

 drivers/scsi/ufs/ufs.h           | 27 +-------------
 drivers/scsi/ufs/ufshcd-pci.c    | 25 +------------
 drivers/scsi/ufs/ufshcd-pltfrm.c | 27 +-------------
 drivers/scsi/ufs/ufshcd.c        | 62 +++++++-------------------------
 drivers/scsi/ufs/ufshcd.h        | 27 +-------------
 drivers/scsi/ufs/ufshci.h        | 27 +-------------
 6 files changed, 18 insertions(+), 177 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate
  2020-06-05 20:05 [PATCH v3 0/2] scsi: ufs: cleanup UFS driver Bean Huo
@ 2020-06-05 20:05 ` Bean Huo
  2020-06-06 23:20   ` Winkler, Tomas
  2020-06-11 15:52   ` Alim Akhtar
  2020-06-05 20:05 ` [PATCH v3 2/2] scsi: ufs: remove wrapper function ufshcd_setup_clocks() Bean Huo
  2020-06-16  3:59 ` [PATCH v3 0/2] scsi: ufs: cleanup UFS driver Martin K. Petersen
  2 siblings, 2 replies; 10+ messages in thread
From: Bean Huo @ 2020-06-05 20:05 UTC (permalink / raw)
  To: alim.akhtar, avri.altman, asutoshd, jejb, martin.petersen,
	stanley.chu, beanhuo, bvanassche, tomas.winkler, cang, ebiggers
  Cc: linux-scsi, linux-kernel

From: Bean Huo <beanhuo@micron.com>

Add SPDX GPL-2.0 to UFS driver files that specified the GPL
version 2 license, remove the full boilerplate text.

Signed-off-by: Bean Huo <beanhuo@micron.com>
---
 drivers/scsi/ufs/ufs.h           | 27 +--------------------------
 drivers/scsi/ufs/ufshcd-pci.c    | 25 +------------------------
 drivers/scsi/ufs/ufshcd-pltfrm.c | 27 +--------------------------
 drivers/scsi/ufs/ufshcd.c        | 30 +-----------------------------
 drivers/scsi/ufs/ufshcd.h        | 27 +--------------------------
 drivers/scsi/ufs/ufshci.h        | 27 +--------------------------
 6 files changed, 6 insertions(+), 157 deletions(-)

diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index c70845d41449..7df4bdc813d6 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
@@ -1,36 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Universal Flash Storage Host controller driver
- *
- * This code is based on drivers/scsi/ufs/ufs.h
  * Copyright (C) 2011-2013 Samsung India Software Operations
  *
  * Authors:
  *	Santosh Yaraganavi <santosh.sy@samsung.com>
  *	Vinayak Holikatti <h.vinayak@samsung.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * See the COPYING file in the top-level directory or visit
- * <http://www.gnu.org/licenses/gpl-2.0.html>
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This program is provided "AS IS" and "WITH ALL FAULTS" and
- * without warranty of any kind. You are solely responsible for
- * determining the appropriateness of using and distributing
- * the program and assume all risks associated with your exercise
- * of rights with respect to the program, including but not limited
- * to infringement of third party rights, the risks and costs of
- * program errors, damage to or loss of data, programs or equipment,
- * and unavailability or interruption of operations. Under no
- * circumstances will the contributor of this Program be liable for
- * any damages of any kind arising from your use or distribution of
- * this program.
  */
 
 #ifndef _UFS_H
diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/ufshcd-pci.c
index 8f78a8151499..f407b13883ac 100644
--- a/drivers/scsi/ufs/ufshcd-pci.c
+++ b/drivers/scsi/ufs/ufshcd-pci.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Universal Flash Storage Host controller PCI glue driver
  *
@@ -7,30 +8,6 @@
  * Authors:
  *	Santosh Yaraganavi <santosh.sy@samsung.com>
  *	Vinayak Holikatti <h.vinayak@samsung.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * See the COPYING file in the top-level directory or visit
- * <http://www.gnu.org/licenses/gpl-2.0.html>
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This program is provided "AS IS" and "WITH ALL FAULTS" and
- * without warranty of any kind. You are solely responsible for
- * determining the appropriateness of using and distributing
- * the program and assume all risks associated with your exercise
- * of rights with respect to the program, including but not limited
- * to infringement of third party rights, the risks and costs of
- * program errors, damage to or loss of data, programs or equipment,
- * and unavailability or interruption of operations. Under no
- * circumstances will the contributor of this Program be liable for
- * any damages of any kind arising from your use or distribution of
- * this program.
  */
 
 #include "ufshcd.h"
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 76f9be71c31b..3db0af66c71c 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -1,36 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Universal Flash Storage Host controller Platform bus based glue driver
- *
- * This code is based on drivers/scsi/ufs/ufshcd-pltfrm.c
  * Copyright (C) 2011-2013 Samsung India Software Operations
  *
  * Authors:
  *	Santosh Yaraganavi <santosh.sy@samsung.com>
  *	Vinayak Holikatti <h.vinayak@samsung.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * See the COPYING file in the top-level directory or visit
- * <http://www.gnu.org/licenses/gpl-2.0.html>
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This program is provided "AS IS" and "WITH ALL FAULTS" and
- * without warranty of any kind. You are solely responsible for
- * determining the appropriateness of using and distributing
- * the program and assume all risks associated with your exercise
- * of rights with respect to the program, including but not limited
- * to infringement of third party rights, the risks and costs of
- * program errors, damage to or loss of data, programs or equipment,
- * and unavailability or interruption of operations. Under no
- * circumstances will the contributor of this Program be liable for
- * any damages of any kind arising from your use or distribution of
- * this program.
  */
 
 #include <linux/platform_device.h>
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index ad4fc829cbb2..ec4f55211648 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -1,40 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Universal Flash Storage Host controller driver Core
- *
- * This code is based on drivers/scsi/ufs/ufshcd.c
  * Copyright (C) 2011-2013 Samsung India Software Operations
  * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
  *
  * Authors:
  *	Santosh Yaraganavi <santosh.sy@samsung.com>
  *	Vinayak Holikatti <h.vinayak@samsung.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * See the COPYING file in the top-level directory or visit
- * <http://www.gnu.org/licenses/gpl-2.0.html>
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This program is provided "AS IS" and "WITH ALL FAULTS" and
- * without warranty of any kind. You are solely responsible for
- * determining the appropriateness of using and distributing
- * the program and assume all risks associated with your exercise
- * of rights with respect to the program, including but not limited
- * to infringement of third party rights, the risks and costs of
- * program errors, damage to or loss of data, programs or equipment,
- * and unavailability or interruption of operations. Under no
- * circumstances will the contributor of this Program be liable for
- * any damages of any kind arising from your use or distribution of
- * this program.
- *
- * The Linux Foundation chooses to take subject only to the GPLv2
- * license terms, and distributes only under these terms.
  */
 
 #include <linux/async.h>
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index bf97d616e597..ef92c4a9e378 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -1,37 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Universal Flash Storage Host controller driver
- *
- * This code is based on drivers/scsi/ufs/ufshcd.h
  * Copyright (C) 2011-2013 Samsung India Software Operations
  * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
  *
  * Authors:
  *	Santosh Yaraganavi <santosh.sy@samsung.com>
  *	Vinayak Holikatti <h.vinayak@samsung.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * See the COPYING file in the top-level directory or visit
- * <http://www.gnu.org/licenses/gpl-2.0.html>
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This program is provided "AS IS" and "WITH ALL FAULTS" and
- * without warranty of any kind. You are solely responsible for
- * determining the appropriateness of using and distributing
- * the program and assume all risks associated with your exercise
- * of rights with respect to the program, including but not limited
- * to infringement of third party rights, the risks and costs of
- * program errors, damage to or loss of data, programs or equipment,
- * and unavailability or interruption of operations. Under no
- * circumstances will the contributor of this Program be liable for
- * any damages of any kind arising from your use or distribution of
- * this program.
  */
 
 #ifndef _UFSHCD_H
diff --git a/drivers/scsi/ufs/ufshci.h b/drivers/scsi/ufs/ufshci.h
index c2961d37cc1c..2c1c7a277430 100644
--- a/drivers/scsi/ufs/ufshci.h
+++ b/drivers/scsi/ufs/ufshci.h
@@ -1,36 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Universal Flash Storage Host controller driver
- *
- * This code is based on drivers/scsi/ufs/ufshci.h
  * Copyright (C) 2011-2013 Samsung India Software Operations
  *
  * Authors:
  *	Santosh Yaraganavi <santosh.sy@samsung.com>
  *	Vinayak Holikatti <h.vinayak@samsung.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * See the COPYING file in the top-level directory or visit
- * <http://www.gnu.org/licenses/gpl-2.0.html>
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This program is provided "AS IS" and "WITH ALL FAULTS" and
- * without warranty of any kind. You are solely responsible for
- * determining the appropriateness of using and distributing
- * the program and assume all risks associated with your exercise
- * of rights with respect to the program, including but not limited
- * to infringement of third party rights, the risks and costs of
- * program errors, damage to or loss of data, programs or equipment,
- * and unavailability or interruption of operations. Under no
- * circumstances will the contributor of this Program be liable for
- * any damages of any kind arising from your use or distribution of
- * this program.
  */
 
 #ifndef _UFSHCI_H
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 2/2] scsi: ufs: remove wrapper function ufshcd_setup_clocks()
  2020-06-05 20:05 [PATCH v3 0/2] scsi: ufs: cleanup UFS driver Bean Huo
  2020-06-05 20:05 ` [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate Bean Huo
@ 2020-06-05 20:05 ` Bean Huo
  2020-06-06 23:28   ` Winkler, Tomas
  2020-06-16  3:59 ` [PATCH v3 0/2] scsi: ufs: cleanup UFS driver Martin K. Petersen
  2 siblings, 1 reply; 10+ messages in thread
From: Bean Huo @ 2020-06-05 20:05 UTC (permalink / raw)
  To: alim.akhtar, avri.altman, asutoshd, jejb, martin.petersen,
	stanley.chu, beanhuo, bvanassche, tomas.winkler, cang, ebiggers
  Cc: linux-scsi, linux-kernel

From: Bean Huo <beanhuo@micron.com>

The static function ufshcd_setup_clocks() is just a wrapper around
__ufshcd_setup_clocks(), remove it. Rename original function wrapped
__ufshcd_setup_clocks() to new ufshcd_setup_clocks().

Signed-off-by: Bean Huo <beanhuo@micron.com>
---
 drivers/scsi/ufs/ufshcd.c | 32 ++++++++++++--------------------
 1 file changed, 12 insertions(+), 20 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index ec4f55211648..531d0b7878db 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -215,9 +215,7 @@ static int ufshcd_eh_host_reset_handler(struct scsi_cmnd *cmd);
 static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int tag);
 static void ufshcd_hba_exit(struct ufs_hba *hba);
 static int ufshcd_probe_hba(struct ufs_hba *hba, bool async);
-static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on,
-				 bool skip_ref_clk);
-static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on);
+static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on, bool skip_ref_clk);
 static int ufshcd_uic_hibern8_enter(struct ufs_hba *hba);
 static inline void ufshcd_add_delay_before_dme_cmd(struct ufs_hba *hba);
 static int ufshcd_host_reset_and_restore(struct ufs_hba *hba);
@@ -1497,7 +1495,7 @@ static void ufshcd_ungate_work(struct work_struct *work)
 	}
 
 	spin_unlock_irqrestore(hba->host->host_lock, flags);
-	ufshcd_setup_clocks(hba, true);
+	ufshcd_setup_clocks(hba, true, false);
 
 	ufshcd_enable_irq(hba);
 
@@ -1655,10 +1653,10 @@ static void ufshcd_gate_work(struct work_struct *work)
 	ufshcd_disable_irq(hba);
 
 	if (!ufshcd_is_link_active(hba))
-		ufshcd_setup_clocks(hba, false);
+		ufshcd_setup_clocks(hba, false, false);
 	else
 		/* If link is active, device ref_clk can't be switched off */
-		__ufshcd_setup_clocks(hba, false, true);
+		ufshcd_setup_clocks(hba, false, true);
 
 	/*
 	 * In case you are here to cancel this work the gating state
@@ -7683,8 +7681,7 @@ static int ufshcd_init_hba_vreg(struct ufs_hba *hba)
 	return 0;
 }
 
-static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on,
-					bool skip_ref_clk)
+static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on, bool skip_ref_clk)
 {
 	int ret = 0;
 	struct ufs_clk_info *clki;
@@ -7747,11 +7744,6 @@ static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on,
 	return ret;
 }
 
-static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on)
-{
-	return  __ufshcd_setup_clocks(hba, on, false);
-}
-
 static int ufshcd_init_clocks(struct ufs_hba *hba)
 {
 	int ret = 0;
@@ -7858,7 +7850,7 @@ static int ufshcd_hba_init(struct ufs_hba *hba)
 	if (err)
 		goto out_disable_hba_vreg;
 
-	err = ufshcd_setup_clocks(hba, true);
+	err = ufshcd_setup_clocks(hba, true, false);
 	if (err)
 		goto out_disable_hba_vreg;
 
@@ -7880,7 +7872,7 @@ static int ufshcd_hba_init(struct ufs_hba *hba)
 out_disable_vreg:
 	ufshcd_setup_vreg(hba, false);
 out_disable_clks:
-	ufshcd_setup_clocks(hba, false);
+	ufshcd_setup_clocks(hba, false, false);
 out_disable_hba_vreg:
 	ufshcd_setup_hba_vreg(hba, false);
 out:
@@ -7896,7 +7888,7 @@ static void ufshcd_hba_exit(struct ufs_hba *hba)
 		if (ufshcd_is_clkscaling_supported(hba))
 			if (hba->devfreq)
 				ufshcd_suspend_clkscaling(hba);
-		ufshcd_setup_clocks(hba, false);
+		ufshcd_setup_clocks(hba, false, false);
 		ufshcd_setup_hba_vreg(hba, false);
 		hba->is_powered = false;
 		ufs_put_device_desc(hba);
@@ -8259,10 +8251,10 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
 	ufshcd_disable_irq(hba);
 
 	if (!ufshcd_is_link_active(hba))
-		ufshcd_setup_clocks(hba, false);
+		ufshcd_setup_clocks(hba, false, false);
 	else
 		/* If link is active, device ref_clk can't be switched off */
-		__ufshcd_setup_clocks(hba, false, true);
+		ufshcd_setup_clocks(hba, false, true);
 
 	hba->clk_gating.state = CLKS_OFF;
 	trace_ufshcd_clk_gating(dev_name(hba->dev), hba->clk_gating.state);
@@ -8321,7 +8313,7 @@ static int ufshcd_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
 
 	ufshcd_hba_vreg_set_hpm(hba);
 	/* Make sure clocks are enabled before accessing controller */
-	ret = ufshcd_setup_clocks(hba, true);
+	ret = ufshcd_setup_clocks(hba, true, false);
 	if (ret)
 		goto out;
 
@@ -8404,7 +8396,7 @@ static int ufshcd_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
 	ufshcd_disable_irq(hba);
 	if (hba->clk_scaling.is_allowed)
 		ufshcd_suspend_clkscaling(hba);
-	ufshcd_setup_clocks(hba, false);
+	ufshcd_setup_clocks(hba, false, false);
 out:
 	hba->pm_op_in_progress = 0;
 	if (ret)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* RE: [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate
  2020-06-05 20:05 ` [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate Bean Huo
@ 2020-06-06 23:20   ` Winkler, Tomas
  2020-06-10  9:30     ` Bean Huo
  2020-06-11 15:52   ` Alim Akhtar
  1 sibling, 1 reply; 10+ messages in thread
From: Winkler, Tomas @ 2020-06-06 23:20 UTC (permalink / raw)
  To: Bean Huo, alim.akhtar, avri.altman, asutoshd, jejb,
	martin.petersen, stanley.chu, beanhuo, bvanassche, cang,
	ebiggers
  Cc: linux-scsi, linux-kernel

> 
> From: Bean Huo <beanhuo@micron.com>
> 
> Add SPDX GPL-2.0 to UFS driver files that specified the GPL version 2 license,
> remove the full boilerplate text.
> 
> Signed-off-by: Bean Huo <beanhuo@micron.com>
LGTM.
Thanks
Tomas

> ---
>  drivers/scsi/ufs/ufs.h           | 27 +--------------------------
>  drivers/scsi/ufs/ufshcd-pci.c    | 25 +------------------------
>  drivers/scsi/ufs/ufshcd-pltfrm.c | 27 +--------------------------
>  drivers/scsi/ufs/ufshcd.c        | 30 +-----------------------------
>  drivers/scsi/ufs/ufshcd.h        | 27 +--------------------------
>  drivers/scsi/ufs/ufshci.h        | 27 +--------------------------
>  6 files changed, 6 insertions(+), 157 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h index
> c70845d41449..7df4bdc813d6 100644
> --- a/drivers/scsi/ufs/ufs.h
> +++ b/drivers/scsi/ufs/ufs.h
> @@ -1,36 +1,11 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
>  /*
>   * Universal Flash Storage Host controller driver
> - *
> - * This code is based on drivers/scsi/ufs/ufs.h
>   * Copyright (C) 2011-2013 Samsung India Software Operations
>   *
>   * Authors:
>   *	Santosh Yaraganavi <santosh.sy@samsung.com>
>   *	Vinayak Holikatti <h.vinayak@samsung.com>
> - *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License
> - * as published by the Free Software Foundation; either version 2
> - * of the License, or (at your option) any later version.
> - * See the COPYING file in the top-level directory or visit
> - * <http://www.gnu.org/licenses/gpl-2.0.html>
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> - * without warranty of any kind. You are solely responsible for
> - * determining the appropriateness of using and distributing
> - * the program and assume all risks associated with your exercise
> - * of rights with respect to the program, including but not limited
> - * to infringement of third party rights, the risks and costs of
> - * program errors, damage to or loss of data, programs or equipment,
> - * and unavailability or interruption of operations. Under no
> - * circumstances will the contributor of this Program be liable for
> - * any damages of any kind arising from your use or distribution of
> - * this program.
>   */
> 
>  #ifndef _UFS_H
> diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/ufshcd-pci.c index
> 8f78a8151499..f407b13883ac 100644
> --- a/drivers/scsi/ufs/ufshcd-pci.c
> +++ b/drivers/scsi/ufs/ufshcd-pci.c
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
>  /*
>   * Universal Flash Storage Host controller PCI glue driver
>   *
> @@ -7,30 +8,6 @@
>   * Authors:
>   *	Santosh Yaraganavi <santosh.sy@samsung.com>
>   *	Vinayak Holikatti <h.vinayak@samsung.com>
> - *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License
> - * as published by the Free Software Foundation; either version 2
> - * of the License, or (at your option) any later version.
> - * See the COPYING file in the top-level directory or visit
> - * <http://www.gnu.org/licenses/gpl-2.0.html>
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> - * without warranty of any kind. You are solely responsible for
> - * determining the appropriateness of using and distributing
> - * the program and assume all risks associated with your exercise
> - * of rights with respect to the program, including but not limited
> - * to infringement of third party rights, the risks and costs of
> - * program errors, damage to or loss of data, programs or equipment,
> - * and unavailability or interruption of operations. Under no
> - * circumstances will the contributor of this Program be liable for
> - * any damages of any kind arising from your use or distribution of
> - * this program.
>   */
> 
>  #include "ufshcd.h"
> diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
> index 76f9be71c31b..3db0af66c71c 100644
> --- a/drivers/scsi/ufs/ufshcd-pltfrm.c
> +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
> @@ -1,36 +1,11 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
>  /*
>   * Universal Flash Storage Host controller Platform bus based glue driver
> - *
> - * This code is based on drivers/scsi/ufs/ufshcd-pltfrm.c
>   * Copyright (C) 2011-2013 Samsung India Software Operations
>   *
>   * Authors:
>   *	Santosh Yaraganavi <santosh.sy@samsung.com>
>   *	Vinayak Holikatti <h.vinayak@samsung.com>
> - *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License
> - * as published by the Free Software Foundation; either version 2
> - * of the License, or (at your option) any later version.
> - * See the COPYING file in the top-level directory or visit
> - * <http://www.gnu.org/licenses/gpl-2.0.html>
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> - * without warranty of any kind. You are solely responsible for
> - * determining the appropriateness of using and distributing
> - * the program and assume all risks associated with your exercise
> - * of rights with respect to the program, including but not limited
> - * to infringement of third party rights, the risks and costs of
> - * program errors, damage to or loss of data, programs or equipment,
> - * and unavailability or interruption of operations. Under no
> - * circumstances will the contributor of this Program be liable for
> - * any damages of any kind arising from your use or distribution of
> - * this program.
>   */
> 
>  #include <linux/platform_device.h>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index
> ad4fc829cbb2..ec4f55211648 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -1,40 +1,12 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
>  /*
>   * Universal Flash Storage Host controller driver Core
> - *
> - * This code is based on drivers/scsi/ufs/ufshcd.c
>   * Copyright (C) 2011-2013 Samsung India Software Operations
>   * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
>   *
>   * Authors:
>   *	Santosh Yaraganavi <santosh.sy@samsung.com>
>   *	Vinayak Holikatti <h.vinayak@samsung.com>
> - *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License
> - * as published by the Free Software Foundation; either version 2
> - * of the License, or (at your option) any later version.
> - * See the COPYING file in the top-level directory or visit
> - * <http://www.gnu.org/licenses/gpl-2.0.html>
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> - * without warranty of any kind. You are solely responsible for
> - * determining the appropriateness of using and distributing
> - * the program and assume all risks associated with your exercise
> - * of rights with respect to the program, including but not limited
> - * to infringement of third party rights, the risks and costs of
> - * program errors, damage to or loss of data, programs or equipment,
> - * and unavailability or interruption of operations. Under no
> - * circumstances will the contributor of this Program be liable for
> - * any damages of any kind arising from your use or distribution of
> - * this program.
> - *
> - * The Linux Foundation chooses to take subject only to the GPLv2
> - * license terms, and distributes only under these terms.
>   */
> 
>  #include <linux/async.h>
> diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index
> bf97d616e597..ef92c4a9e378 100644
> --- a/drivers/scsi/ufs/ufshcd.h
> +++ b/drivers/scsi/ufs/ufshcd.h
> @@ -1,37 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
>  /*
>   * Universal Flash Storage Host controller driver
> - *
> - * This code is based on drivers/scsi/ufs/ufshcd.h
>   * Copyright (C) 2011-2013 Samsung India Software Operations
>   * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
>   *
>   * Authors:
>   *	Santosh Yaraganavi <santosh.sy@samsung.com>
>   *	Vinayak Holikatti <h.vinayak@samsung.com>
> - *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License
> - * as published by the Free Software Foundation; either version 2
> - * of the License, or (at your option) any later version.
> - * See the COPYING file in the top-level directory or visit
> - * <http://www.gnu.org/licenses/gpl-2.0.html>
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> - * without warranty of any kind. You are solely responsible for
> - * determining the appropriateness of using and distributing
> - * the program and assume all risks associated with your exercise
> - * of rights with respect to the program, including but not limited
> - * to infringement of third party rights, the risks and costs of
> - * program errors, damage to or loss of data, programs or equipment,
> - * and unavailability or interruption of operations. Under no
> - * circumstances will the contributor of this Program be liable for
> - * any damages of any kind arising from your use or distribution of
> - * this program.
>   */
> 
>  #ifndef _UFSHCD_H
> diff --git a/drivers/scsi/ufs/ufshci.h b/drivers/scsi/ufs/ufshci.h index
> c2961d37cc1c..2c1c7a277430 100644
> --- a/drivers/scsi/ufs/ufshci.h
> +++ b/drivers/scsi/ufs/ufshci.h
> @@ -1,36 +1,11 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
>  /*
>   * Universal Flash Storage Host controller driver
> - *
> - * This code is based on drivers/scsi/ufs/ufshci.h
>   * Copyright (C) 2011-2013 Samsung India Software Operations
>   *
>   * Authors:
>   *	Santosh Yaraganavi <santosh.sy@samsung.com>
>   *	Vinayak Holikatti <h.vinayak@samsung.com>
> - *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License
> - * as published by the Free Software Foundation; either version 2
> - * of the License, or (at your option) any later version.
> - * See the COPYING file in the top-level directory or visit
> - * <http://www.gnu.org/licenses/gpl-2.0.html>
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> - * without warranty of any kind. You are solely responsible for
> - * determining the appropriateness of using and distributing
> - * the program and assume all risks associated with your exercise
> - * of rights with respect to the program, including but not limited
> - * to infringement of third party rights, the risks and costs of
> - * program errors, damage to or loss of data, programs or equipment,
> - * and unavailability or interruption of operations. Under no
> - * circumstances will the contributor of this Program be liable for
> - * any damages of any kind arising from your use or distribution of
> - * this program.
>   */
> 
>  #ifndef _UFSHCI_H
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v3 2/2] scsi: ufs: remove wrapper function ufshcd_setup_clocks()
  2020-06-05 20:05 ` [PATCH v3 2/2] scsi: ufs: remove wrapper function ufshcd_setup_clocks() Bean Huo
@ 2020-06-06 23:28   ` Winkler, Tomas
  2020-06-11 16:00     ` Alim Akhtar
  0 siblings, 1 reply; 10+ messages in thread
From: Winkler, Tomas @ 2020-06-06 23:28 UTC (permalink / raw)
  To: Bean Huo, alim.akhtar, avri.altman, asutoshd, jejb,
	martin.petersen, stanley.chu, beanhuo, bvanassche, cang,
	ebiggers
  Cc: linux-scsi, linux-kernel


> 
> From: Bean Huo <beanhuo@micron.com>
> 
> The static function ufshcd_setup_clocks() is just a wrapper around
> __ufshcd_setup_clocks(), remove it. Rename original function wrapped
> __ufshcd_setup_clocks() to new ufshcd_setup_clocks().

Not sure about this change, we have only one call with skip_ref_clock set to true, the original code actually make sense from readability stand point. 

> 
> Signed-off-by: Bean Huo <beanhuo@micron.com>
> ---
>  drivers/scsi/ufs/ufshcd.c | 32 ++++++++++++--------------------
>  1 file changed, 12 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index
> ec4f55211648..531d0b7878db 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -215,9 +215,7 @@ static int ufshcd_eh_host_reset_handler(struct
> scsi_cmnd *cmd);  static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int
> tag);  static void ufshcd_hba_exit(struct ufs_hba *hba);  static int
> ufshcd_probe_hba(struct ufs_hba *hba, bool async); -static int
> __ufshcd_setup_clocks(struct ufs_hba *hba, bool on,
> -				 bool skip_ref_clk);
> -static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on);
> +static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on, bool
> +skip_ref_clk);
>  static int ufshcd_uic_hibern8_enter(struct ufs_hba *hba);  static inline void
> ufshcd_add_delay_before_dme_cmd(struct ufs_hba *hba);  static int
> ufshcd_host_reset_and_restore(struct ufs_hba *hba); @@ -1497,7 +1495,7
> @@ static void ufshcd_ungate_work(struct work_struct *work)
>  	}
> 
>  	spin_unlock_irqrestore(hba->host->host_lock, flags);
> -	ufshcd_setup_clocks(hba, true);
> +	ufshcd_setup_clocks(hba, true, false);
> 
>  	ufshcd_enable_irq(hba);
> 
> @@ -1655,10 +1653,10 @@ static void ufshcd_gate_work(struct work_struct
> *work)
>  	ufshcd_disable_irq(hba);
> 
>  	if (!ufshcd_is_link_active(hba))
> -		ufshcd_setup_clocks(hba, false);
> +		ufshcd_setup_clocks(hba, false, false);
>  	else
>  		/* If link is active, device ref_clk can't be switched off */
> -		__ufshcd_setup_clocks(hba, false, true);
> +		ufshcd_setup_clocks(hba, false, true);
> 
>  	/*
>  	 * In case you are here to cancel this work the gating state @@ -
> 7683,8 +7681,7 @@ static int ufshcd_init_hba_vreg(struct ufs_hba *hba)
>  	return 0;
>  }
> 
> -static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on,
> -					bool skip_ref_clk)
> +static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on, bool
> +skip_ref_clk)
>  {
>  	int ret = 0;
>  	struct ufs_clk_info *clki;
> @@ -7747,11 +7744,6 @@ static int __ufshcd_setup_clocks(struct ufs_hba
> *hba, bool on,
>  	return ret;
>  }
> 
> -static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on) -{
> -	return  __ufshcd_setup_clocks(hba, on, false);
> -}
> -
>  static int ufshcd_init_clocks(struct ufs_hba *hba)  {
>  	int ret = 0;
> @@ -7858,7 +7850,7 @@ static int ufshcd_hba_init(struct ufs_hba *hba)
>  	if (err)
>  		goto out_disable_hba_vreg;
> 
> -	err = ufshcd_setup_clocks(hba, true);
> +	err = ufshcd_setup_clocks(hba, true, false);
>  	if (err)
>  		goto out_disable_hba_vreg;
> 
> @@ -7880,7 +7872,7 @@ static int ufshcd_hba_init(struct ufs_hba *hba)
>  out_disable_vreg:
>  	ufshcd_setup_vreg(hba, false);
>  out_disable_clks:
> -	ufshcd_setup_clocks(hba, false);
> +	ufshcd_setup_clocks(hba, false, false);
>  out_disable_hba_vreg:
>  	ufshcd_setup_hba_vreg(hba, false);
>  out:
> @@ -7896,7 +7888,7 @@ static void ufshcd_hba_exit(struct ufs_hba *hba)
>  		if (ufshcd_is_clkscaling_supported(hba))
>  			if (hba->devfreq)
>  				ufshcd_suspend_clkscaling(hba);
> -		ufshcd_setup_clocks(hba, false);
> +		ufshcd_setup_clocks(hba, false, false);
>  		ufshcd_setup_hba_vreg(hba, false);
>  		hba->is_powered = false;
>  		ufs_put_device_desc(hba);
> @@ -8259,10 +8251,10 @@ static int ufshcd_suspend(struct ufs_hba *hba,
> enum ufs_pm_op pm_op)
>  	ufshcd_disable_irq(hba);
> 
>  	if (!ufshcd_is_link_active(hba))
> -		ufshcd_setup_clocks(hba, false);
> +		ufshcd_setup_clocks(hba, false, false);
>  	else
>  		/* If link is active, device ref_clk can't be switched off */
> -		__ufshcd_setup_clocks(hba, false, true);
> +		ufshcd_setup_clocks(hba, false, true);
> 
>  	hba->clk_gating.state = CLKS_OFF;
>  	trace_ufshcd_clk_gating(dev_name(hba->dev), hba-
> >clk_gating.state); @@ -8321,7 +8313,7 @@ static int ufshcd_resume(struct
> ufs_hba *hba, enum ufs_pm_op pm_op)
> 
>  	ufshcd_hba_vreg_set_hpm(hba);
>  	/* Make sure clocks are enabled before accessing controller */
> -	ret = ufshcd_setup_clocks(hba, true);
> +	ret = ufshcd_setup_clocks(hba, true, false);
>  	if (ret)
>  		goto out;
> 
> @@ -8404,7 +8396,7 @@ static int ufshcd_resume(struct ufs_hba *hba,
> enum ufs_pm_op pm_op)
>  	ufshcd_disable_irq(hba);
>  	if (hba->clk_scaling.is_allowed)
>  		ufshcd_suspend_clkscaling(hba);
> -	ufshcd_setup_clocks(hba, false);
> +	ufshcd_setup_clocks(hba, false, false);
>  out:
>  	hba->pm_op_in_progress = 0;
>  	if (ret)
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate
  2020-06-06 23:20   ` Winkler, Tomas
@ 2020-06-10  9:30     ` Bean Huo
  2020-06-10 10:33       ` Winkler, Tomas
  0 siblings, 1 reply; 10+ messages in thread
From: Bean Huo @ 2020-06-10  9:30 UTC (permalink / raw)
  To: Winkler, Tomas, alim.akhtar, avri.altman, asutoshd, jejb,
	martin.petersen, stanley.chu, beanhuo, bvanassche, cang,
	ebiggers
  Cc: linux-scsi, linux-kernel

On Sat, 2020-06-06 at 23:20 +0000, Winkler, Tomas wrote:
> > 
> > From: Bean Huo <beanhuo@micron.com>
> > 
> > Add SPDX GPL-2.0 to UFS driver files that specified the GPL version
> > 2 license,
> > remove the full boilerplate text.
> > 
> > Signed-off-by: Bean Huo <beanhuo@micron.com>
> 
> LGTM.
> Thanks
> Tomas

Hi Tomas

would you please add your viewed or acked tag for this patch?
thanks, 

Bean


> 
> > ---
> >  drivers/scsi/ufs/ufs.h           | 27 +--------------------------
> >  drivers/scsi/ufs/ufshcd-pci.c    | 25 +------------------------
> >  drivers/scsi/ufs/ufshcd-pltfrm.c | 27 +--------------------------
> >  drivers/scsi/ufs/ufshcd.c        | 30 +---------------------------
> > --
> >  drivers/scsi/ufs/ufshcd.h        | 27 +--------------------------
> >  drivers/scsi/ufs/ufshci.h        | 27 +--------------------------
> >  6 files changed, 6 insertions(+), 157 deletions(-)
> > 
> > diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h index
> > c70845d41449..7df4bdc813d6 100644
> > --- a/drivers/scsi/ufs/ufs.h
> > +++ b/drivers/scsi/ufs/ufs.h
> > @@ -1,36 +1,11 @@
> > +/* SPDX-License-Identifier: GPL-2.0-or-later */
> >  /*
> >   * Universal Flash Storage Host controller driver
> > - *
> > - * This code is based on drivers/scsi/ufs/ufs.h
> >   * Copyright (C) 2011-2013 Samsung India Software Operations
> >   *
> >   * Authors:
> >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > - *
> > - * This program is free software; you can redistribute it and/or
> > - * modify it under the terms of the GNU General Public License
> > - * as published by the Free Software Foundation; either version 2
> > - * of the License, or (at your option) any later version.
> > - * See the COPYING file in the top-level directory or visit
> > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > - *
> > - * This program is distributed in the hope that it will be useful,
> > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > - * GNU General Public License for more details.
> > - *
> > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > - * without warranty of any kind. You are solely responsible for
> > - * determining the appropriateness of using and distributing
> > - * the program and assume all risks associated with your exercise
> > - * of rights with respect to the program, including but not
> > limited
> > - * to infringement of third party rights, the risks and costs of
> > - * program errors, damage to or loss of data, programs or
> > equipment,
> > - * and unavailability or interruption of operations. Under no
> > - * circumstances will the contributor of this Program be liable
> > for
> > - * any damages of any kind arising from your use or distribution
> > of
> > - * this program.
> >   */
> > 
> >  #ifndef _UFS_H
> > diff --git a/drivers/scsi/ufs/ufshcd-pci.c
> > b/drivers/scsi/ufs/ufshcd-pci.c index
> > 8f78a8151499..f407b13883ac 100644
> > --- a/drivers/scsi/ufs/ufshcd-pci.c
> > +++ b/drivers/scsi/ufs/ufshcd-pci.c
> > @@ -1,3 +1,4 @@
> > +// SPDX-License-Identifier: GPL-2.0-or-later
> >  /*
> >   * Universal Flash Storage Host controller PCI glue driver
> >   *
> > @@ -7,30 +8,6 @@
> >   * Authors:
> >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > - *
> > - * This program is free software; you can redistribute it and/or
> > - * modify it under the terms of the GNU General Public License
> > - * as published by the Free Software Foundation; either version 2
> > - * of the License, or (at your option) any later version.
> > - * See the COPYING file in the top-level directory or visit
> > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > - *
> > - * This program is distributed in the hope that it will be useful,
> > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > - * GNU General Public License for more details.
> > - *
> > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > - * without warranty of any kind. You are solely responsible for
> > - * determining the appropriateness of using and distributing
> > - * the program and assume all risks associated with your exercise
> > - * of rights with respect to the program, including but not
> > limited
> > - * to infringement of third party rights, the risks and costs of
> > - * program errors, damage to or loss of data, programs or
> > equipment,
> > - * and unavailability or interruption of operations. Under no
> > - * circumstances will the contributor of this Program be liable
> > for
> > - * any damages of any kind arising from your use or distribution
> > of
> > - * this program.
> >   */
> > 
> >  #include "ufshcd.h"
> > diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c
> > b/drivers/scsi/ufs/ufshcd-pltfrm.c
> > index 76f9be71c31b..3db0af66c71c 100644
> > --- a/drivers/scsi/ufs/ufshcd-pltfrm.c
> > +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
> > @@ -1,36 +1,11 @@
> > +// SPDX-License-Identifier: GPL-2.0-or-later
> >  /*
> >   * Universal Flash Storage Host controller Platform bus based glue
> > driver
> > - *
> > - * This code is based on drivers/scsi/ufs/ufshcd-pltfrm.c
> >   * Copyright (C) 2011-2013 Samsung India Software Operations
> >   *
> >   * Authors:
> >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > - *
> > - * This program is free software; you can redistribute it and/or
> > - * modify it under the terms of the GNU General Public License
> > - * as published by the Free Software Foundation; either version 2
> > - * of the License, or (at your option) any later version.
> > - * See the COPYING file in the top-level directory or visit
> > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > - *
> > - * This program is distributed in the hope that it will be useful,
> > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > - * GNU General Public License for more details.
> > - *
> > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > - * without warranty of any kind. You are solely responsible for
> > - * determining the appropriateness of using and distributing
> > - * the program and assume all risks associated with your exercise
> > - * of rights with respect to the program, including but not
> > limited
> > - * to infringement of third party rights, the risks and costs of
> > - * program errors, damage to or loss of data, programs or
> > equipment,
> > - * and unavailability or interruption of operations. Under no
> > - * circumstances will the contributor of this Program be liable
> > for
> > - * any damages of any kind arising from your use or distribution
> > of
> > - * this program.
> >   */
> > 
> >  #include <linux/platform_device.h>
> > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> > index
> > ad4fc829cbb2..ec4f55211648 100644
> > --- a/drivers/scsi/ufs/ufshcd.c
> > +++ b/drivers/scsi/ufs/ufshcd.c
> > @@ -1,40 +1,12 @@
> > +// SPDX-License-Identifier: GPL-2.0-or-later
> >  /*
> >   * Universal Flash Storage Host controller driver Core
> > - *
> > - * This code is based on drivers/scsi/ufs/ufshcd.c
> >   * Copyright (C) 2011-2013 Samsung India Software Operations
> >   * Copyright (c) 2013-2016, The Linux Foundation. All rights
> > reserved.
> >   *
> >   * Authors:
> >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > - *
> > - * This program is free software; you can redistribute it and/or
> > - * modify it under the terms of the GNU General Public License
> > - * as published by the Free Software Foundation; either version 2
> > - * of the License, or (at your option) any later version.
> > - * See the COPYING file in the top-level directory or visit
> > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > - *
> > - * This program is distributed in the hope that it will be useful,
> > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > - * GNU General Public License for more details.
> > - *
> > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > - * without warranty of any kind. You are solely responsible for
> > - * determining the appropriateness of using and distributing
> > - * the program and assume all risks associated with your exercise
> > - * of rights with respect to the program, including but not
> > limited
> > - * to infringement of third party rights, the risks and costs of
> > - * program errors, damage to or loss of data, programs or
> > equipment,
> > - * and unavailability or interruption of operations. Under no
> > - * circumstances will the contributor of this Program be liable
> > for
> > - * any damages of any kind arising from your use or distribution
> > of
> > - * this program.
> > - *
> > - * The Linux Foundation chooses to take subject only to the GPLv2
> > - * license terms, and distributes only under these terms.
> >   */
> > 
> >  #include <linux/async.h>
> > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
> > index
> > bf97d616e597..ef92c4a9e378 100644
> > --- a/drivers/scsi/ufs/ufshcd.h
> > +++ b/drivers/scsi/ufs/ufshcd.h
> > @@ -1,37 +1,12 @@
> > +/* SPDX-License-Identifier: GPL-2.0-or-later */
> >  /*
> >   * Universal Flash Storage Host controller driver
> > - *
> > - * This code is based on drivers/scsi/ufs/ufshcd.h
> >   * Copyright (C) 2011-2013 Samsung India Software Operations
> >   * Copyright (c) 2013-2016, The Linux Foundation. All rights
> > reserved.
> >   *
> >   * Authors:
> >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > - *
> > - * This program is free software; you can redistribute it and/or
> > - * modify it under the terms of the GNU General Public License
> > - * as published by the Free Software Foundation; either version 2
> > - * of the License, or (at your option) any later version.
> > - * See the COPYING file in the top-level directory or visit
> > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > - *
> > - * This program is distributed in the hope that it will be useful,
> > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > - * GNU General Public License for more details.
> > - *
> > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > - * without warranty of any kind. You are solely responsible for
> > - * determining the appropriateness of using and distributing
> > - * the program and assume all risks associated with your exercise
> > - * of rights with respect to the program, including but not
> > limited
> > - * to infringement of third party rights, the risks and costs of
> > - * program errors, damage to or loss of data, programs or
> > equipment,
> > - * and unavailability or interruption of operations. Under no
> > - * circumstances will the contributor of this Program be liable
> > for
> > - * any damages of any kind arising from your use or distribution
> > of
> > - * this program.
> >   */
> > 
> >  #ifndef _UFSHCD_H
> > diff --git a/drivers/scsi/ufs/ufshci.h b/drivers/scsi/ufs/ufshci.h
> > index
> > c2961d37cc1c..2c1c7a277430 100644
> > --- a/drivers/scsi/ufs/ufshci.h
> > +++ b/drivers/scsi/ufs/ufshci.h
> > @@ -1,36 +1,11 @@
> > +/* SPDX-License-Identifier: GPL-2.0-or-later */
> >  /*
> >   * Universal Flash Storage Host controller driver
> > - *
> > - * This code is based on drivers/scsi/ufs/ufshci.h
> >   * Copyright (C) 2011-2013 Samsung India Software Operations
> >   *
> >   * Authors:
> >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > - *
> > - * This program is free software; you can redistribute it and/or
> > - * modify it under the terms of the GNU General Public License
> > - * as published by the Free Software Foundation; either version 2
> > - * of the License, or (at your option) any later version.
> > - * See the COPYING file in the top-level directory or visit
> > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > - *
> > - * This program is distributed in the hope that it will be useful,
> > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > - * GNU General Public License for more details.
> > - *
> > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > - * without warranty of any kind. You are solely responsible for
> > - * determining the appropriateness of using and distributing
> > - * the program and assume all risks associated with your exercise
> > - * of rights with respect to the program, including but not
> > limited
> > - * to infringement of third party rights, the risks and costs of
> > - * program errors, damage to or loss of data, programs or
> > equipment,
> > - * and unavailability or interruption of operations. Under no
> > - * circumstances will the contributor of this Program be liable
> > for
> > - * any damages of any kind arising from your use or distribution
> > of
> > - * this program.
> >   */
> > 
> >  #ifndef _UFSHCI_H
> > --
> > 2.17.1
> 
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate
  2020-06-10  9:30     ` Bean Huo
@ 2020-06-10 10:33       ` Winkler, Tomas
  0 siblings, 0 replies; 10+ messages in thread
From: Winkler, Tomas @ 2020-06-10 10:33 UTC (permalink / raw)
  To: Bean Huo, alim.akhtar, avri.altman, asutoshd, jejb,
	martin.petersen, stanley.chu, beanhuo, bvanassche, cang,
	ebiggers
  Cc: linux-scsi, linux-kernel


> boilerplate
> 
> On Sat, 2020-06-06 at 23:20 +0000, Winkler, Tomas wrote:
> > >
> > > From: Bean Huo <beanhuo@micron.com>
> > >
> > > Add SPDX GPL-2.0 to UFS driver files that specified the GPL version
> > > 2 license,
> > > remove the full boilerplate text.
> > >
> > > Signed-off-by: Bean Huo <beanhuo@micron.com>
> >
> > LGTM.
> > Thanks
> > Tomas
> 
> Hi Tomas
> 
> would you please add your viewed or acked tag for this patch?
> thanks,

Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>

> Bean
> 
> 
> >
> > > ---
> > >  drivers/scsi/ufs/ufs.h           | 27 +--------------------------
> > >  drivers/scsi/ufs/ufshcd-pci.c    | 25 +------------------------
> > >  drivers/scsi/ufs/ufshcd-pltfrm.c | 27 +--------------------------
> > >  drivers/scsi/ufs/ufshcd.c        | 30 +---------------------------
> > > --
> > >  drivers/scsi/ufs/ufshcd.h        | 27 +--------------------------
> > >  drivers/scsi/ufs/ufshci.h        | 27 +--------------------------
> > >  6 files changed, 6 insertions(+), 157 deletions(-)
> > >
> > > diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h index
> > > c70845d41449..7df4bdc813d6 100644
> > > --- a/drivers/scsi/ufs/ufs.h
> > > +++ b/drivers/scsi/ufs/ufs.h
> > > @@ -1,36 +1,11 @@
> > > +/* SPDX-License-Identifier: GPL-2.0-or-later */
> > >  /*
> > >   * Universal Flash Storage Host controller driver
> > > - *
> > > - * This code is based on drivers/scsi/ufs/ufs.h
> > >   * Copyright (C) 2011-2013 Samsung India Software Operations
> > >   *
> > >   * Authors:
> > >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> > >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > > - *
> > > - * This program is free software; you can redistribute it and/or
> > > - * modify it under the terms of the GNU General Public License
> > > - * as published by the Free Software Foundation; either version 2
> > > - * of the License, or (at your option) any later version.
> > > - * See the COPYING file in the top-level directory or visit
> > > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > > - *
> > > - * This program is distributed in the hope that it will be useful,
> > > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > > - * GNU General Public License for more details.
> > > - *
> > > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > > - * without warranty of any kind. You are solely responsible for
> > > - * determining the appropriateness of using and distributing
> > > - * the program and assume all risks associated with your exercise
> > > - * of rights with respect to the program, including but not limited
> > > - * to infringement of third party rights, the risks and costs of
> > > - * program errors, damage to or loss of data, programs or
> > > equipment,
> > > - * and unavailability or interruption of operations. Under no
> > > - * circumstances will the contributor of this Program be liable for
> > > - * any damages of any kind arising from your use or distribution of
> > > - * this program.
> > >   */
> > >
> > >  #ifndef _UFS_H
> > > diff --git a/drivers/scsi/ufs/ufshcd-pci.c
> > > b/drivers/scsi/ufs/ufshcd-pci.c index 8f78a8151499..f407b13883ac
> > > 100644
> > > --- a/drivers/scsi/ufs/ufshcd-pci.c
> > > +++ b/drivers/scsi/ufs/ufshcd-pci.c
> > > @@ -1,3 +1,4 @@
> > > +// SPDX-License-Identifier: GPL-2.0-or-later
> > >  /*
> > >   * Universal Flash Storage Host controller PCI glue driver
> > >   *
> > > @@ -7,30 +8,6 @@
> > >   * Authors:
> > >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> > >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > > - *
> > > - * This program is free software; you can redistribute it and/or
> > > - * modify it under the terms of the GNU General Public License
> > > - * as published by the Free Software Foundation; either version 2
> > > - * of the License, or (at your option) any later version.
> > > - * See the COPYING file in the top-level directory or visit
> > > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > > - *
> > > - * This program is distributed in the hope that it will be useful,
> > > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > > - * GNU General Public License for more details.
> > > - *
> > > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > > - * without warranty of any kind. You are solely responsible for
> > > - * determining the appropriateness of using and distributing
> > > - * the program and assume all risks associated with your exercise
> > > - * of rights with respect to the program, including but not limited
> > > - * to infringement of third party rights, the risks and costs of
> > > - * program errors, damage to or loss of data, programs or
> > > equipment,
> > > - * and unavailability or interruption of operations. Under no
> > > - * circumstances will the contributor of this Program be liable for
> > > - * any damages of any kind arising from your use or distribution of
> > > - * this program.
> > >   */
> > >
> > >  #include "ufshcd.h"
> > > diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c
> > > b/drivers/scsi/ufs/ufshcd-pltfrm.c
> > > index 76f9be71c31b..3db0af66c71c 100644
> > > --- a/drivers/scsi/ufs/ufshcd-pltfrm.c
> > > +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
> > > @@ -1,36 +1,11 @@
> > > +// SPDX-License-Identifier: GPL-2.0-or-later
> > >  /*
> > >   * Universal Flash Storage Host controller Platform bus based glue
> > > driver
> > > - *
> > > - * This code is based on drivers/scsi/ufs/ufshcd-pltfrm.c
> > >   * Copyright (C) 2011-2013 Samsung India Software Operations
> > >   *
> > >   * Authors:
> > >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> > >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > > - *
> > > - * This program is free software; you can redistribute it and/or
> > > - * modify it under the terms of the GNU General Public License
> > > - * as published by the Free Software Foundation; either version 2
> > > - * of the License, or (at your option) any later version.
> > > - * See the COPYING file in the top-level directory or visit
> > > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > > - *
> > > - * This program is distributed in the hope that it will be useful,
> > > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > > - * GNU General Public License for more details.
> > > - *
> > > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > > - * without warranty of any kind. You are solely responsible for
> > > - * determining the appropriateness of using and distributing
> > > - * the program and assume all risks associated with your exercise
> > > - * of rights with respect to the program, including but not limited
> > > - * to infringement of third party rights, the risks and costs of
> > > - * program errors, damage to or loss of data, programs or
> > > equipment,
> > > - * and unavailability or interruption of operations. Under no
> > > - * circumstances will the contributor of this Program be liable for
> > > - * any damages of any kind arising from your use or distribution of
> > > - * this program.
> > >   */
> > >
> > >  #include <linux/platform_device.h>
> > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> > > index
> > > ad4fc829cbb2..ec4f55211648 100644
> > > --- a/drivers/scsi/ufs/ufshcd.c
> > > +++ b/drivers/scsi/ufs/ufshcd.c
> > > @@ -1,40 +1,12 @@
> > > +// SPDX-License-Identifier: GPL-2.0-or-later
> > >  /*
> > >   * Universal Flash Storage Host controller driver Core
> > > - *
> > > - * This code is based on drivers/scsi/ufs/ufshcd.c
> > >   * Copyright (C) 2011-2013 Samsung India Software Operations
> > >   * Copyright (c) 2013-2016, The Linux Foundation. All rights
> > > reserved.
> > >   *
> > >   * Authors:
> > >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> > >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > > - *
> > > - * This program is free software; you can redistribute it and/or
> > > - * modify it under the terms of the GNU General Public License
> > > - * as published by the Free Software Foundation; either version 2
> > > - * of the License, or (at your option) any later version.
> > > - * See the COPYING file in the top-level directory or visit
> > > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > > - *
> > > - * This program is distributed in the hope that it will be useful,
> > > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > > - * GNU General Public License for more details.
> > > - *
> > > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > > - * without warranty of any kind. You are solely responsible for
> > > - * determining the appropriateness of using and distributing
> > > - * the program and assume all risks associated with your exercise
> > > - * of rights with respect to the program, including but not limited
> > > - * to infringement of third party rights, the risks and costs of
> > > - * program errors, damage to or loss of data, programs or
> > > equipment,
> > > - * and unavailability or interruption of operations. Under no
> > > - * circumstances will the contributor of this Program be liable for
> > > - * any damages of any kind arising from your use or distribution of
> > > - * this program.
> > > - *
> > > - * The Linux Foundation chooses to take subject only to the GPLv2
> > > - * license terms, and distributes only under these terms.
> > >   */
> > >
> > >  #include <linux/async.h>
> > > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
> > > index
> > > bf97d616e597..ef92c4a9e378 100644
> > > --- a/drivers/scsi/ufs/ufshcd.h
> > > +++ b/drivers/scsi/ufs/ufshcd.h
> > > @@ -1,37 +1,12 @@
> > > +/* SPDX-License-Identifier: GPL-2.0-or-later */
> > >  /*
> > >   * Universal Flash Storage Host controller driver
> > > - *
> > > - * This code is based on drivers/scsi/ufs/ufshcd.h
> > >   * Copyright (C) 2011-2013 Samsung India Software Operations
> > >   * Copyright (c) 2013-2016, The Linux Foundation. All rights
> > > reserved.
> > >   *
> > >   * Authors:
> > >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> > >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > > - *
> > > - * This program is free software; you can redistribute it and/or
> > > - * modify it under the terms of the GNU General Public License
> > > - * as published by the Free Software Foundation; either version 2
> > > - * of the License, or (at your option) any later version.
> > > - * See the COPYING file in the top-level directory or visit
> > > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > > - *
> > > - * This program is distributed in the hope that it will be useful,
> > > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > > - * GNU General Public License for more details.
> > > - *
> > > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > > - * without warranty of any kind. You are solely responsible for
> > > - * determining the appropriateness of using and distributing
> > > - * the program and assume all risks associated with your exercise
> > > - * of rights with respect to the program, including but not limited
> > > - * to infringement of third party rights, the risks and costs of
> > > - * program errors, damage to or loss of data, programs or
> > > equipment,
> > > - * and unavailability or interruption of operations. Under no
> > > - * circumstances will the contributor of this Program be liable for
> > > - * any damages of any kind arising from your use or distribution of
> > > - * this program.
> > >   */
> > >
> > >  #ifndef _UFSHCD_H
> > > diff --git a/drivers/scsi/ufs/ufshci.h b/drivers/scsi/ufs/ufshci.h
> > > index
> > > c2961d37cc1c..2c1c7a277430 100644
> > > --- a/drivers/scsi/ufs/ufshci.h
> > > +++ b/drivers/scsi/ufs/ufshci.h
> > > @@ -1,36 +1,11 @@
> > > +/* SPDX-License-Identifier: GPL-2.0-or-later */
> > >  /*
> > >   * Universal Flash Storage Host controller driver
> > > - *
> > > - * This code is based on drivers/scsi/ufs/ufshci.h
> > >   * Copyright (C) 2011-2013 Samsung India Software Operations
> > >   *
> > >   * Authors:
> > >   *	Santosh Yaraganavi <santosh.sy@samsung.com>
> > >   *	Vinayak Holikatti <h.vinayak@samsung.com>
> > > - *
> > > - * This program is free software; you can redistribute it and/or
> > > - * modify it under the terms of the GNU General Public License
> > > - * as published by the Free Software Foundation; either version 2
> > > - * of the License, or (at your option) any later version.
> > > - * See the COPYING file in the top-level directory or visit
> > > - * <http://www.gnu.org/licenses/gpl-2.0.html>
> > > - *
> > > - * This program is distributed in the hope that it will be useful,
> > > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > > - * GNU General Public License for more details.
> > > - *
> > > - * This program is provided "AS IS" and "WITH ALL FAULTS" and
> > > - * without warranty of any kind. You are solely responsible for
> > > - * determining the appropriateness of using and distributing
> > > - * the program and assume all risks associated with your exercise
> > > - * of rights with respect to the program, including but not limited
> > > - * to infringement of third party rights, the risks and costs of
> > > - * program errors, damage to or loss of data, programs or
> > > equipment,
> > > - * and unavailability or interruption of operations. Under no
> > > - * circumstances will the contributor of this Program be liable for
> > > - * any damages of any kind arising from your use or distribution of
> > > - * this program.
> > >   */
> > >
> > >  #ifndef _UFSHCI_H
> > > --
> > > 2.17.1
> >
> >


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate
  2020-06-05 20:05 ` [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate Bean Huo
  2020-06-06 23:20   ` Winkler, Tomas
@ 2020-06-11 15:52   ` Alim Akhtar
  1 sibling, 0 replies; 10+ messages in thread
From: Alim Akhtar @ 2020-06-11 15:52 UTC (permalink / raw)
  To: 'Bean Huo',
	avri.altman, asutoshd, jejb, martin.petersen, stanley.chu,
	beanhuo, bvanassche, tomas.winkler, cang, ebiggers
  Cc: linux-scsi, linux-kernel

Hi Bean

> -----Original Message-----
> From: Bean Huo <huobean@gmail.com>
> Sent: 06 June 2020 01:35
> To: alim.akhtar@samsung.com; avri.altman@wdc.com;
> asutoshd@codeaurora.org; jejb@linux.ibm.com; martin.petersen@oracle.com;
> stanley.chu@mediatek.com; beanhuo@micron.com; bvanassche@acm.org;
> tomas.winkler@intel.com; cang@codeaurora.org; ebiggers@kernel.org
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2
boilerplate
> 
> From: Bean Huo <beanhuo@micron.com>
> 
> Add SPDX GPL-2.0 to UFS driver files that specified the GPL version 2
license,
> remove the full boilerplate text.
> 
> Signed-off-by: Bean Huo <beanhuo@micron.com>
> ---
>  drivers/scsi/ufs/ufs.h           | 27 +--------------------------
>  drivers/scsi/ufs/ufshcd-pci.c    | 25 +------------------------
>  drivers/scsi/ufs/ufshcd-pltfrm.c | 27 +--------------------------
>  drivers/scsi/ufs/ufshcd.c        | 30 +-----------------------------
>  drivers/scsi/ufs/ufshcd.h        | 27 +--------------------------
>  drivers/scsi/ufs/ufshci.h        | 27 +--------------------------
>  6 files changed, 6 insertions(+), 157 deletions(-)
> 
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

> --
> 2.17.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v3 2/2] scsi: ufs: remove wrapper function ufshcd_setup_clocks()
  2020-06-06 23:28   ` Winkler, Tomas
@ 2020-06-11 16:00     ` Alim Akhtar
  0 siblings, 0 replies; 10+ messages in thread
From: Alim Akhtar @ 2020-06-11 16:00 UTC (permalink / raw)
  To: 'Winkler, Tomas', 'Bean Huo',
	avri.altman, asutoshd, jejb, martin.petersen, stanley.chu,
	beanhuo, bvanassche, cang, ebiggers
  Cc: linux-scsi, linux-kernel

Hi Bean,

> -----Original Message-----
> From: Winkler, Tomas <tomas.winkler@intel.com>
> Sent: 07 June 2020 04:58
> To: Bean Huo <huobean@gmail.com>; alim.akhtar@samsung.com;
> avri.altman@wdc.com; asutoshd@codeaurora.org; jejb@linux.ibm.com;
> martin.petersen@oracle.com; stanley.chu@mediatek.com;
> beanhuo@micron.com; bvanassche@acm.org; cang@codeaurora.org;
> ebiggers@kernel.org
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: RE: [PATCH v3 2/2] scsi: ufs: remove wrapper function
> ufshcd_setup_clocks()
> 
> 
> >
> > From: Bean Huo <beanhuo@micron.com>
> >
> > The static function ufshcd_setup_clocks() is just a wrapper around
> > __ufshcd_setup_clocks(), remove it. Rename original function wrapped
> > __ufshcd_setup_clocks() to new ufshcd_setup_clocks().
> 
> Not sure about this change, we have only one call with skip_ref_clock set
to
> true, the original code actually make sense from readability stand point.
> 
I do agree with Tomas, it easy to read and understand the original code.
Thanks

> >
> > Signed-off-by: Bean Huo <beanhuo@micron.com>
> > ---
> >  drivers/scsi/ufs/ufshcd.c | 32 ++++++++++++--------------------
> >  1 file changed, 12 insertions(+), 20 deletions(-)
> >
> > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> > index ec4f55211648..531d0b7878db 100644
> > --- a/drivers/scsi/ufs/ufshcd.c
> > +++ b/drivers/scsi/ufs/ufshcd.c
> > @@ -215,9 +215,7 @@ static int ufshcd_eh_host_reset_handler(struct
> > scsi_cmnd *cmd);  static int ufshcd_clear_tm_cmd(struct ufs_hba *hba,
> > int tag);  static void ufshcd_hba_exit(struct ufs_hba *hba);  static
> > int ufshcd_probe_hba(struct ufs_hba *hba, bool async); -static int
> > __ufshcd_setup_clocks(struct ufs_hba *hba, bool on,
> > -				 bool skip_ref_clk);
> > -static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on);
> > +static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on, bool
> > +skip_ref_clk);
> >  static int ufshcd_uic_hibern8_enter(struct ufs_hba *hba);  static
> > inline void ufshcd_add_delay_before_dme_cmd(struct ufs_hba *hba);
> > static int ufshcd_host_reset_and_restore(struct ufs_hba *hba); @@
> > -1497,7 +1495,7 @@ static void ufshcd_ungate_work(struct work_struct
> *work)
> >  	}
> >
> >  	spin_unlock_irqrestore(hba->host->host_lock, flags);
> > -	ufshcd_setup_clocks(hba, true);
> > +	ufshcd_setup_clocks(hba, true, false);
> >
> >  	ufshcd_enable_irq(hba);
> >
> > @@ -1655,10 +1653,10 @@ static void ufshcd_gate_work(struct
> > work_struct
> > *work)
> >  	ufshcd_disable_irq(hba);
> >
> >  	if (!ufshcd_is_link_active(hba))
> > -		ufshcd_setup_clocks(hba, false);
> > +		ufshcd_setup_clocks(hba, false, false);
> >  	else
> >  		/* If link is active, device ref_clk can't be switched off
*/
> > -		__ufshcd_setup_clocks(hba, false, true);
> > +		ufshcd_setup_clocks(hba, false, true);
> >
> >  	/*
> >  	 * In case you are here to cancel this work the gating state @@ -
> > 7683,8 +7681,7 @@ static int ufshcd_init_hba_vreg(struct ufs_hba *hba)
> >  	return 0;
> >  }
> >
> > -static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on,
> > -					bool skip_ref_clk)
> > +static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on, bool
> > +skip_ref_clk)
> >  {
> >  	int ret = 0;
> >  	struct ufs_clk_info *clki;
> > @@ -7747,11 +7744,6 @@ static int __ufshcd_setup_clocks(struct ufs_hba
> > *hba, bool on,
> >  	return ret;
> >  }
> >
> > -static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on) -{
> > -	return  __ufshcd_setup_clocks(hba, on, false);
> > -}
> > -
> >  static int ufshcd_init_clocks(struct ufs_hba *hba)  {
> >  	int ret = 0;
> > @@ -7858,7 +7850,7 @@ static int ufshcd_hba_init(struct ufs_hba *hba)
> >  	if (err)
> >  		goto out_disable_hba_vreg;
> >
> > -	err = ufshcd_setup_clocks(hba, true);
> > +	err = ufshcd_setup_clocks(hba, true, false);
> >  	if (err)
> >  		goto out_disable_hba_vreg;
> >
> > @@ -7880,7 +7872,7 @@ static int ufshcd_hba_init(struct ufs_hba *hba)
> >  out_disable_vreg:
> >  	ufshcd_setup_vreg(hba, false);
> >  out_disable_clks:
> > -	ufshcd_setup_clocks(hba, false);
> > +	ufshcd_setup_clocks(hba, false, false);
> >  out_disable_hba_vreg:
> >  	ufshcd_setup_hba_vreg(hba, false);
> >  out:
> > @@ -7896,7 +7888,7 @@ static void ufshcd_hba_exit(struct ufs_hba *hba)
> >  		if (ufshcd_is_clkscaling_supported(hba))
> >  			if (hba->devfreq)
> >  				ufshcd_suspend_clkscaling(hba);
> > -		ufshcd_setup_clocks(hba, false);
> > +		ufshcd_setup_clocks(hba, false, false);
> >  		ufshcd_setup_hba_vreg(hba, false);
> >  		hba->is_powered = false;
> >  		ufs_put_device_desc(hba);
> > @@ -8259,10 +8251,10 @@ static int ufshcd_suspend(struct ufs_hba *hba,
> > enum ufs_pm_op pm_op)
> >  	ufshcd_disable_irq(hba);
> >
> >  	if (!ufshcd_is_link_active(hba))
> > -		ufshcd_setup_clocks(hba, false);
> > +		ufshcd_setup_clocks(hba, false, false);
> >  	else
> >  		/* If link is active, device ref_clk can't be switched off
*/
> > -		__ufshcd_setup_clocks(hba, false, true);
> > +		ufshcd_setup_clocks(hba, false, true);
> >
> >  	hba->clk_gating.state = CLKS_OFF;
> >  	trace_ufshcd_clk_gating(dev_name(hba->dev), hba-
> > >clk_gating.state); @@ -8321,7 +8313,7 @@ static int
> > >ufshcd_resume(struct
> > ufs_hba *hba, enum ufs_pm_op pm_op)
> >
> >  	ufshcd_hba_vreg_set_hpm(hba);
> >  	/* Make sure clocks are enabled before accessing controller */
> > -	ret = ufshcd_setup_clocks(hba, true);
> > +	ret = ufshcd_setup_clocks(hba, true, false);
> >  	if (ret)
> >  		goto out;
> >
> > @@ -8404,7 +8396,7 @@ static int ufshcd_resume(struct ufs_hba *hba,
> > enum ufs_pm_op pm_op)
> >  	ufshcd_disable_irq(hba);
> >  	if (hba->clk_scaling.is_allowed)
> >  		ufshcd_suspend_clkscaling(hba);
> > -	ufshcd_setup_clocks(hba, false);
> > +	ufshcd_setup_clocks(hba, false, false);
> >  out:
> >  	hba->pm_op_in_progress = 0;
> >  	if (ret)
> > --
> > 2.17.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/2] scsi: ufs: cleanup UFS driver
  2020-06-05 20:05 [PATCH v3 0/2] scsi: ufs: cleanup UFS driver Bean Huo
  2020-06-05 20:05 ` [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate Bean Huo
  2020-06-05 20:05 ` [PATCH v3 2/2] scsi: ufs: remove wrapper function ufshcd_setup_clocks() Bean Huo
@ 2020-06-16  3:59 ` Martin K. Petersen
  2 siblings, 0 replies; 10+ messages in thread
From: Martin K. Petersen @ 2020-06-16  3:59 UTC (permalink / raw)
  To: beanhuo, stanley.chu, jejb, bvanassche, ebiggers, cang,
	avri.altman, asutoshd, tomas.winkler, Bean Huo, alim.akhtar
  Cc: Martin K . Petersen, linux-scsi, linux-kernel

On Fri, 5 Jun 2020 22:05:18 +0200, Bean Huo wrote:

> Cleanup, no functional change
> 
> Changelog:
> 
> v2 -v3:
>     1. Change SPDX-License-Identifier: GPL-2.0 to
>        SPDX-License-Identifier: GPL-2.0-or-later (Eric Biggers)
> v1 - v2:
>     1. Split patch (Tomas Winkler)
> 
> [...]

Applied to 5.9/scsi-queue, thanks!

[1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate
      https://git.kernel.org/mkp/scsi/c/673511199ac9

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-06-16  4:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 20:05 [PATCH v3 0/2] scsi: ufs: cleanup UFS driver Bean Huo
2020-06-05 20:05 ` [PATCH v3 1/2] scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate Bean Huo
2020-06-06 23:20   ` Winkler, Tomas
2020-06-10  9:30     ` Bean Huo
2020-06-10 10:33       ` Winkler, Tomas
2020-06-11 15:52   ` Alim Akhtar
2020-06-05 20:05 ` [PATCH v3 2/2] scsi: ufs: remove wrapper function ufshcd_setup_clocks() Bean Huo
2020-06-06 23:28   ` Winkler, Tomas
2020-06-11 16:00     ` Alim Akhtar
2020-06-16  3:59 ` [PATCH v3 0/2] scsi: ufs: cleanup UFS driver 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).