From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Grant Likely <grant.likely@linaro.org>
Cc: devicetree@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>,
Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Mark Brown <broonie@kernel.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 07/14] of/reconfig: Always use the same structure for notifiers
Date: Wed, 26 Nov 2014 10:07:54 +1100 [thread overview]
Message-ID: <1416956874.5089.13.camel@kernel.crashing.org> (raw)
In-Reply-To: <1416868422-22103-8-git-send-email-grant.likely@linaro.org>
On Mon, 2014-11-24 at 22:33 +0000, Grant Likely wrote:
> The OF_RECONFIG notifier callback uses a different structure depending
> on whether it is a node change or a property change. This is silly, and
> not very safe. Rework the code to use the same data structure regardless
> of the type of notifier.
I fell pretty good about this one except...
> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> index b9d1dfdbe5bb..9fe6002c1d5a 100644
> --- a/arch/powerpc/mm/numa.c
> +++ b/arch/powerpc/mm/numa.c
> @@ -1711,12 +1711,11 @@ static void stage_topology_update(int core_id)
> static int dt_update_callback(struct notifier_block *nb,
> unsigned long action, void *data)
> {
> - struct of_prop_reconfig *update;
> + struct of_reconfig_data *update = data;
> int rc = NOTIFY_DONE;
>
> switch (action) {
> case OF_RECONFIG_UPDATE_PROPERTY:
> - update = (struct of_prop_reconfig *)data;
Should we assert/bug on !update->dn / update->prop ?
(Same for the rest of the patch)
Or do you reckon it's pointless ?
Ben.
next prev parent reply other threads:[~2014-11-25 23:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1416868422-22103-1-git-send-email-grant.likely@linaro.org>
2014-11-24 22:33 ` [PATCH v2 07/14] of/reconfig: Always use the same structure for notifiers Grant Likely
2014-11-25 23:07 ` Benjamin Herrenschmidt [this message]
2014-11-26 3:11 ` Nathan Fontenot
2014-11-26 13:16 ` Grant Likely
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=1416956874.5089.13.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=pantelis.antoniou@konsulko.com \
--cc=robh+dt@kernel.org \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).