device property: Add a note to the fwnode.h
Subsystems (3)
Andy Shevchenko
reviewerPATCH 1/1 device property: Add a note to the fwnode.h
Add a note to the fwnode.h that the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.
--- include/linux/fwnode.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/linux/fwnode.h +6 -0
@@ -2,6 +2,12 @@/* * fwnode.h - Firmware device node object handle type definition. * +* Note, this header is not meant to be used by the leaf drivers. +* It provides the low level data types and definitions for the firmware +* and device property providers. The respective API headers should +* guarantee all the required data types and definitions without including +* this header directly. +* * Copyright (C) 2015, Intel Corporation * Author: Rafael J. Wysocki <[email protected]> */
Signature · 1 line
2.47.2
Andy Shevchenko
reviewerQuoted 3 lines · Andy Shevchenko
Add a note to the
fwnode.hthat the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.
I re-read it and it's ambiguous, I fixed this in v2 that has been just sent.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Rafael J. Wysocki
maintainerQuoted 4 lines · Andy Shevchenko
Add a note to the
fwnode.hthat the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.
This sounds like a solution to a problem, but the problem statement is missing.
What's your motivation?
Quoted 26 lines
Signed-off-by Andy Shevchenko <[email protected]>--- include/linux/fwnode.h | 6 ++++++ 1 file changed, 6 insertions(+)include/linux/fwnode.h +6
-1@@ -2,6 +2,12 @@/* * fwnode.h - Firmware device node object handle type definition. * +* Note, this header is not meant to be used by the leaf drivers. +* It provides the low level data types and definitions for the firmware +* and device property providers. The respective API headers should +* guarantee all the required data types and definitions without including +* this header directly. +* * Copyright (C) 2015, Intel Corporation * Author: Rafael J. Wysocki <[email protected]> */ --2.47.2
Andy Shevchenko
reviewerQuoted 10 lines · Rafael J. Wysocki
Quoted 4 lines · Andy Shevchenko
Add a note to the
fwnode.hthat the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.This sounds like a solution to a problem, but the problem statement is missing.
What's your motivation?
Found a few drivers that are mistakenly include fwnode.h while they meant to have either of.h or more likely property.h.
...
Quoted 5 lines
Quoted 5 lines
+ * Note, this header is not meant to be used by the leaf drivers.
+ * It provides the low level data types and definitions for the firmware
+ * and device property providers. The respective API headers should
+ * guarantee all the required data types and definitions without including
+ * this header directly.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Rafael J. Wysocki
maintainerQuoted 9 lines · Andy Shevchenko
Quoted 7 lines · Rafael J. Wysocki
Quoted 4 lines · Andy Shevchenko
Add a note to the
fwnode.hthat the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.
Quoted 6 lines
Quoted 3 lines
This sounds like a solution to a problem, but the problem statement is missing.
What's your motivation?
Found a few drivers that are mistakenly include
fwnode.hwhile they meant to have eitherof.hor more likelyproperty.h.
I see.
I would then say
"This header file provides low-level data types and definitions for firmware and device property providers. The respective API header files supplied by them should contain all of the requisite data types and definitions for end users, so including it directly should not be necessary."
And I would mention that the purpose is to give guidance to driver writers to avoid repeating a common mistake.
Quoted 10 lines
...
Quoted 5 lines
Quoted 5 lines
+ * Note, this header is not meant to be used by the leaf drivers.
+ * It provides the low level data types and definitions for the firmware
+ * and device property providers. The respective API headers should
+ * guarantee all the required data types and definitions without including
+ * this header directly.--
Andy Shevchenko
reviewerQuoted 21 lines · Rafael J. Wysocki
Quoted 8 lines · Andy Shevchenko
Quoted 7 lines · Rafael J. Wysocki
Quoted 4 lines · Andy Shevchenko
Add a note to the
fwnode.hthat the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.Quoted 6 lines
Quoted 3 lines
This sounds like a solution to a problem, but the problem statement is missing.
What's your motivation?
Found a few drivers that are mistakenly include
fwnode.hwhile they meant to have eitherof.hor more likelyproperty.h.I see.
I would then say
Quoted 8 lines
"This header file provides low-level data types and definitions for firmware and device property providers. The respective API header files supplied by them should contain all of the requisite data types and definitions for end users, so including it directly should not be necessary."
And I would mention that the purpose is to give guidance to driver writers to avoid repeating a common mistake.
A-ha, thanks for the suggestion, since there is also a v2, which almost the same, I will incorporate it into v3.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 6 lines · Andy Shevchenko
Add a note to the
fwnode.hthat the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.Signed-off-by Andy Shevchenko <[email protected]>
Quoted 25 lines
--- include/linux/fwnode.h | 6 ++++++ 1 file changed, 6 insertions(+)include/linux/fwnode.h +6
-1@@ -2,6 +2,12 @@/* * fwnode.h - Firmware device node object handle type definition. * +* Note, this header is not meant to be used by the leaf drivers. +* It provides the low level data types and definitions for the firmware +* and device property providers. The respective API headers should +* guarantee all the required data types and definitions without including +* this header directly. +* * Copyright (C) 2015, Intel Corporation * Author: Rafael J. Wysocki <[email protected]> */ --2.47.2
Andy Shevchenko
reviewerQuoted 10 lines · Rafael J. Wysocki
Quoted 6 lines · Andy Shevchenko
Add a note to the
fwnode.hthat the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Rafael J. Wysocki <[email protected]>
Thank you, but you already commented on this and proposed the better wording which is in v2. So, what should I do now?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Rafael J. Wysocki
maintainerQuoted 9 lines · Andy Shevchenko
Quoted 7 lines · Rafael J. Wysocki
Quoted 5 lines · Andy Shevchenko
Add a note to the
fwnode.hthat the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Rafael J. Wysocki <[email protected]>Thank you, but you already commented on this and proposed the better wording which is in v2. So, what should I do now?
The tag is for the v2, sorry. Let me add it there.
Rafael J. Wysocki
maintainerQuoted 12 lines · Rafael J. Wysocki
Quoted 9 lines · Andy Shevchenko
Quoted 7 lines · Rafael J. Wysocki
Quoted 5 lines · Andy Shevchenko
Add a note to the
fwnode.hthat the header should not be used directly in the leaf drivers, they all should use the higher level APIs and the respective headers.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Rafael J. Wysocki <[email protected]>Thank you, but you already commented on this and proposed the better wording which is in v2. So, what should I do now?
The tag is for the v2, sorry. Let me add it there.
For the v3 rather, but never mind. Already sent.