From: Sam Ravnborg <sam@ravnborg.org>
To: Barry Kasindorf <barry.kasindorf@amd.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] AMD Family10h IBS support for oProfile driver
Date: Fri, 8 Feb 2008 21:46:23 +0100 [thread overview]
Message-ID: <20080208204623.GG31984@uranus.ravnborg.org> (raw)
In-Reply-To: <47ACB571.8070507@amd.com>
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..
prev parent reply other threads:[~2008-02-08 20:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 20:02 Barry Kasindorf
2008-02-08 20:46 ` Sam Ravnborg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080208204623.GG31984@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=barry.kasindorf@amd.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®