From: Greg KH <greg@kroah.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Rodolfo Giometti <giometti@enneenne.com>,
linux-kernel@vger.kernel.org, linuxpps@ml.enneenne.com
Subject: Re: [PATCH 1/1] LinuxPPS: Pulse per Second support for Linux
Date: Sat, 12 May 2007 00:08:51 -0700 [thread overview]
Message-ID: <20070512070851.GA18752@kroah.com> (raw)
In-Reply-To: <20070511231711.21b8a334.akpm@linux-foundation.org>
On Fri, May 11, 2007 at 11:17:11PM -0700, Andrew Morton wrote:
> On Fri, 11 May 2007 23:55:37 +0200
> Rodolfo Giometti <giometti@enneenne.com> wrote:
>
> > Hello,
> >
> > here my new patch with a lot of fixes.
> >
> > The only issue not still fixed is the one related with:
> >
> > #define NETLINK_PPSAPI 20
> >
> > I need time to resolve it.
> >
> > Follows my comments and then the patch, hope now I can came back into
> > -mm tree again! :)
>
> Well I suppose I could toss it in there for a bit of review-and-test. But
> I'll need to drop it again because we do need to split this patch into the series
> of patches, please.
>
> You should do this earlier rather than later because it improves reviewability.
>
> > > - This:
> > >
> > > static void pps_class_release(struct class_device *cdev)
> > > {
> > > /* Nop??? */
> > > }
> > >
> > > is a bug and it earns you a nastygram from Greg. These objects must be
> > > dynamically allocated - this is not optional.
> >
> > It could be acceptable defining this function as void?
>
> No, it needs to be a proper release function, like all the other ones
> around the place.
>
> This comes up again and again and again and I recently asked Greg to direct
> me to (or to write) suitable documentation, and I think he did, but I lost
> it. Greg, can you remind us please?
I need to put it in some permanent place, but basically the problem is
that if you need to shut the kernel up by using an empty function for a
release, then you are not understanding why the kernel was trying to
warn you in the first place :(
You need to free your memory for the class_device in the release
function, you can not have a static structure, or rely on some other
reference count to handle the cleanup properly.
Also note that 'struct class_device' is going away and you should use
'struct device' instead. That too needs to be documented better, and is
on my list of things to do...
thanks,
greg k-h
next prev parent reply other threads:[~2007-05-12 7:08 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 7:41 [PATCH 1/1] LinuxPPS: Pulse per Second support for Linux Rodolfo Giometti
2007-03-21 8:05 ` Jon K Hellan
2007-03-21 8:08 ` Rodolfo Giometti
2007-03-21 15:34 ` Lennart Sorensen
2007-03-21 16:55 ` [LinuxPPS] " Reg Clemens
2007-03-21 20:36 ` Rodolfo Giometti
2007-03-21 22:35 ` Reg Clemens
2007-04-26 21:01 ` Rodolfo Giometti
2007-05-02 19:33 ` Rodolfo Giometti
2007-05-02 21:06 ` john stultz
2007-05-03 10:03 ` Rodolfo Giometti
2007-05-10 7:27 ` Andrew Morton
2007-05-10 9:48 ` Andrew Morton
2007-05-10 10:58 ` Rodolfo Giometti
2007-05-10 11:01 ` David Miller
2007-05-10 11:45 ` Rodolfo Giometti
2007-05-10 11:51 ` David Miller
2007-05-10 11:54 ` David Miller
2007-05-11 0:30 ` Info about the new netlink layer userland API Rodolfo Giometti
2007-05-12 5:59 ` [PATCH 1/1] LinuxPPS: Pulse per Second support for Linux Rodolfo Giometti
2007-05-12 6:17 ` Andrew Morton
2007-05-12 7:08 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-02-16 18:52 Rodolfo Giometti
2007-02-16 19:12 ` Russell King
2007-02-16 20:43 ` Rodolfo Giometti
2007-02-16 20:51 ` Russell King
2007-02-16 21:03 ` Rodolfo Giometti
2007-02-16 19:56 ` Jan Dittmer
2007-02-16 20:57 ` Rodolfo Giometti
2007-02-16 21:19 ` Jan Dittmer
2007-02-20 2:56 ` H. Peter Anvin
2007-02-21 12:04 ` Rodolfo Giometti
2007-02-21 16:14 ` H. Peter Anvin
2007-02-22 8:51 ` Rodolfo Giometti
2007-02-21 23:51 ` Roman Zippel
2007-02-22 9:00 ` Rodolfo Giometti
2007-02-21 10:16 ` Pavel Machek
2007-02-22 9:59 ` Rodolfo Giometti
2007-03-13 21:38 ` Rodolfo Giometti
2007-03-13 22:48 ` Lennart Sorensen
2007-03-14 9:31 ` Rodolfo Giometti
2007-03-14 13:19 ` Lennart Sorensen
2007-03-14 14:06 ` Rodolfo Giometti
2007-03-14 14:12 ` Lennart Sorensen
2007-03-14 14:27 ` Rodolfo Giometti
2007-03-14 14:42 ` Lennart Sorensen
2007-03-14 14:52 ` Rodolfo Giometti
2007-03-14 15:37 ` Lennart Sorensen
2007-03-14 15:47 ` Rodolfo Giometti
2007-03-14 20:57 ` Lennart Sorensen
2007-03-15 10:29 ` Rodolfo Giometti
2007-03-15 15:18 ` Lennart Sorensen
2007-03-15 15:37 ` Rodolfo Giometti
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=20070512070851.GA18752@kroah.com \
--to=greg@kroah.com \
--cc=akpm@linux-foundation.org \
--cc=giometti@enneenne.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxpps@ml.enneenne.com \
/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.