linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] mtd: s3c2410: Use module_platform_driver()
@ 2012-07-16 10:32 Sachin Kamat
  2012-07-16 10:32 ` [PATCH 2/6] mtd: s3c2410: Use pr_* instead of printk Sachin Kamat
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Sachin Kamat @ 2012-07-16 10:32 UTC (permalink / raw)
  To: linux-mtd; +Cc: sachin.kamat, dwmw2, David.Woodhouse, ben-linux, patches

This makes the code simpler by eliminating module_init() and
module_exit().

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/mtd/nand/s3c2410.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)

diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 91121f3..8f9267f 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -1134,20 +1134,7 @@ static struct platform_driver s3c24xx_nand_driver = {
 	},
 };
 
-static int __init s3c2410_nand_init(void)
-{
-	printk("S3C24XX NAND Driver, (c) 2004 Simtec Electronics\n");
-
-	return platform_driver_register(&s3c24xx_nand_driver);
-}
-
-static void __exit s3c2410_nand_exit(void)
-{
-	platform_driver_unregister(&s3c24xx_nand_driver);
-}
-
-module_init(s3c2410_nand_init);
-module_exit(s3c2410_nand_exit);
+module_platform_driver(s3c24xx_nand_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
-- 
1.7.4.1

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

* [PATCH 2/6] mtd: s3c2410: Use pr_* instead of printk
  2012-07-16 10:32 [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
@ 2012-07-16 10:32 ` Sachin Kamat
  2012-08-19 11:07   ` Artem Bityutskiy
  2012-07-16 10:32 ` [PATCH 3/6] mtd: s3c2410: Use <linux/io.h> instead of <asm/io.h> Sachin Kamat
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Sachin Kamat @ 2012-07-16 10:32 UTC (permalink / raw)
  To: linux-mtd; +Cc: sachin.kamat, dwmw2, David.Woodhouse, ben-linux, patches

Use pr_* instead of printk.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/mtd/nand/s3c2410.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 8f9267f..2383940 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -21,6 +21,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#define pr_fmt(fmt) "nand-s3c2410: " fmt
+
 #ifdef CONFIG_MTD_NAND_S3C2410_DEBUG
 #define DEBUG
 #endif
@@ -215,7 +217,8 @@ static int s3c_nand_calc_rate(int wanted, unsigned long clk, int max)
 	pr_debug("result %d from %ld, %d\n", result, clk, wanted);
 
 	if (result > max) {
-		printk("%d ns is too big for current clock rate %ld\n", wanted, clk);
+		pr_err("%d ns is too big for current clock rate %ld\n",
+								wanted, clk);
 		return -1;
 	}
 
-- 
1.7.4.1

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

* [PATCH 3/6] mtd: s3c2410: Use <linux/io.h> instead of <asm/io.h>
  2012-07-16 10:32 [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
  2012-07-16 10:32 ` [PATCH 2/6] mtd: s3c2410: Use pr_* instead of printk Sachin Kamat
@ 2012-07-16 10:32 ` Sachin Kamat
  2012-07-16 10:32 ` [PATCH 4/6] mtd: s3c2410: Do not initialise statics to 0 or NULL Sachin Kamat
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Sachin Kamat @ 2012-07-16 10:32 UTC (permalink / raw)
  To: linux-mtd; +Cc: sachin.kamat, dwmw2, David.Woodhouse, ben-linux, patches

Fixes the following checkpatch warning:
WARNING: Use #include <linux/io.h> instead of <asm/io.h>

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/mtd/nand/s3c2410.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 2383940..5907d1c 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -32,6 +32,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/io.h>
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
@@ -45,8 +46,6 @@
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/io.h>
-
 #include <plat/regs-nand.h>
 #include <plat/nand.h>
 
-- 
1.7.4.1

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

* [PATCH 4/6] mtd: s3c2410: Do not initialise statics to 0 or NULL
  2012-07-16 10:32 [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
  2012-07-16 10:32 ` [PATCH 2/6] mtd: s3c2410: Use pr_* instead of printk Sachin Kamat
  2012-07-16 10:32 ` [PATCH 3/6] mtd: s3c2410: Use <linux/io.h> instead of <asm/io.h> Sachin Kamat
@ 2012-07-16 10:32 ` Sachin Kamat
  2012-07-16 10:32 ` [PATCH 5/6] mtd: s3c2410: Fix checkpatch warnings and errors related to whitespaces Sachin Kamat
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Sachin Kamat @ 2012-07-16 10:32 UTC (permalink / raw)
  To: linux-mtd; +Cc: sachin.kamat, dwmw2, David.Woodhouse, ben-linux, patches

Fixes the following checkpatch errors:
ERROR: do not initialise statics to 0 or NULL
+static int hardware_ecc = 0;

ERROR: do not initialise statics to 0 or NULL
+static const int clock_stop = 0;

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/mtd/nand/s3c2410.c |   64 ++++++++++++++++++-------------------------
 1 files changed, 27 insertions(+), 37 deletions(-)

diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 5907d1c..9c7e4bf 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -49,19 +49,6 @@
 #include <plat/regs-nand.h>
 #include <plat/nand.h>
 
-#ifdef CONFIG_MTD_NAND_S3C2410_HWECC
-static int hardware_ecc = 1;
-#else
-static int hardware_ecc = 0;
-#endif
-
-#ifdef CONFIG_MTD_NAND_S3C2410_CLKSTOP
-static const int clock_stop = 1;
-#else
-static const int clock_stop = 0;
-#endif
-
-
 /* new oob placement block for use with hardware ecc generation
  */
 
@@ -170,7 +157,11 @@ static struct s3c2410_platform_nand *to_nand_plat(struct platform_device *dev)
 
 static inline int allow_clk_suspend(struct s3c2410_nand_info *info)
 {
-	return clock_stop;
+#ifdef CONFIG_MTD_NAND_S3C2410_CLKSTOP
+	return 1;
+#else
+	return 0;
+#endif
 }
 
 /**
@@ -821,32 +812,31 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
 	nmtd->mtd.owner    = THIS_MODULE;
 	nmtd->set	   = set;
 
-	if (hardware_ecc) {
+#ifdef CONFIG_MTD_NAND_S3C2410_HWECC
+	chip->ecc.calculate = s3c2410_nand_calculate_ecc;
+	chip->ecc.correct   = s3c2410_nand_correct_data;
+	chip->ecc.mode	    = NAND_ECC_HW;
+	chip->ecc.strength  = 1;
+
+	switch (info->cpu_type) {
+	case TYPE_S3C2410:
+		chip->ecc.hwctl	    = s3c2410_nand_enable_hwecc;
 		chip->ecc.calculate = s3c2410_nand_calculate_ecc;
-		chip->ecc.correct   = s3c2410_nand_correct_data;
-		chip->ecc.mode	    = NAND_ECC_HW;
-		chip->ecc.strength  = 1;
-
-		switch (info->cpu_type) {
-		case TYPE_S3C2410:
-			chip->ecc.hwctl	    = s3c2410_nand_enable_hwecc;
-			chip->ecc.calculate = s3c2410_nand_calculate_ecc;
-			break;
-
-		case TYPE_S3C2412:
-  			chip->ecc.hwctl     = s3c2412_nand_enable_hwecc;
-  			chip->ecc.calculate = s3c2412_nand_calculate_ecc;
-			break;
-
-		case TYPE_S3C2440:
-  			chip->ecc.hwctl     = s3c2440_nand_enable_hwecc;
-  			chip->ecc.calculate = s3c2440_nand_calculate_ecc;
-			break;
+		break;
 
-		}
-	} else {
-		chip->ecc.mode	    = NAND_ECC_SOFT;
+	case TYPE_S3C2412:
+		chip->ecc.hwctl     = s3c2412_nand_enable_hwecc;
+		chip->ecc.calculate = s3c2412_nand_calculate_ecc;
+		break;
+
+	case TYPE_S3C2440:
+		chip->ecc.hwctl     = s3c2440_nand_enable_hwecc;
+		chip->ecc.calculate = s3c2440_nand_calculate_ecc;
+		break;
 	}
+#else
+	chip->ecc.mode	    = NAND_ECC_SOFT;
+#endif
 
 	if (set->ecc_layout != NULL)
 		chip->ecc.layout = set->ecc_layout;
-- 
1.7.4.1

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

* [PATCH 5/6] mtd: s3c2410: Fix checkpatch warnings and errors related to whitespaces
  2012-07-16 10:32 [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
                   ` (2 preceding siblings ...)
  2012-07-16 10:32 ` [PATCH 4/6] mtd: s3c2410: Do not initialise statics to 0 or NULL Sachin Kamat
@ 2012-07-16 10:32 ` Sachin Kamat
  2012-08-19 11:08   ` Artem Bityutskiy
  2012-07-16 10:32 ` [PATCH 6/6] mtd: s3c2410: Fix line over 80 characters warning Sachin Kamat
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Sachin Kamat @ 2012-07-16 10:32 UTC (permalink / raw)
  To: linux-mtd; +Cc: sachin.kamat, dwmw2, David.Woodhouse, ben-linux, patches

Fixes checkpatch warnings and errors related to whitespaces.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/mtd/nand/s3c2410.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 9c7e4bf..3e891e8 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -55,7 +55,7 @@
 static struct nand_ecclayout nand_hw_eccoob = {
 	.eccbytes = 3,
 	.eccpos = {0, 1, 2},
-	.oobfree = {{8, 8}}
+	.oobfree = {{8, 8} }
 };
 
 /* controller and mtd information */
@@ -218,7 +218,7 @@ static int s3c_nand_calc_rate(int wanted, unsigned long clk, int max)
 	return result;
 }
 
-#define to_ns(ticks,clk) (((ticks) * NS_IN_KHZ) / (unsigned int)(clk))
+#define to_ns(ticks, clk) (((ticks) * NS_IN_KHZ) / (unsigned int)(clk))
 
 /* controller setup */
 
@@ -261,7 +261,8 @@ static int s3c2410_nand_setrate(struct s3c2410_nand_info *info)
 	}
 
 	dev_info(info->device, "Tacls=%d, %dns Twrph0=%d %dns, Twrph1=%d %dns\n",
-	       tacls, to_ns(tacls, clkrate), twrph0, to_ns(twrph0, clkrate), twrph1, to_ns(twrph1, clkrate));
+		tacls, to_ns(tacls, clkrate), twrph0, to_ns(twrph0, clkrate),
+						twrph1, to_ns(twrph1, clkrate));
 
 	switch (info->cpu_type) {
 	case TYPE_S3C2410:
@@ -318,13 +319,13 @@ static int s3c2410_nand_inithw(struct s3c2410_nand_info *info)
 	if (ret < 0)
 		return ret;
 
- 	switch (info->cpu_type) {
- 	case TYPE_S3C2410:
+	switch (info->cpu_type) {
+	case TYPE_S3C2410:
 	default:
 		break;
 
- 	case TYPE_S3C2440:
- 	case TYPE_S3C2412:
+	case TYPE_S3C2440:
+	case TYPE_S3C2412:
 		/* enable the controller and de-assert nFCE */
 
 		writel(S3C2440_NFCONT_ENABLE, info->regs + S3C2440_NFCONT);
@@ -803,7 +804,7 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
 			dev_info(info->device, "System booted from NAND\n");
 
 		break;
-  	}
+	}
 
 	chip->IO_ADDR_R = chip->IO_ADDR_W;
 
@@ -913,7 +914,7 @@ static void s3c2410_nand_update_chip(struct s3c2410_nand_info *info,
 static int s3c24xx_nand_probe(struct platform_device *pdev)
 {
 	struct s3c2410_platform_nand *plat = to_nand_plat(pdev);
-	enum s3c_cpu_type cpu_type; 
+	enum s3c_cpu_type cpu_type;
 	struct s3c2410_nand_info *info;
 	struct s3c2410_nand_mtd *nmtd;
 	struct s3c2410_nand_set *sets;
-- 
1.7.4.1

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

* [PATCH 6/6] mtd: s3c2410: Fix line over 80 characters warning
  2012-07-16 10:32 [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
                   ` (3 preceding siblings ...)
  2012-07-16 10:32 ` [PATCH 5/6] mtd: s3c2410: Fix checkpatch warnings and errors related to whitespaces Sachin Kamat
@ 2012-07-16 10:32 ` Sachin Kamat
  2012-08-19 11:11   ` Artem Bityutskiy
  2012-08-03  4:47 ` [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
  2012-08-17 12:46 ` Artem Bityutskiy
  6 siblings, 1 reply; 15+ messages in thread
From: Sachin Kamat @ 2012-07-16 10:32 UTC (permalink / raw)
  To: linux-mtd; +Cc: sachin.kamat, dwmw2, David.Woodhouse, ben-linux, patches

Fixes the following checkpatch warnings:
WARNING: line over 80 characters

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/mtd/nand/s3c2410.c |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 3e891e8..6ee85c8 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -540,7 +540,8 @@ static void s3c2412_nand_enable_hwecc(struct mtd_info *mtd, int mode)
 	unsigned long ctrl;
 
 	ctrl = readl(info->regs + S3C2440_NFCONT);
-	writel(ctrl | S3C2412_NFCONT_INIT_MAIN_ECC, info->regs + S3C2440_NFCONT);
+	writel(ctrl | S3C2412_NFCONT_INIT_MAIN_ECC,
+					info->regs + S3C2440_NFCONT);
 }
 
 static void s3c2440_nand_enable_hwecc(struct mtd_info *mtd, int mode)
@@ -552,7 +553,8 @@ static void s3c2440_nand_enable_hwecc(struct mtd_info *mtd, int mode)
 	writel(ctrl | S3C2440_NFCONT_INITECC, info->regs + S3C2440_NFCONT);
 }
 
-static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code)
+static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
+					u_char *ecc_code)
 {
 	struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd);
 
@@ -566,7 +568,8 @@ static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u
 	return 0;
 }
 
-static int s3c2412_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code)
+static int s3c2412_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
+					u_char *ecc_code)
 {
 	struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd);
 	unsigned long ecc = readl(info->regs + S3C2412_NFMECC0);
@@ -575,12 +578,14 @@ static int s3c2412_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u
 	ecc_code[1] = ecc >> 8;
 	ecc_code[2] = ecc >> 16;
 
-	pr_debug("calculate_ecc: returning ecc %02x,%02x,%02x\n", ecc_code[0], ecc_code[1], ecc_code[2]);
+	pr_debug("calculate_ecc: returning ecc %02x,%02x,%02x\n",
+				ecc_code[0], ecc_code[1], ecc_code[2]);
 
 	return 0;
 }
 
-static int s3c2440_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code)
+static int s3c2440_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
+					u_char *ecc_code)
 {
 	struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd);
 	unsigned long ecc = readl(info->regs + S3C2440_NFMECC0);
@@ -619,13 +624,15 @@ static void s3c2440_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
 	}
 }
 
-static void s3c2410_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
+static void s3c2410_nand_write_buf(struct mtd_info *mtd, const u_char *buf,
+					int len)
 {
 	struct nand_chip *this = mtd->priv;
 	writesb(this->IO_ADDR_W, buf, len);
 }
 
-static void s3c2440_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
+static void s3c2440_nand_write_buf(struct mtd_info *mtd, const u_char *buf,
+					int len)
 {
 	struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd);
 
@@ -669,7 +676,8 @@ static inline int s3c2410_nand_cpufreq_register(struct s3c2410_nand_info *info)
 					 CPUFREQ_TRANSITION_NOTIFIER);
 }
 
-static inline void s3c2410_nand_cpufreq_deregister(struct s3c2410_nand_info *info)
+static inline void s3c2410_nand_cpufreq_deregister(
+						struct s3c2410_nand_info *info)
 {
 	cpufreq_unregister_notifier(&info->freq_transition,
 				    CPUFREQ_TRANSITION_NOTIFIER);
@@ -681,7 +689,8 @@ static inline int s3c2410_nand_cpufreq_register(struct s3c2410_nand_info *info)
 	return 0;
 }
 
-static inline void s3c2410_nand_cpufreq_deregister(struct s3c2410_nand_info *info)
+static inline void s3c2410_nand_cpufreq_deregister(
+						struct s3c2410_nand_info *info)
 {
 }
 #endif
@@ -1004,7 +1013,8 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)
 	nmtd = info->mtds;
 
 	for (setno = 0; setno < nr_sets; setno++, nmtd++) {
-		pr_debug("initialising set %d (%p, info %p)\n", setno, nmtd, info);
+		pr_debug("initialising set %d (%p, info %p)\n",
+						setno, nmtd, info);
 
 		s3c2410_nand_init_chip(info, nmtd, sets);
 
-- 
1.7.4.1

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

* Re: [PATCH 1/6] mtd: s3c2410: Use module_platform_driver()
  2012-07-16 10:32 [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
                   ` (4 preceding siblings ...)
  2012-07-16 10:32 ` [PATCH 6/6] mtd: s3c2410: Fix line over 80 characters warning Sachin Kamat
@ 2012-08-03  4:47 ` Sachin Kamat
  2012-08-08  9:30   ` Sachin Kamat
  2012-08-17 12:46 ` Artem Bityutskiy
  6 siblings, 1 reply; 15+ messages in thread
From: Sachin Kamat @ 2012-08-03  4:47 UTC (permalink / raw)
  To: linux-mtd; +Cc: sachin.kamat, dwmw2, David.Woodhouse, ben-linux, patches

Hi,

Any comments on this series?

On 16 July 2012 16:02, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> This makes the code simpler by eliminating module_init() and
> module_exit().
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/mtd/nand/s3c2410.c |   15 +--------------
>  1 files changed, 1 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
> index 91121f3..8f9267f 100644
> --- a/drivers/mtd/nand/s3c2410.c
> +++ b/drivers/mtd/nand/s3c2410.c
> @@ -1134,20 +1134,7 @@ static struct platform_driver s3c24xx_nand_driver = {
>         },
>  };
>
> -static int __init s3c2410_nand_init(void)
> -{
> -       printk("S3C24XX NAND Driver, (c) 2004 Simtec Electronics\n");
> -
> -       return platform_driver_register(&s3c24xx_nand_driver);
> -}
> -
> -static void __exit s3c2410_nand_exit(void)
> -{
> -       platform_driver_unregister(&s3c24xx_nand_driver);
> -}
> -
> -module_init(s3c2410_nand_init);
> -module_exit(s3c2410_nand_exit);
> +module_platform_driver(s3c24xx_nand_driver);
>
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
> --
> 1.7.4.1
>



-- 
With warm regards,
Sachin

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

* Re: [PATCH 1/6] mtd: s3c2410: Use module_platform_driver()
  2012-08-03  4:47 ` [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
@ 2012-08-08  9:30   ` Sachin Kamat
  2012-08-16  5:23     ` Sachin Kamat
  0 siblings, 1 reply; 15+ messages in thread
From: Sachin Kamat @ 2012-08-08  9:30 UTC (permalink / raw)
  To: linux-mtd; +Cc: sachin.kamat, dwmw2, David.Woodhouse, ben-linux, patches

ping...

On 3 August 2012 10:17, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> Hi,
>
> Any comments on this series?
>
> On 16 July 2012 16:02, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>> This makes the code simpler by eliminating module_init() and
>> module_exit().
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>>  drivers/mtd/nand/s3c2410.c |   15 +--------------
>>  1 files changed, 1 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
>> index 91121f3..8f9267f 100644
>> --- a/drivers/mtd/nand/s3c2410.c
>> +++ b/drivers/mtd/nand/s3c2410.c
>> @@ -1134,20 +1134,7 @@ static struct platform_driver s3c24xx_nand_driver = {
>>         },
>>  };
>>
>> -static int __init s3c2410_nand_init(void)
>> -{
>> -       printk("S3C24XX NAND Driver, (c) 2004 Simtec Electronics\n");
>> -
>> -       return platform_driver_register(&s3c24xx_nand_driver);
>> -}
>> -
>> -static void __exit s3c2410_nand_exit(void)
>> -{
>> -       platform_driver_unregister(&s3c24xx_nand_driver);
>> -}
>> -
>> -module_init(s3c2410_nand_init);
>> -module_exit(s3c2410_nand_exit);
>> +module_platform_driver(s3c24xx_nand_driver);
>>
>>  MODULE_LICENSE("GPL");
>>  MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
>> --
>> 1.7.4.1
>>
>
>
>
> --
> With warm regards,
> Sachin



-- 
With warm regards,
Sachin

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

* Re: [PATCH 1/6] mtd: s3c2410: Use module_platform_driver()
  2012-08-08  9:30   ` Sachin Kamat
@ 2012-08-16  5:23     ` Sachin Kamat
  0 siblings, 0 replies; 15+ messages in thread
From: Sachin Kamat @ 2012-08-16  5:23 UTC (permalink / raw)
  To: linux-mtd
  Cc: David.Woodhouse, patches, sachin.kamat, Greg Kroah-Hartman,
	ben-linux, dwmw2

ping ...

On 8 August 2012 15:00, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> ping...
>
> On 3 August 2012 10:17, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>> Hi,
>>
>> Any comments on this series?
>>
>> On 16 July 2012 16:02, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>>> This makes the code simpler by eliminating module_init() and
>>> module_exit().
>>>
>>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>> ---
>>>  drivers/mtd/nand/s3c2410.c |   15 +--------------
>>>  1 files changed, 1 insertions(+), 14 deletions(-)
>>>
>>> diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
>>> index 91121f3..8f9267f 100644
>>> --- a/drivers/mtd/nand/s3c2410.c
>>> +++ b/drivers/mtd/nand/s3c2410.c
>>> @@ -1134,20 +1134,7 @@ static struct platform_driver s3c24xx_nand_driver = {
>>>         },
>>>  };
>>>
>>> -static int __init s3c2410_nand_init(void)
>>> -{
>>> -       printk("S3C24XX NAND Driver, (c) 2004 Simtec Electronics\n");
>>> -
>>> -       return platform_driver_register(&s3c24xx_nand_driver);
>>> -}
>>> -
>>> -static void __exit s3c2410_nand_exit(void)
>>> -{
>>> -       platform_driver_unregister(&s3c24xx_nand_driver);
>>> -}
>>> -
>>> -module_init(s3c2410_nand_init);
>>> -module_exit(s3c2410_nand_exit);
>>> +module_platform_driver(s3c24xx_nand_driver);
>>>
>>>  MODULE_LICENSE("GPL");
>>>  MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
>>> --
>>> 1.7.4.1
>>>
>>
>>
>>
>> --
>> With warm regards,
>> Sachin
>
>
>
> --
> With warm regards,
> Sachin



-- 
With warm regards,
Sachin

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

* Re: [PATCH 1/6] mtd: s3c2410: Use module_platform_driver()
  2012-07-16 10:32 [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
                   ` (5 preceding siblings ...)
  2012-08-03  4:47 ` [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
@ 2012-08-17 12:46 ` Artem Bityutskiy
  2012-08-18  6:21   ` Sachin Kamat
  6 siblings, 1 reply; 15+ messages in thread
From: Artem Bityutskiy @ 2012-08-17 12:46 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: dwmw2, linux-mtd, David.Woodhouse, ben-linux, patches

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

On Mon, 2012-07-16 at 16:02 +0530, Sachin Kamat wrote:
> This makes the code simpler by eliminating module_init() and
> module_exit().
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Could you please send me a defconfig which I can use to compile-test
this?

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 1/6] mtd: s3c2410: Use module_platform_driver()
  2012-08-17 12:46 ` Artem Bityutskiy
@ 2012-08-18  6:21   ` Sachin Kamat
  0 siblings, 0 replies; 15+ messages in thread
From: Sachin Kamat @ 2012-08-18  6:21 UTC (permalink / raw)
  To: dedekind1; +Cc: dwmw2, linux-mtd, David.Woodhouse, ben-linux, patches

Hi Artem,

Thank you for your interest in testing these patches.

On 17 August 2012 18:16, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Mon, 2012-07-16 at 16:02 +0530, Sachin Kamat wrote:
>> This makes the code simpler by eliminating module_init() and
>> module_exit().
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>
> Could you please send me a defconfig which I can use to compile-test
> this?

This patch along with other 5 patches in this series can be tested
using the s3c6400_defconfig (it is available in the mainline).
Please let me know how it works for you.

>
> --
> Best Regards,
> Artem Bityutskiy



-- 
With warm regards,
Sachin

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

* Re: [PATCH 2/6] mtd: s3c2410: Use pr_* instead of printk
  2012-07-16 10:32 ` [PATCH 2/6] mtd: s3c2410: Use pr_* instead of printk Sachin Kamat
@ 2012-08-19 11:07   ` Artem Bityutskiy
  0 siblings, 0 replies; 15+ messages in thread
From: Artem Bityutskiy @ 2012-08-19 11:07 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: dwmw2, linux-mtd, David.Woodhouse, ben-linux, patches

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

On Mon, 2012-07-16 at 16:02 +0530, Sachin Kamat wrote:
>  #ifdef CONFIG_MTD_NAND_S3C2410_DEBUG
>  #define DEBUG
>  #endif
> @@ -215,7 +217,8 @@ static int s3c_nand_calc_rate(int wanted, unsigned long clk, int max)
>  	pr_debug("result %d from %ld, %d\n", result, clk, wanted);
>  
>  	if (result > max) {
> -		printk("%d ns is too big for current clock rate %ld\n", wanted, clk);
> +		pr_err("%d ns is too big for current clock rate %ld\n",
> +								wanted, clk);

I've removed tabs to make "wanted" more aligned with where the format
string starts, and pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 5/6] mtd: s3c2410: Fix checkpatch warnings and errors related to whitespaces
  2012-07-16 10:32 ` [PATCH 5/6] mtd: s3c2410: Fix checkpatch warnings and errors related to whitespaces Sachin Kamat
@ 2012-08-19 11:08   ` Artem Bityutskiy
  0 siblings, 0 replies; 15+ messages in thread
From: Artem Bityutskiy @ 2012-08-19 11:08 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: dwmw2, linux-mtd, David.Woodhouse, ben-linux, patches

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

On Mon, 2012-07-16 at 16:02 +0530, Sachin Kamat wrote:
> @@ -55,7 +55,7 @@
>  static struct nand_ecclayout nand_hw_eccoob = {
>         .eccbytes = 3,
>         .eccpos = {0, 1, 2},
> -       .oobfree = {{8, 8}}
> +       .oobfree = {{8, 8} }
>  }; 

I've removed this not very sane chunk and pushed the patch to
l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 6/6] mtd: s3c2410: Fix line over 80 characters warning
  2012-07-16 10:32 ` [PATCH 6/6] mtd: s3c2410: Fix line over 80 characters warning Sachin Kamat
@ 2012-08-19 11:11   ` Artem Bityutskiy
  2012-08-21  4:51     ` Sachin Kamat
  0 siblings, 1 reply; 15+ messages in thread
From: Artem Bityutskiy @ 2012-08-19 11:11 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: dwmw2, linux-mtd, David.Woodhouse, ben-linux, patches

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

On Mon, 2012-07-16 at 16:02 +0530, Sachin Kamat wrote:
> @@ -540,7 +540,8 @@ static void s3c2412_nand_enable_hwecc(struct mtd_info *mtd, int mode)
>  	unsigned long ctrl;
>  
>  	ctrl = readl(info->regs + S3C2440_NFCONT);
> -	writel(ctrl | S3C2412_NFCONT_INIT_MAIN_ECC, info->regs + S3C2440_NFCONT);
> +	writel(ctrl | S3C2412_NFCONT_INIT_MAIN_ECC,
> +					info->regs + S3C2440_NFCONT);

This patch makes the code look uglier and less readable. Please, align
the part which you move to thenext line with the opening bracket ("(").
The current code uses this style as well.

I did not take this patch.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 6/6] mtd: s3c2410: Fix line over 80 characters warning
  2012-08-19 11:11   ` Artem Bityutskiy
@ 2012-08-21  4:51     ` Sachin Kamat
  0 siblings, 0 replies; 15+ messages in thread
From: Sachin Kamat @ 2012-08-21  4:51 UTC (permalink / raw)
  To: dedekind1; +Cc: dwmw2, linux-mtd, David.Woodhouse, ben-linux, patches

Hi Artem,

Thanks for your review.

On 19 August 2012 16:41, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Mon, 2012-07-16 at 16:02 +0530, Sachin Kamat wrote:
>> @@ -540,7 +540,8 @@ static void s3c2412_nand_enable_hwecc(struct mtd_info *mtd, int mode)
>>       unsigned long ctrl;
>>
>>       ctrl = readl(info->regs + S3C2440_NFCONT);
>> -     writel(ctrl | S3C2412_NFCONT_INIT_MAIN_ECC, info->regs + S3C2440_NFCONT);
>> +     writel(ctrl | S3C2412_NFCONT_INIT_MAIN_ECC,
>> +                                     info->regs + S3C2440_NFCONT);
>
> This patch makes the code look uglier and less readable. Please, align
> the part which you move to thenext line with the opening bracket ("(").
> The current code uses this style as well.

Yes, you are right.
I will send the updated patch.

>
> I did not take this patch.
>
> --
> Best Regards,
> Artem Bityutskiy



-- 
With warm regards,
Sachin

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

end of thread, other threads:[~2012-08-21  4:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-16 10:32 [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
2012-07-16 10:32 ` [PATCH 2/6] mtd: s3c2410: Use pr_* instead of printk Sachin Kamat
2012-08-19 11:07   ` Artem Bityutskiy
2012-07-16 10:32 ` [PATCH 3/6] mtd: s3c2410: Use <linux/io.h> instead of <asm/io.h> Sachin Kamat
2012-07-16 10:32 ` [PATCH 4/6] mtd: s3c2410: Do not initialise statics to 0 or NULL Sachin Kamat
2012-07-16 10:32 ` [PATCH 5/6] mtd: s3c2410: Fix checkpatch warnings and errors related to whitespaces Sachin Kamat
2012-08-19 11:08   ` Artem Bityutskiy
2012-07-16 10:32 ` [PATCH 6/6] mtd: s3c2410: Fix line over 80 characters warning Sachin Kamat
2012-08-19 11:11   ` Artem Bityutskiy
2012-08-21  4:51     ` Sachin Kamat
2012-08-03  4:47 ` [PATCH 1/6] mtd: s3c2410: Use module_platform_driver() Sachin Kamat
2012-08-08  9:30   ` Sachin Kamat
2012-08-16  5:23     ` Sachin Kamat
2012-08-17 12:46 ` Artem Bityutskiy
2012-08-18  6:21   ` Sachin Kamat

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).