lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1444604714-2969-2-git-send-email-paul.gortmaker@windriver.com>
Date:	Sun, 11 Oct 2015 19:05:13 -0400
From:	Paul Gortmaker <paul.gortmaker@...driver.com>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	<linux-kernel@...r.kernel.org>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Magnus Damm <damm+renesas@...nsource.se>,
	Jason Cooper <jason@...edaemon.net>,
	Marc Zyngier <marc.zyngier@....com>
Subject: [PATCH 1/2] drivers/irqchip: make irq-renesas-intc-irqpin.c explicitly non-modular

The Kconfig currently controlling compilation of this code is:

drivers/irqchip/Kconfig:config RENESAS_INTC_IRQPIN
drivers/irqchip/Kconfig:        bool

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

While at it, since this is core infrastructural code for the platform,
lets prohibit any unbind actions that would have called the .remove
function, if anyone was unwise enough to try that.

Since module_init was not in use by this code, the init ordering
remains unchanged with this commit.

We don't replace module.h with init.h since the file already has that.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Magnus Damm <damm+renesas@...nsource.se>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Jason Cooper <jason@...edaemon.net>
Cc: Marc Zyngier <marc.zyngier@....com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@...driver.com>
---
 drivers/irqchip/irq-renesas-intc-irqpin.c | 24 +-----------------------
 1 file changed, 1 insertion(+), 23 deletions(-)

diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index c325806561be..2fc5d425c5a0 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -29,7 +29,6 @@
 #include <linux/irqdomain.h>
 #include <linux/err.h>
 #include <linux/slab.h>
-#include <linux/module.h>
 #include <linux/of_device.h>
 #include <linux/platform_data/irq-renesas-intc-irqpin.h>
 #include <linux/pm_runtime.h>
@@ -373,7 +372,6 @@ static const struct of_device_id intc_irqpin_dt_ids[] = {
 	  .data = &intc_irqpin_irlm_r8a777x },
 	{},
 };
-MODULE_DEVICE_TABLE(of, intc_irqpin_dt_ids);
 
 static int intc_irqpin_probe(struct platform_device *pdev)
 {
@@ -589,21 +587,11 @@ err0:
 	return ret;
 }
 
-static int intc_irqpin_remove(struct platform_device *pdev)
-{
-	struct intc_irqpin_priv *p = platform_get_drvdata(pdev);
-
-	irq_domain_remove(p->irq_domain);
-	pm_runtime_put(&pdev->dev);
-	pm_runtime_disable(&pdev->dev);
-	return 0;
-}
-
 static struct platform_driver intc_irqpin_device_driver = {
 	.probe		= intc_irqpin_probe,
-	.remove		= intc_irqpin_remove,
 	.driver		= {
 		.name	= "renesas_intc_irqpin",
+		.suppress_bind_attrs = true,
 		.of_match_table = intc_irqpin_dt_ids,
 	}
 };
@@ -613,13 +601,3 @@ static int __init intc_irqpin_init(void)
 	return platform_driver_register(&intc_irqpin_device_driver);
 }
 postcore_initcall(intc_irqpin_init);
-
-static void __exit intc_irqpin_exit(void)
-{
-	platform_driver_unregister(&intc_irqpin_device_driver);
-}
-module_exit(intc_irqpin_exit);
-
-MODULE_AUTHOR("Magnus Damm");
-MODULE_DESCRIPTION("Renesas INTC External IRQ Pin Driver");
-MODULE_LICENSE("GPL v2");
-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ