[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080208204623.GG31984@uranus.ravnborg.org>
Date: Fri, 8 Feb 2008 21:46:23 +0100
From: Sam Ravnborg <sam@...nborg.org>
To: Barry Kasindorf <barry.kasindorf@....com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] AMD Family10h IBS support for oProfile driver
Nitpicks only - and as I am not familiar
with this codebase I could not provide
proper code review.
Sam
> +
> + /*setup AMD Family10h IBS irq if needed */
Please add a space after '/*'
Several places.
> static int nmi_create_files(struct super_block *sb, struct dentry *root)
> {
> unsigned int i;
> + struct dentry *dir;
>
> for (i = 0; i < model->num_counters; ++i) {
> - struct dentry *dir;
> +
> char buf[4];
Please drop this empty line
> @@ -391,6 +428,7 @@ int __init op_nmi_init(struct oprofile_operations *ops)
> __u8 vendor = boot_cpu_data.x86_vendor;
> __u8 family = boot_cpu_data.x86;
> char *cpu_type;
> + uint32_t eax, ebx, ecx, edx;
We do not recommned use of uint32_t in the kernel. Use plain u32.
uint32_t belongs to a namespace outside the kernel.
(googling will find lots of discussion on the topic but I see code
just above using u8 so at least be consistent and use u32)
> + /* see if IBS is available */
> + if (family >= 0x10) {
> + cpuid(0x80000001, &eax, &ebx, &ecx, &edx);
Two hardcoded numbers on two lines??
> + if (ecx & 0x40)
And one more..
--
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