All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bryan O'Sullivan" <bos@serpentine.com>
To: Stephane Eranian <eranian@frankl.hpl.hp.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] 2.6.16-rc1 perfmon2 patch for review
Date: Fri, 20 Jan 2006 08:47:24 -0800	[thread overview]
Message-ID: <1137775645.28944.61.camel@serpentine.pathscale.com> (raw)
In-Reply-To: <200601201520.k0KFKEm2023128@frankl.hpl.hp.com>

On Fri, 2006-01-20 at 07:20 -0800, Stephane Eranian wrote:

> +static struct pfm_smpl_fmt dfl_fmt={
> + 	.fmt_name = "default_format2",
> + 	.fmt_uuid = PFM_DFL_SMPL_UUID,

What's the point of using a UUID here?

> +static struct file_system_type pfm_fs_type = {
> +	.name     = "pfmfs",
> +	.get_sb   = pfmfs_get_sb,
> +	.kill_sb  = kill_anon_super,
> +};

A comment that describes what pfmfs is for would be useful here, and
perhaps a warning to hold one's nose, if the code that follows is
anything to go by :-)

> +#if 0
> +irqreturn_t pfm_interrupt_handler(int irq, void *arg, struct pt_regs *regs)

Why a dead interrupt handler here?

> +static ctl_table pfm_ctl_table[]={

Why are you using sysctls, and not sysfs?  Why is this in a file that
claims to be procfs-related?

Also, it looks like much of the procfs goo is actually not related to
individual processes, really doesn't belong in /proc at all, and should
move to some place in sysfs somewhere.

> +/*
> + * invoked by writing to /proc/sys/kernel/perfmon/reset_stats
> + */

Yep, this shouldn't be in /proc, unless I'm massively misunderstanding
the current state of the world.

> +int pfm_get_smpl_arg(pfm_uuid_t uuid, void *uaddr, size_t usize, void **arg,
> +		     struct pfm_smpl_fmt **fmt)

That should be void __user *uaddr.  Please run the code through sparse.

> +	if (addr)
> +		kfree(addr);

kfree ignores a NULL argument.

	<b


  reply	other threads:[~2006-01-20 16:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-20 15:20 [PATCH 3/6] 2.6.16-rc1 perfmon2 patch for review Stephane Eranian
2006-01-20 16:47 ` Bryan O'Sullivan [this message]
2006-01-24 15:09   ` Stephane Eranian
2006-01-25 20:08     ` Bryan O'Sullivan
2006-01-25 23:52       ` Greg KH
2006-01-26  4:55         ` Stephane Eranian
2006-01-26  5:24           ` Greg KH
2006-01-26  5:43             ` Stephane Eranian
2006-01-26 18:23               ` Bryan O'Sullivan
2006-01-27  0:14               ` Greg KH

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=1137775645.28944.61.camel@serpentine.pathscale.com \
    --to=bos@serpentine.com \
    --cc=eranian@frankl.hpl.hp.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 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.