From: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
To: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Pantelis Antoniou
<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.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-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-11-25 23:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 22:33 [PATCH v2 00/14] of: DT Overlay patches to be merged Grant Likely
2014-11-24 22:33 ` [PATCH v2 02/14] of: Refactor __of_node_alloc() into __of_node_dup() Grant Likely
2014-11-24 22:33 ` [PATCH v2 03/14] of/resolver: Switch to new local fixups format Grant Likely
2014-11-24 22:33 ` [PATCH v2 04/14] of/reconfig: Add of_reconfig_get_state_change() of notifier helper Grant Likely
2014-11-24 22:33 ` [PATCH v2 05/14] of/reconfig: Add empty stubs for the of_reconfig methods Grant Likely
2014-11-24 22:33 ` [PATCH v2 06/14] of/reconfig: Add debug output for OF_RECONFIG notifiers Grant Likely
2014-11-24 22:33 ` [PATCH v2 07/14] of/reconfig: Always use the same structure for notifiers Grant Likely
[not found] ` <1416868422-22103-8-git-send-email-grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-11-25 23:07 ` Benjamin Herrenschmidt [this message]
2014-11-26 3:11 ` Nathan Fontenot
[not found] ` <547544FE.5020706-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2014-11-26 13:16 ` Grant Likely
2014-11-24 22:33 ` [PATCH v2 08/14] of/reconfig: Add OF_DYNAMIC notifier for platform_bus_type Grant Likely
2014-11-24 22:33 ` [PATCH v2 10/14] of/overlay: Add overlay unittests Grant Likely
2014-11-24 22:33 ` [PATCH v2 11/14] i2c/of: Factor out Devicetree registration code Grant Likely
2014-11-25 14:11 ` Wolfram Sang
2014-11-24 22:33 ` [PATCH v2 12/14] i2c/of: Add OF_RECONFIG notifier handler Grant Likely
2014-11-25 14:11 ` Wolfram Sang
[not found] ` <1416868422-22103-1-git-send-email-grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-11-24 22:33 ` [PATCH v2 01/14] of: Use vargs in __of_node_alloc Grant Likely
2014-11-24 22:33 ` [PATCH v2 09/14] of/overlay: Introduce DT overlay support Grant Likely
2014-11-24 22:33 ` [PATCH v2 13/14] spi/of: Create new device registration method and accessors Grant Likely
2014-11-25 11:32 ` Mark Brown
2014-11-24 22:33 ` [PATCH v2 14/14] spi/of: Add OF notifier handler Grant Likely
2014-11-25 11:44 ` Mark 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=1416956874.5089.13.camel@kernel.crashing.org \
--to=benh-xvmvhmargas8u2djnn8i7kb+6bgklq7r@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.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;
as well as URLs for NNTP newsgroup(s).