From: Andres Salomon <dilinger@queued.net>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: sparclinux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/3] sparc: make driver/of/pdt no longer sparc-specific
Date: Mon, 16 Aug 2010 04:22:44 +0000 [thread overview]
Message-ID: <20100816002244.6ddf37e6@debxo> (raw)
In-Reply-To: <20100808.223444.62324566.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Sun, 08 Aug 2010 22:34:44 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: Andres Salomon <dilinger@queued.net>
> Date: Mon, 9 Aug 2010 01:32:45 -0400
>
> > On Sun, 8 Aug 2010 23:12:21 -0600
> > Grant Likely <grant.likely@secretlab.ca> wrote:
> >
> >> If you have to explicitly cast these function pointers, then you're
> >> doing it wrong. :-) Listen to and fix the compiler complaint
> >> here.
> >>
> >
> > Hm, can you please expand on that? The reason it's necessary to
> > cast is because sparc's prom_* functions are using ints instead of
> > phandles. I don't understand why casting is the wrong thing here.
> >
> > I could write some 1-line wrapper functions that simply call prom_*
> > rather than casting, I suppose.
>
> There's no reason the Sparc interfaces can't take phandles since they
> are just ints, and that would make the call signatures of these
> functions compatible with the types used by the other architectures.
You're saying to convert the sparc code to use phandles? Doing so has
caused phandles to show up in asm/openprom.h (linux_dev_v2_funcs's
v2_inst2pkg returns a phandle, and linux_nodeops use phandles). This
is fine, except asm/openprom.h is an exported kernel header, and
linux/of.h is not.
I'm tempted to break the phandle/device_node/property stuff out into a
separate header (that gets exported), and include that from linux/of.h
and asm/openprom.h.
WARNING: multiple messages have this Message-ID (diff)
From: Andres Salomon <dilinger@queued.net>
To: David Miller <davem@davemloft.net>
Cc: grant.likely@secretlab.ca, devicetree-discuss@lists.ozlabs.org,
sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] sparc: make driver/of/pdt no longer sparc-specific
Date: Mon, 16 Aug 2010 00:22:44 -0400 [thread overview]
Message-ID: <20100816002244.6ddf37e6@debxo> (raw)
In-Reply-To: <20100808.223444.62324566.davem@davemloft.net>
On Sun, 08 Aug 2010 22:34:44 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: Andres Salomon <dilinger@queued.net>
> Date: Mon, 9 Aug 2010 01:32:45 -0400
>
> > On Sun, 8 Aug 2010 23:12:21 -0600
> > Grant Likely <grant.likely@secretlab.ca> wrote:
> >
> >> If you have to explicitly cast these function pointers, then you're
> >> doing it wrong. :-) Listen to and fix the compiler complaint
> >> here.
> >>
> >
> > Hm, can you please expand on that? The reason it's necessary to
> > cast is because sparc's prom_* functions are using ints instead of
> > phandles. I don't understand why casting is the wrong thing here.
> >
> > I could write some 1-line wrapper functions that simply call prom_*
> > rather than casting, I suppose.
>
> There's no reason the Sparc interfaces can't take phandles since they
> are just ints, and that would make the call signatures of these
> functions compatible with the types used by the other architectures.
You're saying to convert the sparc code to use phandles? Doing so has
caused phandles to show up in asm/openprom.h (linux_dev_v2_funcs's
v2_inst2pkg returns a phandle, and linux_nodeops use phandles). This
is fine, except asm/openprom.h is an exported kernel header, and
linux/of.h is not.
I'm tempted to break the phandle/device_node/property stuff out into a
separate header (that gets exported), and include that from linux/of.h
and asm/openprom.h.
WARNING: multiple messages have this Message-ID (diff)
From: Andres Salomon <dilinger-pFFUokh25LWsTnJN9+BGXg@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: sparclinux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/3] sparc: make driver/of/pdt no longer sparc-specific
Date: Mon, 16 Aug 2010 00:22:44 -0400 [thread overview]
Message-ID: <20100816002244.6ddf37e6@debxo> (raw)
In-Reply-To: <20100808.223444.62324566.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Sun, 08 Aug 2010 22:34:44 -0700 (PDT)
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> wrote:
> From: Andres Salomon <dilinger-pFFUokh25LWsTnJN9+BGXg@public.gmane.org>
> Date: Mon, 9 Aug 2010 01:32:45 -0400
>
> > On Sun, 8 Aug 2010 23:12:21 -0600
> > Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
> >
> >> If you have to explicitly cast these function pointers, then you're
> >> doing it wrong. :-) Listen to and fix the compiler complaint
> >> here.
> >>
> >
> > Hm, can you please expand on that? The reason it's necessary to
> > cast is because sparc's prom_* functions are using ints instead of
> > phandles. I don't understand why casting is the wrong thing here.
> >
> > I could write some 1-line wrapper functions that simply call prom_*
> > rather than casting, I suppose.
>
> There's no reason the Sparc interfaces can't take phandles since they
> are just ints, and that would make the call signatures of these
> functions compatible with the types used by the other architectures.
You're saying to convert the sparc code to use phandles? Doing so has
caused phandles to show up in asm/openprom.h (linux_dev_v2_funcs's
v2_inst2pkg returns a phandle, and linux_nodeops use phandles). This
is fine, except asm/openprom.h is an exported kernel header, and
linux/of.h is not.
I'm tempted to break the phandle/device_node/property stuff out into a
separate header (that gets exported), and include that from linux/of.h
and asm/openprom.h.
next prev parent reply other threads:[~2010-08-16 4:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 3:11 [PATCH 2/3] sparc: make driver/of/pdt no longer sparc-specific Andres Salomon
2010-08-09 3:11 ` Andres Salomon
2010-08-09 5:12 ` Grant Likely
2010-08-09 5:12 ` Grant Likely
2010-08-09 5:12 ` Grant Likely
2010-08-09 5:32 ` Andres Salomon
2010-08-09 5:32 ` Andres Salomon
2010-08-09 5:32 ` Andres Salomon
2010-08-09 5:34 ` David Miller
2010-08-09 5:34 ` David Miller
[not found] ` <20100808.223444.62324566.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-08-16 4:22 ` Andres Salomon [this message]
2010-08-16 4:22 ` Andres Salomon
2010-08-16 4:22 ` Andres Salomon
2010-08-16 6:17 ` David Miller
2010-08-16 6:17 ` David Miller
[not found] ` <20100809013245.1cefb9bf-ztAUm9HJea/EueBKFXcDjA@public.gmane.org>
2010-08-09 5:41 ` Grant Likely
2010-08-09 5:41 ` Grant Likely
2010-08-09 5:41 ` 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=20100816002244.6ddf37e6@debxo \
--to=dilinger@queued.net \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sparclinux-u79uwXL29TY76Z2rM5mHXA@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.