public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: dtor_core@ameritech.net
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
	Arjan van de Ven <arjan@infradead.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	Yani Ioannou <yani.ioannou@gmail.com>,
	greg@kroah.com
Subject: Re: [PATCH] Try 2, Fix release function in IPMI device model
Date: Wed, 22 Mar 2006 15:27:48 -0600	[thread overview]
Message-ID: <4421C154.9010308@acm.org> (raw)
In-Reply-To: <d120d5000603221323t7c67b06epa02ed3269d3365b0@mail.gmail.com>

Dmitry Torokhov wrote:

>On 3/22/06, Corey Minyard <minyard@acm.org> wrote:
>  
>
>> struct bmc_device
>> {
>>-       struct platform_device dev;
>>+       struct platform_device *dev;
>>       struct ipmi_device_id  id;
>>       unsigned char          guid[16];
>>       int                    guid_set;
>>-       int                    interfaces;
>>+
>>+       struct kref            refcount;
>>
>>    
>>
>
>Hi,
>
>I am confused as to why you need kref here. Just unregister/kfree
>memory occupied by your device structure after doing
>platform_device_unregister and that's it. platform code won't
>reference your memory and your attribute code should not be called
>from module exit code so everything shoudl be fine.
>  
>
This structure represents a "BMC", which is a microcontroller
that does managment functions.  There may be more than one
interface to a BMC, so the kref keeps track of all the interfaces
referencing the structure.

-Corey

      reply	other threads:[~2006-03-22 21:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-22 20:45 [PATCH] Try 2, Fix release function in IPMI device model Corey Minyard
2006-03-22 21:08 ` Greg KH
2006-03-22 21:18   ` Dmitry Torokhov
2006-03-22 21:35     ` Corey Minyard
2006-03-22 21:39       ` Dmitry Torokhov
2006-03-22 21:23 ` Dmitry Torokhov
2006-03-22 21:27   ` Corey Minyard [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=4421C154.9010308@acm.org \
    --to=minyard@acm.org \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=dtor_core@ameritech.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=yani.ioannou@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox