Re: [PATCH v4 3/3] drm/tinydrm: Add the dummy versions of drm_of_find_backlight functions

2017-10-02 Thread Daniel Vetter
On Sat, Sep 30, 2017 at 01:18:53PM +0800, kbuild test robot wrote:
> Hi Meghana,
> 
> [auto build test WARNING on drm/drm-next]
> [also build test WARNING on v4.14-rc2 next-20170929]
> [if your patch is applied to the wrong git tree, please drop us a note to 
> help improve the system]
> 
> url:
> https://github.com/0day-ci/linux/commits/Meghana-Madhyastha/drm-tinydrm-drm_of_find_backlight-helper/20170930-122931
> base:   git://people.freedesktop.org/~airlied/linux.git drm-next
> config: x86_64-randconfig-x017-201739 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64 
> 
> All warnings (new ones prefixed by >>):
> 
>In file included from drivers/gpu//drm/tinydrm/mi0283qt.c:15:0:
>include/drm/drm_of.h:74:1: error: expected identifier or '(' before '{' 
> token
> {
> ^
>include/drm/drm_of.h:80:1: error: expected identifier or '(' before '{' 
> token
> {
> ^
>include/drm/drm_of.h:72:40: warning: 'drm_of_find_backlight' declared 
> 'static' but never defined [-Wunused-function]
> static inline struct backlight_device *drm_of_find_backlight(
>^
> >> include/drm/drm_of.h:78:40: warning: 'devm_drm_of_find_backlight' used but 
> >> never defined
> static inline struct backlight_device *devm_drm_of_find_backlight(

You need to squash the dummy version into the patch that introduces the
first usage, otherwise compilation can fail and break bisecting. And looks
liek this doesn't compile. It takes a bit of playing around until you have
a Kconfig that hits this. Luckily 0day has constructed one for you
already.
-Daniel

>^~
> 
> vim +/devm_drm_of_find_backlight +78 include/drm/drm_of.h
> 
> 71
> 72static inline struct backlight_device *drm_of_find_backlight(
> 73struct device *dev);
>   > 74{
> 75return -EINVAL;
> 76}
> 77
>   > 78static inline struct backlight_device 
> *devm_drm_of_find_backlight(
> 79struct device 
> *dev);
> 80{
> 81return -EINVAL;
> 82}
> 83#endif
> 84
> 
> ---
> 0-DAY kernel test infrastructureOpen Source Technology Center
> https://lists.01.org/pipermail/kbuild-all   Intel Corporation



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v4 3/3] drm/tinydrm: Add the dummy versions of drm_of_find_backlight functions

2017-09-29 Thread kbuild test robot
Hi Meghana,

[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.14-rc2 next-20170929]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Meghana-Madhyastha/drm-tinydrm-drm_of_find_backlight-helper/20170930-122931
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: x86_64-randconfig-x017-201739 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu//drm/tinydrm/mi0283qt.c:15:0:
   include/drm/drm_of.h:74:1: error: expected identifier or '(' before '{' token
{
^
   include/drm/drm_of.h:80:1: error: expected identifier or '(' before '{' token
{
^
   include/drm/drm_of.h:72:40: warning: 'drm_of_find_backlight' declared 
'static' but never defined [-Wunused-function]
static inline struct backlight_device *drm_of_find_backlight(
   ^
>> include/drm/drm_of.h:78:40: warning: 'devm_drm_of_find_backlight' used but 
>> never defined
static inline struct backlight_device *devm_drm_of_find_backlight(
   ^~

vim +/devm_drm_of_find_backlight +78 include/drm/drm_of.h

71  
72  static inline struct backlight_device *drm_of_find_backlight(
73  struct device *dev);
  > 74  {
75  return -EINVAL;
76  }
77  
  > 78  static inline struct backlight_device *devm_drm_of_find_backlight(
79  struct device *dev);
80  {
81  return -EINVAL;
82  }
83  #endif
84  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v4 3/3] drm/tinydrm: Add the dummy versions of drm_of_find_backlight functions

2017-09-29 Thread Meghana Madhyastha
Add the dummy versions (function definition returning -EINVAL) of
drm_of_find_backlight and devm_drm_of_find_backlight in the #else
part of the conditional directive in drm_of.h. This is needed
for drivers where CONFIG_OF is optional.

Signed-off-by: Meghana Madhyastha 
---
Changes in v4:
-This commit was not present in the previous versions.

 include/drm/drm_of.h | 13 +
 1 file changed, 13 insertions(+)

diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h
index b2d6e0c..b11d55b 100644
--- a/include/drm/drm_of.h
+++ b/include/drm/drm_of.h
@@ -60,6 +60,7 @@ static inline int drm_of_encoder_active_endpoint(struct 
device_node *node,
 {
return -EINVAL;
 }
+
 static inline int drm_of_find_panel_or_bridge(const struct device_node *np,
  int port, int endpoint,
  struct drm_panel **panel,
@@ -67,6 +68,18 @@ static inline int drm_of_find_panel_or_bridge(const struct 
device_node *np,
 {
return -EINVAL;
 }
+
+static inline struct backlight_device *drm_of_find_backlight(
+   struct device *dev);
+{
+   return -EINVAL;
+}
+
+static inline struct backlight_device *devm_drm_of_find_backlight(
+   struct device *dev);
+{
+   return -EINVAL;
+}
 #endif
 
 static inline int drm_of_encoder_active_endpoint_id(struct device_node *node,
-- 
2.7.4

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel