Patchwork dmi: dmi_decode: Add another commonly used serial number

login
register
mail settings
Submitter Colin King
Date March 22, 2013, 11:49 a.m.
Message ID <1363952970-9602-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/229971/
State Rejected
Headers show

Comments

Colin King - March 22, 2013, 11:49 a.m.
From: Colin Ian King <colin.king@canonical.com>

Some newer systems that we are seeing don't seem to have the
serial number initialised properly and are set to a default
string "System Serial Number" which is meaningless.  Check for this.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/cpu/cpufreq/cpufreq.c | 3 +++
 1 file changed, 3 insertions(+)
Colin King - March 22, 2013, noon
On 22/03/13 11:49, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Some newer systems that we are seeing don't seem to have the
> serial number initialised properly and are set to a default
> string "System Serial Number" which is meaningless.  Check for this.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/cpu/cpufreq/cpufreq.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
> index fd37b9d..e270d35 100644
> --- a/src/cpu/cpufreq/cpufreq.c
> +++ b/src/cpu/cpufreq/cpufreq.c
> @@ -318,8 +318,11 @@ static void do_cpu(fwts_framework *fw, int cpu)
>   		}
>   	}
>
> +printf("Speedcount = %d\n", speedcount);
> +
>   	/* now check for 1) increasing HZ and 2) increasing speed */
>   	for (i = 0; i < speedcount-1; i++) {
> +		printf("%d %" PRIu64 " %" PRIu64 "\n", i, freqs[i].speed, freqs[i+1].speed);
>   		if (freqs[i].Hz == freqs[i+1].Hz && !warned++)
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
>   				"CPUFreqDupFreq",
>
NACK - oops, sent something completely wrong out to the list, please ignore!

Patch

diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
index fd37b9d..e270d35 100644
--- a/src/cpu/cpufreq/cpufreq.c
+++ b/src/cpu/cpufreq/cpufreq.c
@@ -318,8 +318,11 @@  static void do_cpu(fwts_framework *fw, int cpu)
 		}
 	}
 
+printf("Speedcount = %d\n", speedcount);
+
 	/* now check for 1) increasing HZ and 2) increasing speed */
 	for (i = 0; i < speedcount-1; i++) {
+		printf("%d %" PRIu64 " %" PRIu64 "\n", i, freqs[i].speed, freqs[i+1].speed);
 		if (freqs[i].Hz == freqs[i+1].Hz && !warned++)
 			fwts_failed(fw, LOG_LEVEL_MEDIUM,
 				"CPUFreqDupFreq",