From: Stephen Neuendorffer <stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: RE: [PATCH 1/8] of/fdt.c: use architecture-independent ALIGN macro, defined in kernel.h
Date: Fri, 16 Jul 2010 11:45:41 -0700 [thread overview]
Message-ID: <8cb357c7-231a-43e4-bc71-b2029a929d11@SG2EHSMHS004.ehs.local> (raw)
In-Reply-To: <AANLkTin8GUuMjAVI-r2KNXBoH7DjsQWfTjC1inQTlD6V-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
> -----Original Message-----
> From: glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org [mailto:glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org] On Behalf Of Grant Likely
> Sent: Friday, July 16, 2010 11:30 AM
> To: Stephen Neuendorffer
> Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> Subject: Re: [PATCH 1/8] of/fdt.c: use architecture-independent ALIGN macro, defined in kernel.h
>
> On Fri, Jul 16, 2010 at 12:13 PM, Stephen Neuendorffer
> <stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org> wrote:
> > This removes an architecture dependency, making the code more generic.
>
> A similar change will be in linux-next today. :-) I've recently
> updated my next-devicetree and test-devicetree branches if you would
> like to rebase.
I will.. Looks like this cleans up alot of the junky stuff! :)
Steve
>
> g.
>
> > ---
> > drivers/of/fdt.c | 20 ++++++++++----------
> > 1 files changed, 10 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> > index b6987bb..d61fda8 100644
> > --- a/drivers/of/fdt.c
> > +++ b/drivers/of/fdt.c
> > @@ -69,9 +69,9 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
> > u32 sz = be32_to_cpup((__be32 *)p);
> > p += 8;
> > if (be32_to_cpu(initial_boot_params->version) < 0x10)
> > - p = _ALIGN(p, sz >= 8 ? 8 : 4);
> > + p = ALIGN(p, sz >= 8 ? 8 : 4);
> > p += sz;
> > - p = _ALIGN(p, 4);
> > + p = ALIGN(p, 4);
> > continue;
> > }
> > if (tag != OF_DT_BEGIN_NODE) {
> > @@ -80,7 +80,7 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
> > }
> > depth++;
> > pathp = (char *)p;
> > - p = _ALIGN(p + strlen(pathp) + 1, 4);
> > + p = ALIGN(p + strlen(pathp) + 1, 4);
> > if ((*pathp) == '/') {
> > char *lp, *np;
> > for (lp = NULL, np = pathp; *np; np++)
> > @@ -109,7 +109,7 @@ unsigned long __init of_get_flat_dt_root(void)
> > p += 4;
> > BUG_ON(be32_to_cpup((__be32 *)p) != OF_DT_BEGIN_NODE);
> > p += 4;
> > - return _ALIGN(p + strlen((char *)p) + 1, 4);
> > + return ALIGN(p + strlen((char *)p) + 1, 4);
> > }
> >
> > /**
> > @@ -138,7 +138,7 @@ void *__init of_get_flat_dt_prop(unsigned long node, const char *name,
> > noff = be32_to_cpup((__be32 *)(p + 4));
> > p += 8;
> > if (be32_to_cpu(initial_boot_params->version) < 0x10)
> > - p = _ALIGN(p, sz >= 8 ? 8 : 4);
> > + p = ALIGN(p, sz >= 8 ? 8 : 4);
> >
> > nstr = find_flat_dt_string(noff);
> > if (nstr == NULL) {
> > @@ -151,7 +151,7 @@ void *__init of_get_flat_dt_prop(unsigned long node, const char *name,
> > return (void *)p;
> > }
> > p += sz;
> > - p = _ALIGN(p, 4);
> > + p = ALIGN(p, 4);
> > } while (1);
> > }
> >
> > @@ -184,7 +184,7 @@ static void *__init unflatten_dt_alloc(unsigned long *mem, unsigned long size,
> > {
> > void *res;
> >
> > - *mem = _ALIGN(*mem, align);
> > + *mem = ALIGN(*mem, align);
> > res = (void *)*mem;
> > *mem += size;
> >
> > @@ -220,7 +220,7 @@ unsigned long __init unflatten_dt_node(unsigned long mem,
> > *p += 4;
> > pathp = (char *)*p;
> > l = allocl = strlen(pathp) + 1;
> > - *p = _ALIGN(*p + l, 4);
> > + *p = ALIGN(*p + l, 4);
> >
> > /* version 0x10 has a more compact unit name here instead of the full
> > * path. we accumulate the full path size using "fpsize", we'll rebuild
> > @@ -299,7 +299,7 @@ unsigned long __init unflatten_dt_node(unsigned long mem,
> > noff = be32_to_cpup((__be32 *)((*p) + 4));
> > *p += 8;
> > if (be32_to_cpu(initial_boot_params->version) < 0x10)
> > - *p = _ALIGN(*p, sz >= 8 ? 8 : 4);
> > + *p = ALIGN(*p, sz >= 8 ? 8 : 4);
> >
> > pname = find_flat_dt_string(noff);
> > if (pname == NULL) {
> > @@ -333,7 +333,7 @@ unsigned long __init unflatten_dt_node(unsigned long mem,
> > *prev_pp = pp;
> > prev_pp = &pp->next;
> > }
> > - *p = _ALIGN((*p) + sz, 4);
> > + *p = ALIGN((*p) + sz, 4);
> > }
> > /* with version 0x10 we may not have the name property, recreate
> > * it here from the unit name if absent
> > --
> > 1.5.6.6
> >
> >
> >
> > This email and any attachments are intended for the sole use of the named recipient(s) and
> contain(s) confidential information that may be proprietary, privileged or copyrighted under
> applicable law. If you are not the intended recipient, do not read, copy, or forward this email
> message or any attachments. Delete this email message and any attachments immediately.
> >
> >
> >
>
>
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
next prev parent reply other threads:[~2010-07-16 18:45 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1279304021-22216-1-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279304021-22216-1-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-16 18:13 ` [PATCH 1/8] of/fdt.c: use architecture-independent ALIGN macro, defined in kernel.h Stephen Neuendorffer
[not found] ` <f2cebad3-5fb1-4984-800f-ef847e388e65-RaUQJvECHitZbvUCbuG1mrjjLBE8jN/0@public.gmane.org>
2010-07-16 18:29 ` Grant Likely
[not found] ` <AANLkTin8GUuMjAVI-r2KNXBoH7DjsQWfTjC1inQTlD6V-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-16 18:45 ` Stephen Neuendorffer [this message]
2010-07-19 18:34 ` Stephen Neuendorffer
[not found] ` <1279304021-22216-2-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279304021-22216-2-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-16 18:13 ` [PATCH 2/8] drivers/of: Make device tree code work on any arch Stephen Neuendorffer
[not found] ` <592c6c35-556d-4874-8b75-2ebf0acf00e9-+Ck8Kgl/v0+Da4789yZHSLjjLBE8jN/0@public.gmane.org>
2010-07-16 18:31 ` Grant Likely
[not found] ` <AANLkTimW3tsllx82F-cKtAEHGxVXwG4ESbtYWBzS17Wb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-16 18:34 ` Stephen Neuendorffer
[not found] ` <686f0008-74c9-4ee5-bfb3-b4920835b765-RaUQJvECHitEus+KprP3J7jjLBE8jN/0@public.gmane.org>
2010-07-16 18:55 ` Grant Likely
[not found] ` <1279304021-22216-3-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279304021-22216-3-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-16 18:13 ` [PATCH 3/8] of/fdt: Add unflatten_partial_device_tree Stephen Neuendorffer
[not found] ` <91a7e060-e748-47d5-aa7d-4fc45343d212-RaUQJvECHitEus+KprP3J7jjLBE8jN/0@public.gmane.org>
2010-07-16 19:25 ` Grant Likely
[not found] ` <AANLkTikbhjZshaetoTX6kXHwt_SobYUG69cuDZd0gArF-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-23 22:10 ` Stephen Neuendorffer
[not found] ` <58c8fb4d-50d9-45bb-9a09-9cd04033a912-RaUQJvECHiusiP+nND6G/7jjLBE8jN/0@public.gmane.org>
2010-08-10 17:53 ` Grant Likely
[not found] ` <AANLkTimE=YjDsr5em8ttAJkRzjZ6XMF_Hts0w0EpPzqx-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-17 0:44 ` Stephen Neuendorffer
[not found] ` <db162abd-e702-4d34-ac3a-ee6ce512f98d-+Ck8Kgl/v0/TR3wEnDZ30LjjLBE8jN/0@public.gmane.org>
2010-11-17 1:48 ` Grant Likely
[not found] ` <1279304021-22216-4-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279304021-22216-4-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-16 18:13 ` [PATCH 4/8] of/base.c: export property access/modification functions Stephen Neuendorffer
[not found] ` <01cb5edd-5330-40ba-b410-6732e44f0954-+Ck8Kgl/v0+Da4789yZHSLjjLBE8jN/0@public.gmane.org>
2010-07-16 18:33 ` Grant Likely
[not found] ` <AANLkTikwtfpH5qyG5cbsLYPHLSaAmBcHaSJT3zbt4s35-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-16 18:38 ` Stephen Neuendorffer
[not found] ` <e198df81-5939-4b82-9d27-952d9781ec05-+Ck8Kgl/v09CYczPSvLbDrjjLBE8jN/0@public.gmane.org>
2010-07-16 18:57 ` Grant Likely
[not found] ` <AANLkTilXmgTkJ2N0dTYsV99ElqssZAXwOgtKPBENZoX8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-16 20:07 ` Stephen Neuendorffer
[not found] ` <41b1b87c-a391-493d-8235-a9304562a6e4-RaUQJvECHis6W+Ha+8ZLibjjLBE8jN/0@public.gmane.org>
2010-07-16 21:43 ` Grant Likely
[not found] ` <AANLkTinlTNa0TEnqk27Jv2Yy8sZ1Vx3V89YJvcs-jULM-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-16 22:03 ` Stephen Neuendorffer
[not found] ` <1279304021-22216-5-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279304021-22216-5-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-16 18:13 ` [PATCH 5/8] arch/x86: Add support for device tree code Stephen Neuendorffer
[not found] ` <961e55b7-170c-45ac-a491-628797a0aa5e-+Ck8Kgl/v0/5op9OF0Koj7jjLBE8jN/0@public.gmane.org>
2010-07-16 18:39 ` Grant Likely
[not found] ` <AANLkTinPIY4N9Gv_J7Ief7Scd57c0KEY6WtHsvQTBrzb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-16 18:42 ` Stephen Neuendorffer
[not found] ` <a33ca228-cb2c-4044-bf63-c653642415a0-RaUQJvECHitEus+KprP3J7jjLBE8jN/0@public.gmane.org>
2010-07-16 18:59 ` Grant Likely
[not found] ` <AANLkTinVIf2A_OVAXlqjHY5J3jvaraPlJySnyEKbhlqA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-16 20:11 ` Stephen Neuendorffer
[not found] ` <a52173ec-5c74-47ce-9121-f2e90958b05d-RaUQJvECHiuJ1bAq5m18RLjjLBE8jN/0@public.gmane.org>
2010-07-16 20:28 ` Grant Likely
[not found] ` <1279304021-22216-6-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279304021-22216-6-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-16 18:13 ` [PATCH 6/8] [Xilinx] xilinx_pcipr: Added Xilinx reconfigurable PCI endpoint driver Stephen Neuendorffer
[not found] ` <19f2f30b-1b43-4729-a079-da1df0b04609-RaUQJvECHitZbvUCbuG1mrjjLBE8jN/0@public.gmane.org>
2010-07-16 18:43 ` Grant Likely
[not found] ` <1279304021-22216-7-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279304021-22216-7-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-16 18:13 ` [PATCH 7/8] [Xilinx] xilinx_hwicap: Update driver to use generic io accessors Stephen Neuendorffer
[not found] ` <1279304021-22216-8-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279304021-22216-8-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-16 18:13 ` [PATCH 8/8] [Xilinx] xilinx_hwicap: Enable whenever OF/device trees are available Stephen Neuendorffer
[not found] ` <a10f704f-cc4b-4ca2-bd06-a9c4fa2853d4-+Ck8Kgl/v086W+Ha+8ZLibjjLBE8jN/0@public.gmane.org>
2010-07-16 18:45 ` Grant Likely
[not found] ` <AANLkTilMVutoM9wH-67nqR2r3Lv-hq_aEKntjLk7_dgA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-16 18:46 ` Stephen Neuendorffer
2010-07-16 18:47 ` Grant Likely
2010-07-22 16:05 ` Grant Likely
[not found] ` <AANLkTimm9hxxaj5ir2SynudRu1o4LKXnHy1AnJ1C_ii7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-22 18:25 ` Stephen Neuendorffer
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=8cb357c7-231a-43e4-bc71-b2029a929d11@SG2EHSMHS004.ehs.local \
--to=stephen.neuendorffer-gjffaj9ahvfqt0dzr+alfa@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@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