All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-16 19:03 ` SF Markus Elfring
  0 siblings, 0 replies; 21+ messages in thread
From: SF Markus Elfring @ 2016-10-16 19:03 UTC (permalink / raw)
  To: linux-arm-kernel, Suzuki K. Poulose, Will Deacon; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 16 Oct 2016 20:48:28 +0200

Some data were printed into a sequence by six separate function calls.
Print the same data by a single function call instead.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/arm64/kernel/cpuinfo.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index b3d5b3e..f22687d 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -148,14 +148,17 @@ static int c_show(struct seq_file *m, void *v)
 				if (elf_hwcap & (1 << j))
 					seq_printf(m, " %s", hwcap_str[j]);
 		}
-		seq_puts(m, "\n");
-
-		seq_printf(m, "CPU implementer\t: 0x%02x\n",
-			   MIDR_IMPLEMENTOR(midr));
-		seq_printf(m, "CPU architecture: 8\n");
-		seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr));
-		seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr));
-		seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
+		seq_printf(m,
+			   "\n"
+			   "CPU implementer\t: 0x%02x\n"
+			   "CPU architecture: 8\n"
+			   "CPU variant\t: 0x%x\n"
+			   "CPU part\t: 0x%03x\n"
+			   "CPU revision\t: %d\n\n",
+			   MIDR_IMPLEMENTOR(midr),
+			   MIDR_VARIANT(midr),
+			   MIDR_PARTNUM(midr),
+			   MIDR_REVISION(midr));
 	}
 
 	return 0;
-- 
2.10.1

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

* [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-16 19:03 ` SF Markus Elfring
  0 siblings, 0 replies; 21+ messages in thread
From: SF Markus Elfring @ 2016-10-16 19:03 UTC (permalink / raw)
  To: linux-arm-kernel

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 16 Oct 2016 20:48:28 +0200

Some data were printed into a sequence by six separate function calls.
Print the same data by a single function call instead.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/arm64/kernel/cpuinfo.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index b3d5b3e..f22687d 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -148,14 +148,17 @@ static int c_show(struct seq_file *m, void *v)
 				if (elf_hwcap & (1 << j))
 					seq_printf(m, " %s", hwcap_str[j]);
 		}
-		seq_puts(m, "\n");
-
-		seq_printf(m, "CPU implementer\t: 0x%02x\n",
-			   MIDR_IMPLEMENTOR(midr));
-		seq_printf(m, "CPU architecture: 8\n");
-		seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr));
-		seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr));
-		seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
+		seq_printf(m,
+			   "\n"
+			   "CPU implementer\t: 0x%02x\n"
+			   "CPU architecture: 8\n"
+			   "CPU variant\t: 0x%x\n"
+			   "CPU part\t: 0x%03x\n"
+			   "CPU revision\t: %d\n\n",
+			   MIDR_IMPLEMENTOR(midr),
+			   MIDR_VARIANT(midr),
+			   MIDR_PARTNUM(midr),
+			   MIDR_REVISION(midr));
 	}
 
 	return 0;
-- 
2.10.1


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

* [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-16 19:03 ` SF Markus Elfring
  0 siblings, 0 replies; 21+ messages in thread
From: SF Markus Elfring @ 2016-10-16 19:03 UTC (permalink / raw)
  To: linux-arm-kernel

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 16 Oct 2016 20:48:28 +0200

Some data were printed into a sequence by six separate function calls.
Print the same data by a single function call instead.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/arm64/kernel/cpuinfo.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index b3d5b3e..f22687d 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -148,14 +148,17 @@ static int c_show(struct seq_file *m, void *v)
 				if (elf_hwcap & (1 << j))
 					seq_printf(m, " %s", hwcap_str[j]);
 		}
-		seq_puts(m, "\n");
-
-		seq_printf(m, "CPU implementer\t: 0x%02x\n",
-			   MIDR_IMPLEMENTOR(midr));
-		seq_printf(m, "CPU architecture: 8\n");
-		seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr));
-		seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr));
-		seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
+		seq_printf(m,
+			   "\n"
+			   "CPU implementer\t: 0x%02x\n"
+			   "CPU architecture: 8\n"
+			   "CPU variant\t: 0x%x\n"
+			   "CPU part\t: 0x%03x\n"
+			   "CPU revision\t: %d\n\n",
+			   MIDR_IMPLEMENTOR(midr),
+			   MIDR_VARIANT(midr),
+			   MIDR_PARTNUM(midr),
+			   MIDR_REVISION(midr));
 	}
 
 	return 0;
-- 
2.10.1

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

* Re: [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
  2016-10-16 19:03 ` SF Markus Elfring
  (?)
@ 2016-10-17  9:37   ` Matthias Brugger
  -1 siblings, 0 replies; 21+ messages in thread
From: Matthias Brugger @ 2016-10-17  9:37 UTC (permalink / raw)
  To: SF Markus Elfring, linux-arm-kernel, Suzuki K. Poulose, Will Deacon
  Cc: kernel-janitors, LKML



On 16/10/16 21:03, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 16 Oct 2016 20:48:28 +0200
>
> Some data were printed into a sequence by six separate function calls.
> Print the same data by a single function call instead.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

>  arch/arm64/kernel/cpuinfo.c | 19 +++++++++++--------
>  1 file changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index b3d5b3e..f22687d 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -148,14 +148,17 @@ static int c_show(struct seq_file *m, void *v)
>  				if (elf_hwcap & (1 << j))
>  					seq_printf(m, " %s", hwcap_str[j]);
>  		}
> -		seq_puts(m, "\n");
> -
> -		seq_printf(m, "CPU implementer\t: 0x%02x\n",
> -			   MIDR_IMPLEMENTOR(midr));
> -		seq_printf(m, "CPU architecture: 8\n");
> -		seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr));
> -		seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr));
> -		seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
> +		seq_printf(m,
> +			   "\n"
> +			   "CPU implementer\t: 0x%02x\n"
> +			   "CPU architecture: 8\n"
> +			   "CPU variant\t: 0x%x\n"
> +			   "CPU part\t: 0x%03x\n"
> +			   "CPU revision\t: %d\n\n",
> +			   MIDR_IMPLEMENTOR(midr),
> +			   MIDR_VARIANT(midr),
> +			   MIDR_PARTNUM(midr),
> +			   MIDR_REVISION(midr));
>  	}
>
>  	return 0;
>

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

* Re: [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_sho
@ 2016-10-17  9:37   ` Matthias Brugger
  0 siblings, 0 replies; 21+ messages in thread
From: Matthias Brugger @ 2016-10-17  9:37 UTC (permalink / raw)
  To: linux-arm-kernel



On 16/10/16 21:03, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 16 Oct 2016 20:48:28 +0200
>
> Some data were printed into a sequence by six separate function calls.
> Print the same data by a single function call instead.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

>  arch/arm64/kernel/cpuinfo.c | 19 +++++++++++--------
>  1 file changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index b3d5b3e..f22687d 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -148,14 +148,17 @@ static int c_show(struct seq_file *m, void *v)
>  				if (elf_hwcap & (1 << j))
>  					seq_printf(m, " %s", hwcap_str[j]);
>  		}
> -		seq_puts(m, "\n");
> -
> -		seq_printf(m, "CPU implementer\t: 0x%02x\n",
> -			   MIDR_IMPLEMENTOR(midr));
> -		seq_printf(m, "CPU architecture: 8\n");
> -		seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr));
> -		seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr));
> -		seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
> +		seq_printf(m,
> +			   "\n"
> +			   "CPU implementer\t: 0x%02x\n"
> +			   "CPU architecture: 8\n"
> +			   "CPU variant\t: 0x%x\n"
> +			   "CPU part\t: 0x%03x\n"
> +			   "CPU revision\t: %d\n\n",
> +			   MIDR_IMPLEMENTOR(midr),
> +			   MIDR_VARIANT(midr),
> +			   MIDR_PARTNUM(midr),
> +			   MIDR_REVISION(midr));
>  	}
>
>  	return 0;
>

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

* [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-17  9:37   ` Matthias Brugger
  0 siblings, 0 replies; 21+ messages in thread
From: Matthias Brugger @ 2016-10-17  9:37 UTC (permalink / raw)
  To: linux-arm-kernel



On 16/10/16 21:03, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 16 Oct 2016 20:48:28 +0200
>
> Some data were printed into a sequence by six separate function calls.
> Print the same data by a single function call instead.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

>  arch/arm64/kernel/cpuinfo.c | 19 +++++++++++--------
>  1 file changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index b3d5b3e..f22687d 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -148,14 +148,17 @@ static int c_show(struct seq_file *m, void *v)
>  				if (elf_hwcap & (1 << j))
>  					seq_printf(m, " %s", hwcap_str[j]);
>  		}
> -		seq_puts(m, "\n");
> -
> -		seq_printf(m, "CPU implementer\t: 0x%02x\n",
> -			   MIDR_IMPLEMENTOR(midr));
> -		seq_printf(m, "CPU architecture: 8\n");
> -		seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr));
> -		seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr));
> -		seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
> +		seq_printf(m,
> +			   "\n"
> +			   "CPU implementer\t: 0x%02x\n"
> +			   "CPU architecture: 8\n"
> +			   "CPU variant\t: 0x%x\n"
> +			   "CPU part\t: 0x%03x\n"
> +			   "CPU revision\t: %d\n\n",
> +			   MIDR_IMPLEMENTOR(midr),
> +			   MIDR_VARIANT(midr),
> +			   MIDR_PARTNUM(midr),
> +			   MIDR_REVISION(midr));
>  	}
>
>  	return 0;
>

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

* Re: [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
  2016-10-16 19:03 ` SF Markus Elfring
  (?)
@ 2016-10-17 10:56   ` Mark Rutland
  -1 siblings, 0 replies; 21+ messages in thread
From: Mark Rutland @ 2016-10-17 10:56 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-arm-kernel, Suzuki K. Poulose, Will Deacon, kernel-janitors, LKML

On Sun, Oct 16, 2016 at 09:03:52PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 16 Oct 2016 20:48:28 +0200
> 
> Some data were printed into a sequence by six separate function calls.
> Print the same data by a single function call instead.

... why?

Beyond simply having fewer function calls, is there an upside?

This makes it harder to see the relationship between the format strings
and their associated data, and makes the code longer.

Thanks,
Mark.

> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  arch/arm64/kernel/cpuinfo.c | 19 +++++++++++--------
>  1 file changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index b3d5b3e..f22687d 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -148,14 +148,17 @@ static int c_show(struct seq_file *m, void *v)
>  				if (elf_hwcap & (1 << j))
>  					seq_printf(m, " %s", hwcap_str[j]);
>  		}
> -		seq_puts(m, "\n");
> -
> -		seq_printf(m, "CPU implementer\t: 0x%02x\n",
> -			   MIDR_IMPLEMENTOR(midr));
> -		seq_printf(m, "CPU architecture: 8\n");
> -		seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr));
> -		seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr));
> -		seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
> +		seq_printf(m,
> +			   "\n"
> +			   "CPU implementer\t: 0x%02x\n"
> +			   "CPU architecture: 8\n"
> +			   "CPU variant\t: 0x%x\n"
> +			   "CPU part\t: 0x%03x\n"
> +			   "CPU revision\t: %d\n\n",
> +			   MIDR_IMPLEMENTOR(midr),
> +			   MIDR_VARIANT(midr),
> +			   MIDR_PARTNUM(midr),
> +			   MIDR_REVISION(midr));
>  	}
>  
>  	return 0;
> -- 
> 2.10.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* Re: [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_sho
@ 2016-10-17 10:56   ` Mark Rutland
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Rutland @ 2016-10-17 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Oct 16, 2016 at 09:03:52PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 16 Oct 2016 20:48:28 +0200
> 
> Some data were printed into a sequence by six separate function calls.
> Print the same data by a single function call instead.

... why?

Beyond simply having fewer function calls, is there an upside?

This makes it harder to see the relationship between the format strings
and their associated data, and makes the code longer.

Thanks,
Mark.

> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  arch/arm64/kernel/cpuinfo.c | 19 +++++++++++--------
>  1 file changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index b3d5b3e..f22687d 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -148,14 +148,17 @@ static int c_show(struct seq_file *m, void *v)
>  				if (elf_hwcap & (1 << j))
>  					seq_printf(m, " %s", hwcap_str[j]);
>  		}
> -		seq_puts(m, "\n");
> -
> -		seq_printf(m, "CPU implementer\t: 0x%02x\n",
> -			   MIDR_IMPLEMENTOR(midr));
> -		seq_printf(m, "CPU architecture: 8\n");
> -		seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr));
> -		seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr));
> -		seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
> +		seq_printf(m,
> +			   "\n"
> +			   "CPU implementer\t: 0x%02x\n"
> +			   "CPU architecture: 8\n"
> +			   "CPU variant\t: 0x%x\n"
> +			   "CPU part\t: 0x%03x\n"
> +			   "CPU revision\t: %d\n\n",
> +			   MIDR_IMPLEMENTOR(midr),
> +			   MIDR_VARIANT(midr),
> +			   MIDR_PARTNUM(midr),
> +			   MIDR_REVISION(midr));
>  	}
>  
>  	return 0;
> -- 
> 2.10.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-17 10:56   ` Mark Rutland
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Rutland @ 2016-10-17 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Oct 16, 2016 at 09:03:52PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 16 Oct 2016 20:48:28 +0200
> 
> Some data were printed into a sequence by six separate function calls.
> Print the same data by a single function call instead.

... why?

Beyond simply having fewer function calls, is there an upside?

This makes it harder to see the relationship between the format strings
and their associated data, and makes the code longer.

Thanks,
Mark.

> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  arch/arm64/kernel/cpuinfo.c | 19 +++++++++++--------
>  1 file changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index b3d5b3e..f22687d 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -148,14 +148,17 @@ static int c_show(struct seq_file *m, void *v)
>  				if (elf_hwcap & (1 << j))
>  					seq_printf(m, " %s", hwcap_str[j]);
>  		}
> -		seq_puts(m, "\n");
> -
> -		seq_printf(m, "CPU implementer\t: 0x%02x\n",
> -			   MIDR_IMPLEMENTOR(midr));
> -		seq_printf(m, "CPU architecture: 8\n");
> -		seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr));
> -		seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr));
> -		seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
> +		seq_printf(m,
> +			   "\n"
> +			   "CPU implementer\t: 0x%02x\n"
> +			   "CPU architecture: 8\n"
> +			   "CPU variant\t: 0x%x\n"
> +			   "CPU part\t: 0x%03x\n"
> +			   "CPU revision\t: %d\n\n",
> +			   MIDR_IMPLEMENTOR(midr),
> +			   MIDR_VARIANT(midr),
> +			   MIDR_PARTNUM(midr),
> +			   MIDR_REVISION(midr));
>  	}
>  
>  	return 0;
> -- 
> 2.10.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* Re: ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
  2016-10-17 10:56   ` [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_sho Mark Rutland
  (?)
@ 2016-10-17 11:30     ` SF Markus Elfring
  -1 siblings, 0 replies; 21+ messages in thread
From: SF Markus Elfring @ 2016-10-17 11:30 UTC (permalink / raw)
  To: Mark Rutland
  Cc: linux-arm-kernel, Suzuki K. Poulose, Will Deacon, kernel-janitors, LKML

>> Some data were printed into a sequence by six separate function calls.
>> Print the same data by a single function call instead.
> 
> ... why?
> 
> Beyond simply having fewer function calls, is there an upside?

Will it matter to improve run time characteristics at this source code place?


> This makes it harder to see the relationship between the format strings
> and their associated data, and makes the code longer.

Do you prefer an other layout for the passed data so that the increase
of line count in my update suggestion would look differently?

Regards,
Markus

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

* Re: ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-17 11:30     ` SF Markus Elfring
  0 siblings, 0 replies; 21+ messages in thread
From: SF Markus Elfring @ 2016-10-17 11:30 UTC (permalink / raw)
  To: linux-arm-kernel

>> Some data were printed into a sequence by six separate function calls.
>> Print the same data by a single function call instead.
> 
> ... why?
> 
> Beyond simply having fewer function calls, is there an upside?

Will it matter to improve run time characteristics at this source code place?


> This makes it harder to see the relationship between the format strings
> and their associated data, and makes the code longer.

Do you prefer an other layout for the passed data so that the increase
of line count in my update suggestion would look differently?

Regards,
Markus

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

* ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-17 11:30     ` SF Markus Elfring
  0 siblings, 0 replies; 21+ messages in thread
From: SF Markus Elfring @ 2016-10-17 11:30 UTC (permalink / raw)
  To: linux-arm-kernel

>> Some data were printed into a sequence by six separate function calls.
>> Print the same data by a single function call instead.
> 
> ... why?
> 
> Beyond simply having fewer function calls, is there an upside?

Will it matter to improve run time characteristics at this source code place?


> This makes it harder to see the relationship between the format strings
> and their associated data, and makes the code longer.

Do you prefer an other layout for the passed data so that the increase
of line count in my update suggestion would look differently?

Regards,
Markus

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

* Re: ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
  2016-10-17 11:30     ` SF Markus Elfring
  (?)
@ 2016-10-17 12:37       ` Mark Rutland
  -1 siblings, 0 replies; 21+ messages in thread
From: Mark Rutland @ 2016-10-17 12:37 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: kernel-janitors, Will Deacon, LKML, linux-arm-kernel, Suzuki K. Poulose

On Mon, Oct 17, 2016 at 01:30:59PM +0200, SF Markus Elfring wrote:
> >> Some data were printed into a sequence by six separate function calls.
> >> Print the same data by a single function call instead.
> > 
> > ... why?
> > 
> > Beyond simply having fewer function calls, is there an upside?
> 
> Will it matter to improve run time characteristics at this source code
> place?

I do not know. If that's not the aim of your existing patch, then I have
no idea what you're trying to achieve.

> > This makes it harder to see the relationship between the format strings
> > and their associated data, and makes the code longer.
> 
> Do you prefer an other layout for the passed data so that the increase
> of line count in my update suggestion would look differently?

I prefer the code as-is. Unless there's a compelling reason to change
it.

Thanks,
Mark.

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

* Re: ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-17 12:37       ` Mark Rutland
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Rutland @ 2016-10-17 12:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 17, 2016 at 01:30:59PM +0200, SF Markus Elfring wrote:
> >> Some data were printed into a sequence by six separate function calls.
> >> Print the same data by a single function call instead.
> > 
> > ... why?
> > 
> > Beyond simply having fewer function calls, is there an upside?
> 
> Will it matter to improve run time characteristics at this source code
> place?

I do not know. If that's not the aim of your existing patch, then I have
no idea what you're trying to achieve.

> > This makes it harder to see the relationship between the format strings
> > and their associated data, and makes the code longer.
> 
> Do you prefer an other layout for the passed data so that the increase
> of line count in my update suggestion would look differently?

I prefer the code as-is. Unless there's a compelling reason to change
it.

Thanks,
Mark.

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

* ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-17 12:37       ` Mark Rutland
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Rutland @ 2016-10-17 12:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 17, 2016 at 01:30:59PM +0200, SF Markus Elfring wrote:
> >> Some data were printed into a sequence by six separate function calls.
> >> Print the same data by a single function call instead.
> > 
> > ... why?
> > 
> > Beyond simply having fewer function calls, is there an upside?
> 
> Will it matter to improve run time characteristics at this source code
> place?

I do not know. If that's not the aim of your existing patch, then I have
no idea what you're trying to achieve.

> > This makes it harder to see the relationship between the format strings
> > and their associated data, and makes the code longer.
> 
> Do you prefer an other layout for the passed data so that the increase
> of line count in my update suggestion would look differently?

I prefer the code as-is. Unless there's a compelling reason to change
it.

Thanks,
Mark.

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

* Re: ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
  2016-10-17 12:37       ` Mark Rutland
  (?)
@ 2016-10-17 12:50         ` SF Markus Elfring
  -1 siblings, 0 replies; 21+ messages in thread
From: SF Markus Elfring @ 2016-10-17 12:50 UTC (permalink / raw)
  To: Mark Rutland
  Cc: kernel-janitors, Will Deacon, LKML, linux-arm-kernel, Suzuki K. Poulose

> I prefer the code as-is. Unless there's a compelling reason to change it.

Is the chance for faster log output interesting enough?

Regards,
Markus

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

* Re: ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-17 12:50         ` SF Markus Elfring
  0 siblings, 0 replies; 21+ messages in thread
From: SF Markus Elfring @ 2016-10-17 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

> I prefer the code as-is. Unless there's a compelling reason to change it.

Is the chance for faster log output interesting enough?

Regards,
Markus

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

* ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-17 12:50         ` SF Markus Elfring
  0 siblings, 0 replies; 21+ messages in thread
From: SF Markus Elfring @ 2016-10-17 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

> I prefer the code as-is. Unless there's a compelling reason to change it.

Is the chance for faster log output interesting enough?

Regards,
Markus

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

* Re: ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
  2016-10-17 12:50         ` SF Markus Elfring
  (?)
@ 2016-10-17 13:10           ` Mark Rutland
  -1 siblings, 0 replies; 21+ messages in thread
From: Mark Rutland @ 2016-10-17 13:10 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: Will Deacon, kernel-janitors, LKML, linux-arm-kernel, Suzuki K. Poulose

On Mon, Oct 17, 2016 at 02:50:57PM +0200, SF Markus Elfring wrote:
> > I prefer the code as-is. Unless there's a compelling reason to change it.
> 
> Is the chance for faster log output interesting enough?

Is there a particular user that cares today, or are we trying to work
backwards to a rationale?

Thanks,
Mark.

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

* Re: ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-17 13:10           ` Mark Rutland
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Rutland @ 2016-10-17 13:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 17, 2016 at 02:50:57PM +0200, SF Markus Elfring wrote:
> > I prefer the code as-is. Unless there's a compelling reason to change it.
> 
> Is the chance for faster log output interesting enough?

Is there a particular user that cares today, or are we trying to work
backwards to a rationale?

Thanks,
Mark.

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

* ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show()
@ 2016-10-17 13:10           ` Mark Rutland
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Rutland @ 2016-10-17 13:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 17, 2016 at 02:50:57PM +0200, SF Markus Elfring wrote:
> > I prefer the code as-is. Unless there's a compelling reason to change it.
> 
> Is the chance for faster log output interesting enough?

Is there a particular user that cares today, or are we trying to work
backwards to a rationale?

Thanks,
Mark.

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

end of thread, other threads:[~2016-10-17 13:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-16 19:03 [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show() SF Markus Elfring
2016-10-16 19:03 ` SF Markus Elfring
2016-10-16 19:03 ` SF Markus Elfring
2016-10-17  9:37 ` Matthias Brugger
2016-10-17  9:37   ` Matthias Brugger
2016-10-17  9:37   ` [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_sho Matthias Brugger
2016-10-17 10:56 ` [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show() Mark Rutland
2016-10-17 10:56   ` Mark Rutland
2016-10-17 10:56   ` [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_sho Mark Rutland
2016-10-17 11:30   ` ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show() SF Markus Elfring
2016-10-17 11:30     ` SF Markus Elfring
2016-10-17 11:30     ` SF Markus Elfring
2016-10-17 12:37     ` Mark Rutland
2016-10-17 12:37       ` Mark Rutland
2016-10-17 12:37       ` Mark Rutland
2016-10-17 12:50       ` SF Markus Elfring
2016-10-17 12:50         ` SF Markus Elfring
2016-10-17 12:50         ` SF Markus Elfring
2016-10-17 13:10         ` Mark Rutland
2016-10-17 13:10           ` Mark Rutland
2016-10-17 13:10           ` Mark Rutland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.