From: Corey Minyard <minyard@acm.org>
To: Greg KH <greg@kroah.com>
Cc: Andrew Morton <akpm@osdl.org>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] I2C patch 2 - break up the SMBus formatting
Date: Fri, 25 Feb 2005 16:46:35 -0600 [thread overview]
Message-ID: <421FAACB.4080207@acm.org> (raw)
In-Reply-To: <20050225214439.GC27270@kroah.com>
Greg KH wrote:
>On Thu, Feb 24, 2005 at 05:27:25PM -0600, Corey Minyard wrote:
>
>
>>+
>>+ /* It's wierd, but we use a usecount to track if an q entry is
>>+ in use and when it should be reported back to the user. */
>>+ atomic_t usecount;
>>
>>
>
>Please use a kref here instead of rolling your own.
>
>
There's a trick I'm playing to avoid having to use a lock on the normal
entry_put() case. It let's the entry_get() routine detect that the
object is about to be destroyed. You can't do it with the current kref,
but you could easily extend kref to allow it. It's simple to implement,
but the documentation on how to use it will be 10 times larger than the
code :).
I'll work on a patch to kref to add that, if you don't mind.
>Oh, and can you cc: your patches to the sensors mailing list so the
>other i2c developers are aware of them and can comment? I'll stick with
>just applying your first patch for now.
>
>
certainly.
thanks
-Corey
next prev parent reply other threads:[~2005-02-25 22:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-24 23:27 [PATCH] I2C patch 2 - break up the SMBus formatting Corey Minyard
2005-02-25 21:41 ` Greg KH
2005-02-25 21:44 ` Greg KH
2005-02-25 22:46 ` Corey Minyard [this message]
2005-02-25 23:00 ` 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=421FAACB.4080207@acm.org \
--to=minyard@acm.org \
--cc=akpm@osdl.org \
--cc=greg@kroah.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.