From: Doug Thompson <norsk5@yahoo.com>
To: Harry Ciao <qingtao.cao@windriver.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: michael@ellerman.id.au, bluesmoke-devel@lists.sourceforge.net,
linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [v2 PATCH 2/3] EDAC: Add edac_device_alloc_index()
Date: Fri, 17 Apr 2009 14:42:47 -0700 (PDT) [thread overview]
Message-ID: <406152.8763.qm@web50108.mail.re2.yahoo.com> (raw)
--- On Wed, 4/15/09, Andrew Morton <akpm@linux-foundation.org> wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: Re: [v2 PATCH 2/3] EDAC: Add edac_device_alloc_index()
> To: "Harry Ciao" <qingtao.cao@windriver.com>
> Cc: norsk5@yahoo.com, michael@ellerman.id.au, bluesmoke-devel@lists.sourceforge.net, linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
> Date: Wednesday, April 15, 2009, 4:27 PM
> On Mon, 13 Apr 2009 14:05:15 +0800
> Harry Ciao <qingtao.cao@windriver.com>
> wrote:
>
> > Add edac_device_alloc_index(), because for MAPLE
> platform there may
> > exist several EDAC driver modules that could make use
> of
> > edac_device_ctl_info structure at the same time. The
> index allocation
> > for these structures should be taken care of by EDAC
> core.
> >
>
> From: Andrew Morton <akpm@linux-foundation.org>
>
> keep things neat. Also avoids having global
> identifier device_index
> shadowed by local identifier device_index.
>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Doug Thompson <dougthompson@xmission.com>
> Cc: Harry Ciao <qingtao.cao@windriver.com>
> Cc: Kumar Gala <galak@gate.crashing.org>
> Cc: Michael Ellerman <michael@ellerman.id.au>
> Cc: Paul Mackerras <paulus@samba.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/edac/edac_device.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff -puN
> drivers/edac/amd8111_edac.c~edac-add-edac_device_alloc_index-cleanup
> drivers/edac/amd8111_edac.c
> diff -puN
> drivers/edac/edac_core.h~edac-add-edac_device_alloc_index-cleanup
> drivers/edac/edac_core.h
> diff -puN
> drivers/edac/edac_device.c~edac-add-edac_device_alloc_index-cleanup
> drivers/edac/edac_device.c
> ---
> a/drivers/edac/edac_device.c~edac-add-edac_device_alloc_index-cleanup
> +++ a/drivers/edac/edac_device.c
> @@ -37,7 +37,6 @@
> */
> static DEFINE_MUTEX(device_ctls_mutex);
> static LIST_HEAD(edac_device_list);
> -static atomic_t device_indexes = ATOMIC_INIT(0);
>
> #ifdef CONFIG_EDAC_DEBUG
> static void edac_device_dump_device(struct
> edac_device_ctl_info *edac_dev)
> @@ -499,6 +498,8 @@ void
> edac_device_reset_delay_period(stru
> */
> int edac_device_alloc_index(void)
> {
> + static atomic_t device_indexes =
> ATOMIC_INIT(0);
> +
> return
> atomic_inc_return(&device_indexes) - 1;
> }
> EXPORT_SYMBOL_GPL(edac_device_alloc_index);
> _
>
>
next reply other threads:[~2009-04-17 21:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-17 21:42 Doug Thompson [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-04-13 6:05 [v2 PATCH 0/3] Add CPC925 Memory Controller EDAC drivers Harry Ciao
2009-04-13 6:05 ` [v2 PATCH 1/3] EDAC: Add CPC925 Memory Controller driver Harry Ciao
2009-04-13 6:05 ` [v2 PATCH 2/3] EDAC: Add edac_device_alloc_index() Harry Ciao
2009-04-15 22:27 ` Andrew Morton
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=406152.8763.qm@web50108.mail.re2.yahoo.com \
--to=norsk5@yahoo.com \
--cc=akpm@linux-foundation.org \
--cc=bluesmoke-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=qingtao.cao@windriver.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