From: Alex Chiang <achiang@hp.com>
To: Chris Mason <chris.mason@oracle.com>,
lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] set dock_station->flags to zero during dock_add
Date: Mon, 1 Feb 2010 10:57:50 -0700 [thread overview]
Message-ID: <20100201175750.GC28002@ldl.fc.hp.com> (raw)
In-Reply-To: <20100201174557.GB3240@think>
* Chris Mason <chris.mason@oracle.com>:
> On Mon, Feb 01, 2010 at 10:35:18AM -0700, Alex Chiang wrote:
> > Hi Chris,
> >
> > Thanks for catching this. Seems better to just memset the stack
> > variable before we kmemdup it in platform_deivce_register_data().
> >
> > How about this instead?
>
> [ memset instead of explicitly setting flags to zero ]
>
> I didn't do the memset because lower down we init every other field, but
> zeros are zeros really.
Sure, zeros are zeros. I chose memset in case the struct grows in
the future and someone else forgets to initialize members to
zero.
I'll let Len decide which patch to take, it doesn't much matter
to me.
If he takes yours...
Acked-by: Alex Chiang <achiang@hp.com>
> Looking at platform_device_register_data, you could even make
> ds static...now that is sure to break in small and subtle ways
> later on ;)
Ha, those are bugs that I don't have to have to fix in the
future. :)
cheers,
/ac
next prev parent reply other threads:[~2010-02-01 17:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 16:30 [PATCH] set dock_station->flags to zero during dock_add Chris Mason
2010-02-01 17:35 ` Alex Chiang
2010-02-01 17:45 ` Chris Mason
2010-02-01 17:57 ` Alex Chiang [this message]
2010-02-12 20:45 ` Chris Mason
2010-02-13 9:34 ` Len Brown
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=20100201175750.GC28002@ldl.fc.hp.com \
--to=achiang@hp.com \
--cc=chris.mason@oracle.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox