Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: ssfdc: Fix space before ( coding style
@ 2014-12-19 14:30 Mohammad Jamal
  2014-12-19 15:20 ` Jeremiah Mahler
  0 siblings, 1 reply; 2+ messages in thread
From: Mohammad Jamal @ 2014-12-19 14:30 UTC (permalink / raw)
  To: dwmw2; +Cc: computersforpeace, linux-mtd, linux-kernel, Mohammad Jamal

Patch solves the space before ( coding style issue of ssfdc.c

Signed-off-by: Mohammad Jamal <md.jamalmohiuddin@gmail.com>
---
 drivers/mtd/ssfdc.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c
index daf82ba..d4a922c 100644
--- a/drivers/mtd/ssfdc.c
+++ b/drivers/mtd/ssfdc.c
@@ -42,8 +42,8 @@ struct ssfdcr_record {
 #define MAX_LOGIC_BLK_PER_ZONE	1000
 #define MAX_PHYS_BLK_PER_ZONE	1024
 
-#define KiB(x)	( (x) * 1024L )
-#define MiB(x)	( KiB(x) * 1024L )
+#define KiB(x)	((x) * 1024L)
+#define MiB(x)	(KiB(x) * 1024L)
 
 /** CHS Table
 		1MiB	2MiB	4MiB	8MiB	16MiB	32MiB	64MiB	128MiB
@@ -63,13 +63,13 @@ typedef struct {
 
 /* Must be ordered by size */
 static const chs_entry_t chs_table[] = {
-	{ MiB(  1), 125,  4,  4 },
-	{ MiB(  2), 125,  4,  8 },
-	{ MiB(  4), 250,  4,  8 },
-	{ MiB(  8), 250,  4, 16 },
-	{ MiB( 16), 500,  4, 16 },
-	{ MiB( 32), 500,  8, 16 },
-	{ MiB( 64), 500,  8, 32 },
+	{ MiB(1), 125,  4,  4 },
+	{ MiB(2), 125,  4,  8 },
+	{ MiB(4), 250,  4,  8 },
+	{ MiB(8), 250,  4, 16 },
+	{ MiB(16), 500,  4, 16 },
+	{ MiB(32), 500,  8, 16 },
+	{ MiB(64), 500,  8, 32 },
 	{ MiB(128), 500, 16, 32 },
 	{ 0 },
 };
-- 
1.7.9.5

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

* Re: [PATCH] mtd: ssfdc: Fix space before ( coding style
  2014-12-19 14:30 [PATCH] mtd: ssfdc: Fix space before ( coding style Mohammad Jamal
@ 2014-12-19 15:20 ` Jeremiah Mahler
  0 siblings, 0 replies; 2+ messages in thread
From: Jeremiah Mahler @ 2014-12-19 15:20 UTC (permalink / raw)
  To: Mohammad Jamal; +Cc: linux-mtd, computersforpeace, dwmw2, linux-kernel

Mohammad,

On Fri, Dec 19, 2014 at 08:00:13PM +0530, Mohammad Jamal wrote:
> Patch solves the space before ( coding style issue of ssfdc.c
> 
> Signed-off-by: Mohammad Jamal <md.jamalmohiuddin@gmail.com>
> ---
>  drivers/mtd/ssfdc.c |   18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c
> index daf82ba..d4a922c 100644
> --- a/drivers/mtd/ssfdc.c
> +++ b/drivers/mtd/ssfdc.c
> @@ -42,8 +42,8 @@ struct ssfdcr_record {
>  #define MAX_LOGIC_BLK_PER_ZONE	1000
>  #define MAX_PHYS_BLK_PER_ZONE	1024
>  
> -#define KiB(x)	( (x) * 1024L )
> -#define MiB(x)	( KiB(x) * 1024L )
> +#define KiB(x)	((x) * 1024L)
> +#define MiB(x)	(KiB(x) * 1024L)
This looks better than before.

>  
>  /** CHS Table
>  		1MiB	2MiB	4MiB	8MiB	16MiB	32MiB	64MiB	128MiB
> @@ -63,13 +63,13 @@ typedef struct {
>  
>  /* Must be ordered by size */
>  static const chs_entry_t chs_table[] = {
> -	{ MiB(  1), 125,  4,  4 },
> -	{ MiB(  2), 125,  4,  8 },
> -	{ MiB(  4), 250,  4,  8 },
> -	{ MiB(  8), 250,  4, 16 },
> -	{ MiB( 16), 500,  4, 16 },
> -	{ MiB( 32), 500,  8, 16 },
> -	{ MiB( 64), 500,  8, 32 },
> +	{ MiB(1), 125,  4,  4 },
> +	{ MiB(2), 125,  4,  8 },
> +	{ MiB(4), 250,  4,  8 },
> +	{ MiB(8), 250,  4, 16 },
> +	{ MiB(16), 500,  4, 16 },
> +	{ MiB(32), 500,  8, 16 },
> +	{ MiB(64), 500,  8, 32 },
>  	{ MiB(128), 500, 16, 32 },
>  	{ 0 },
>  };
I like the original version better here.  The columns were lined up
nicely and it was easier to read.

-- 
- Jeremiah Mahler

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

end of thread, other threads:[~2014-12-19 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-19 14:30 [PATCH] mtd: ssfdc: Fix space before ( coding style Mohammad Jamal
2014-12-19 15:20 ` Jeremiah Mahler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox