Skip to contentSkip to conversation

cpufreq-SCPI: Delete unnecessary assignment for the field "owner"

PATCH Superseded SF Markus Elfring 5 participants 6 messages Aug 16, 2016 – Aug 17, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq-SCPI: Delete unnecessary assignment for the field "owner"

From: Markus Elfring <[email protected]>
Date: Tue, 16 Aug 2016 22:30:17 +0200

The field "owner" is set by the core.
Thus delete an unneeded initialisation.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

---
 drivers/cpufreq/scpi-cpufreq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/cpufreq/scpi-cpufreq.c +1 -2
index e8a7bf5..4a70d241 100644
@@ -104,8 +104,7 @@ static int scpi_cpufreq_remove(struct platform_device *pdev)
 
 static struct platform_driver scpi_cpufreq_platdrv = {
 	.driver = {
-		.name	= "scpi-cpufreq",
-		.owner	= THIS_MODULE,
+		.name	= "scpi-cpufreq"
 	},
 	.probe		= scpi_cpufreq_probe,
 	.remove		= scpi_cpufreq_remove,
Signature · 1 line
2.9.3
#1 lore raw
Quoted 17 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Tue, 16 Aug 2016 22:30:17 +0200

The field "owner" is set by the core.
Thus delete an unneeded initialisation.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

---
 drivers/cpufreq/scpi-cpufreq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/cpufreq/scpi-cpufreq.c +0 -0
index e8a7bf5..4a70d241 100644

drivers/cpufreq/scpi-cpufreq.c static int scpi_cpufreq_remove(struct platform_device *pdev) · line 107

Quoted 6 lines
drivers/cpufreq/scpi-cpufreq.c +1 -2
@@ -104,8 +104,7 @@ static int scpi_cpufreq_remove(struct platform_device *pdev)
 
 static struct platform_driver scpi_cpufreq_platdrv = {
 	.driver = {
-		.name	= "scpi-cpufreq",
-		.owner	= THIS_MODULE,
+		.name	= "scpi-cpufreq"

You don't need to remove the comma. There was a trailing comma originally, so you may as well leave that.

julia

Quoted 11 lines
drivers/cpufreq/scpi-cpufreq.c +0 -1
 	},
 	.probe		= scpi_cpufreq_probe,
 	.remove		= scpi_cpufreq_remove,
--

2.9.3

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
In reply to SF Markus Elfring
Quoted 17 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Tue, 16 Aug 2016 22:30:17 +0200

The field "owner" is set by the core.
Thus delete an unneeded initialisation.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

---
 drivers/cpufreq/scpi-cpufreq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/cpufreq/scpi-cpufreq.c +0 -0
index e8a7bf5..4a70d241 100644

drivers/cpufreq/scpi-cpufreq.c static int scpi_cpufreq_remove(struct platform_device *pdev) · line 107

Quoted 6 lines
drivers/cpufreq/scpi-cpufreq.c +1 -2
@@ -104,8 +104,7 @@ static int scpi_cpufreq_remove(struct platform_device *pdev)
 
 static struct platform_driver scpi_cpufreq_platdrv = {
 	.driver = {
-		.name	= "scpi-cpufreq",
-		.owner	= THIS_MODULE,
+		.name	= "scpi-cpufreq"

Comma, please.

drivers/cpufreq/scpi-cpufreq.c static int scpi_cpufreq_remove(struct platform_device *pdev) · line 110

Quoted 4 lines
drivers/cpufreq/scpi-cpufreq.c +0 -0
 	},
 	.probe		= scpi_cpufreq_probe,
 	.remove		= scpi_cpufreq_remove,

Thanks.
Rafael

#2 lore raw

PATCH v2 1/1 cpufreq-SCPI: Delete unnecessary assignment for the field "owner"

In reply to Julia Lawall

From: Markus Elfring <[email protected]>
Date: Tue, 16 Aug 2016 23:00:07 +0200

The field "owner" is set by the core.
Thus delete an unneeded initialisation.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

---

v2: A trailing comma was preserved even for a single designated initializer.

 drivers/cpufreq/scpi-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)
drivers/cpufreq/scpi-cpufreq.c +0 -1
index e8a7bf5..ea7a4e1 100644
@@ -105,7 +105,6 @@ static int scpi_cpufreq_remove(struct platform_device *pdev)
 static struct platform_driver scpi_cpufreq_platdrv = {
 	.driver = {
 		.name	= "scpi-cpufreq",
-		.owner	= THIS_MODULE,
 	},
 	.probe		= scpi_cpufreq_probe,
 	.remove		= scpi_cpufreq_remove,
Signature · 1 line
2.9.3
maintainer Acked-by on v2 1/1
#3 lore raw
Quoted 20 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Tue, 16 Aug 2016 23:00:07 +0200

The field "owner" is set by the core.
Thus delete an unneeded initialisation.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

---

v2: A trailing comma was preserved even for a single designated initializer.

 drivers/cpufreq/scpi-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)
drivers/cpufreq/scpi-cpufreq.c +0 -0
index e8a7bf5..ea7a4e1 100644

drivers/cpufreq/scpi-cpufreq.c static int scpi_cpufreq_remove(struct platform_device *pdev) · line 110

Quoted 7 lines
drivers/cpufreq/scpi-cpufreq.c +0 -1
@@ -105,7 +105,6 @@ static int scpi_cpufreq_remove(struct platform_device *pdev)
 static struct platform_driver scpi_cpufreq_platdrv = {
 	.driver = {
 		.name	= "scpi-cpufreq",
-		.owner	= THIS_MODULE,
 	},
 	.probe		= scpi_cpufreq_probe,
 	.remove		= scpi_cpufreq_remove,
Signature · 1 line
viresh