* [PATCH 1/2] dt: Add empty of_property_match_string() function
@ 2012-04-13 14:23 Thierry Reding
[not found] ` <1334327016-8949-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Thierry Reding @ 2012-04-13 14:23 UTC (permalink / raw)
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring
This commit adds an empty of_property_match_string() function for
!CONFIG_OF builds.
Signed-off-by: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
---
include/linux/of.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/of.h b/include/linux/of.h
index e3f942d..937ca14 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -361,6 +361,13 @@ static inline int of_property_read_u64(const struct device_node *np,
return -ENOSYS;
}
+static inline int of_property_match_string(struct device_node *np,
+ const char *propname,
+ const char *string)
+{
+ return -ENOSYS;
+}
+
static inline struct device_node *of_parse_phandle(struct device_node *np,
const char *phandle_name,
int index)
--
1.7.10
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] dt: Add empty of_parse_phandle_with_args() function
[not found] ` <1334327016-8949-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
@ 2012-04-13 14:23 ` Thierry Reding
2012-04-26 19:01 ` [PATCH 1/2] dt: Add empty of_property_match_string() function Thierry Reding
1 sibling, 0 replies; 9+ messages in thread
From: Thierry Reding @ 2012-04-13 14:23 UTC (permalink / raw)
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring
This commit adds an empty of_parse_phandle_with_args() function for
!CONFIG_OF builds.
Signed-off-by: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
---
include/linux/of.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/linux/of.h b/include/linux/of.h
index 937ca14..bd52d83 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -375,6 +375,15 @@ static inline struct device_node *of_parse_phandle(struct device_node *np,
return NULL;
}
+static inline int of_parse_phandle_with_args(struct device_node *np,
+ const char *list_name,
+ const char *cells_name,
+ int index,
+ struct of_phandle_args *out_args)
+{
+ return -ENOSYS;
+}
+
static inline int of_alias_get_id(struct device_node *np, const char *stem)
{
return -ENOSYS;
--
1.7.10
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] dt: Add empty of_property_match_string() function
[not found] ` <1334327016-8949-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-13 14:23 ` [PATCH 2/2] dt: Add empty of_parse_phandle_with_args() function Thierry Reding
@ 2012-04-26 19:01 ` Thierry Reding
[not found] ` <20120426190112.GA28018-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
1 sibling, 1 reply; 9+ messages in thread
From: Thierry Reding @ 2012-04-26 19:01 UTC (permalink / raw)
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring
[-- Attachment #1.1: Type: text/plain, Size: 240 bytes --]
* Thierry Reding wrote:
> This commit adds an empty of_property_match_string() function for
> !CONFIG_OF builds.
Grant, Rob,
can these two patches be queued for 3.5? I need them to build the PWM
subsystem for !OF builds.
Thanks,
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] dt: Add empty of_property_match_string() function
[not found] ` <20120426190112.GA28018-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
@ 2012-04-27 16:45 ` Grant Likely
2012-04-27 20:41 ` Thierry Reding
0 siblings, 1 reply; 9+ messages in thread
From: Grant Likely @ 2012-04-27 16:45 UTC (permalink / raw)
To: Thierry Reding, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Rob Herring
On Thu, 26 Apr 2012 21:01:12 +0200, Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org> wrote:
> * Thierry Reding wrote:
> > This commit adds an empty of_property_match_string() function for
> > !CONFIG_OF builds.
>
> Grant, Rob,
>
> can these two patches be queued for 3.5? I need them to build the PWM
> subsystem for !OF builds.
I could merge them, but can you point me at the code that needs them?
I get a little nervous when OF-specific stretches of code get compiled
when !CONFIG_OF. In a lot of cases the OF data decoding should be in
a separate function that gets completely selected out. That isn't
always the case of course, but I do like to put a bit of back-pressure
on this issue.
g.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] dt: Add empty of_property_match_string() function
2012-04-27 16:45 ` Grant Likely
@ 2012-04-27 20:41 ` Thierry Reding
[not found] ` <20120427204154.GA12617-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Thierry Reding @ 2012-04-27 20:41 UTC (permalink / raw)
To: Grant Likely; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring
[-- Attachment #1.1: Type: text/plain, Size: 1312 bytes --]
* Grant Likely wrote:
> On Thu, 26 Apr 2012 21:01:12 +0200, Thierry Reding <thierry.reding@avionic-design.de> wrote:
> > * Thierry Reding wrote:
> > > This commit adds an empty of_property_match_string() function for
> > > !CONFIG_OF builds.
> >
> > Grant, Rob,
> >
> > can these two patches be queued for 3.5? I need them to build the PWM
> > subsystem for !OF builds.
>
> I could merge them, but can you point me at the code that needs them?
> I get a little nervous when OF-specific stretches of code get compiled
> when !CONFIG_OF. In a lot of cases the OF data decoding should be in
> a separate function that gets completely selected out. That isn't
> always the case of course, but I do like to put a bit of back-pressure
> on this issue.
The latest series for the PWM subsystem is here[0]. However that version
doesn't contain the latest changes that require this. I haven't pushed those
changes yet because they cause the build to fail (because of these two
missing patches).
Arnd Bergmann recommended to not #ifdef the CONFIG_OF code out but instead
use the IS_ENABLED(CONFIG_OF) construct and let the compiler's DCE handle
this so that we get full compile coverage for the code, even in !OF
configurations.
Thierry
[0]: http://gitorious.org/linux-pwm/linux-pwm
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] dt: Add empty of_property_match_string() function
[not found] ` <20120427204154.GA12617-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
@ 2012-04-27 20:53 ` Thierry Reding
[not found] ` <20120427205307.GA16099-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Thierry Reding @ 2012-04-27 20:53 UTC (permalink / raw)
To: Grant Likely; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring
[-- Attachment #1.1: Type: text/plain, Size: 457 bytes --]
* Thierry Reding wrote:
> The latest series for the PWM subsystem is here[0]. However that version
> doesn't contain the latest changes that require this. I haven't pushed those
> changes yet because they cause the build to fail (because of these two
> missing patches).
I just pushed the latest code to the for-next branch. That's the state that I
was going to submit during the 3.5 merge window.
Thierry
> [0]: http://gitorious.org/linux-pwm/linux-pwm
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] dt: Add empty of_property_match_string() function
[not found] ` <20120427205307.GA16099-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
@ 2012-06-01 5:59 ` Thierry Reding
[not found] ` <20120601055920.GA15874-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Thierry Reding @ 2012-06-01 5:59 UTC (permalink / raw)
To: Grant Likely; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring
[-- Attachment #1.1: Type: text/plain, Size: 1393 bytes --]
* Thierry Reding wrote:
> * Thierry Reding wrote:
> > The latest series for the PWM subsystem is here[0]. However that version
> > doesn't contain the latest changes that require this. I haven't pushed those
> > changes yet because they cause the build to fail (because of these two
> > missing patches).
>
> I just pushed the latest code to the for-next branch. That's the state that I
> was going to submit during the 3.5 merge window.
>
> Thierry
>
> > [0]: http://gitorious.org/linux-pwm/linux-pwm
Hi Grant,
Do you have any comments on this? I really want the PWM subsystem to go into
3.6, and for that to happen we need to find a solution for this. As I stated
previously the empty functions are needed to compile the PWM core in !OF
configurations.
Usually this would be solved by just #ifdef'ing the corresponding code, but
with the recent introduction of the config_enabled() and IS_ENABLED() macros
there seems to be a move to replace #ifdef usage with those in order to have
the corresponding code compile-checked in all configurations and have the
compiler throw away the unused code.
I believe that this is a good thing, but it will required these empty OF
functions to be added. If you don't find this an acceptable solution, please
let me know and I'll convert the OF-specific code in the PWM core to use
#ifdef instead.
Thanks,
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] dt: Add empty of_property_match_string() function
[not found] ` <20120601055920.GA15874-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
@ 2012-06-13 7:02 ` Thierry Reding
[not found] ` <20120613070256.GB5670-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Thierry Reding @ 2012-06-13 7:02 UTC (permalink / raw)
To: Grant Likely; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring
[-- Attachment #1.1: Type: text/plain, Size: 1549 bytes --]
On Fri, Jun 01, 2012 at 07:59:20AM +0200, Thierry Reding wrote:
> * Thierry Reding wrote:
> > * Thierry Reding wrote:
> > > The latest series for the PWM subsystem is here[0]. However that version
> > > doesn't contain the latest changes that require this. I haven't pushed those
> > > changes yet because they cause the build to fail (because of these two
> > > missing patches).
> >
> > I just pushed the latest code to the for-next branch. That's the state that I
> > was going to submit during the 3.5 merge window.
> >
> > Thierry
> >
> > > [0]: http://gitorious.org/linux-pwm/linux-pwm
>
> Hi Grant,
>
> Do you have any comments on this? I really want the PWM subsystem to go into
> 3.6, and for that to happen we need to find a solution for this. As I stated
> previously the empty functions are needed to compile the PWM core in !OF
> configurations.
>
> Usually this would be solved by just #ifdef'ing the corresponding code, but
> with the recent introduction of the config_enabled() and IS_ENABLED() macros
> there seems to be a move to replace #ifdef usage with those in order to have
> the corresponding code compile-checked in all configurations and have the
> compiler throw away the unused code.
>
> I believe that this is a good thing, but it will required these empty OF
> functions to be added. If you don't find this an acceptable solution, please
> let me know and I'll convert the OF-specific code in the PWM core to use
> #ifdef instead.
Grant, Rob,
any update on this?
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] dt: Add empty of_property_match_string() function
[not found] ` <20120613070256.GB5670-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
@ 2012-06-13 15:20 ` Rob Herring
0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2012-06-13 15:20 UTC (permalink / raw)
To: Thierry Reding; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
On 06/13/2012 02:02 AM, Thierry Reding wrote:
> On Fri, Jun 01, 2012 at 07:59:20AM +0200, Thierry Reding wrote:
>> * Thierry Reding wrote:
>>> * Thierry Reding wrote:
>>>> The latest series for the PWM subsystem is here[0]. However that version
>>>> doesn't contain the latest changes that require this. I haven't pushed those
>>>> changes yet because they cause the build to fail (because of these two
>>>> missing patches).
>>>
>>> I just pushed the latest code to the for-next branch. That's the state that I
>>> was going to submit during the 3.5 merge window.
>>>
>>> Thierry
>>>
>>>> [0]: http://gitorious.org/linux-pwm/linux-pwm
>>
>> Hi Grant,
>>
>> Do you have any comments on this? I really want the PWM subsystem to go into
>> 3.6, and for that to happen we need to find a solution for this. As I stated
>> previously the empty functions are needed to compile the PWM core in !OF
>> configurations.
>>
>> Usually this would be solved by just #ifdef'ing the corresponding code, but
>> with the recent introduction of the config_enabled() and IS_ENABLED() macros
>> there seems to be a move to replace #ifdef usage with those in order to have
>> the corresponding code compile-checked in all configurations and have the
>> compiler throw away the unused code.
>>
>> I believe that this is a good thing, but it will required these empty OF
>> functions to be added. If you don't find this an acceptable solution, please
>> let me know and I'll convert the OF-specific code in the PWM core to use
>> #ifdef instead.
>
> Grant, Rob,
>
> any update on this?
>
I agree with your comments, and every other OF function you are using
has an empty version already, so for both patches:
Acked-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
You can merge these with PWM support since you are dependent on it.
Rob
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-06-13 15:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 14:23 [PATCH 1/2] dt: Add empty of_property_match_string() function Thierry Reding
[not found] ` <1334327016-8949-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-13 14:23 ` [PATCH 2/2] dt: Add empty of_parse_phandle_with_args() function Thierry Reding
2012-04-26 19:01 ` [PATCH 1/2] dt: Add empty of_property_match_string() function Thierry Reding
[not found] ` <20120426190112.GA28018-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-04-27 16:45 ` Grant Likely
2012-04-27 20:41 ` Thierry Reding
[not found] ` <20120427204154.GA12617-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-04-27 20:53 ` Thierry Reding
[not found] ` <20120427205307.GA16099-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-06-01 5:59 ` Thierry Reding
[not found] ` <20120601055920.GA15874-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-06-13 7:02 ` Thierry Reding
[not found] ` <20120613070256.GB5670-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-06-13 15:20 ` Rob Herring
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.