linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER
@ 2015-12-01 15:34 Nishanth Menon
  2015-12-01 15:56 ` kbuild test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nishanth Menon @ 2015-12-01 15:34 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: linux-kernel, linux-omap, linux-arm-kernel, Nishanth Menon

When CONFIG_RESET_CONTROLLER is not defined (example COMPILE_TEST),
provide a dummy static inline implementation.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 include/linux/reset-controller.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h
index ce6b962ffed4..4badecb2619e 100644
--- a/include/linux/reset-controller.h
+++ b/include/linux/reset-controller.h
@@ -48,7 +48,16 @@ struct reset_controller_dev {
 	unsigned int nr_resets;
 };
 
+#if IS_ENABLED(CONFIG_RESET_CONTROLLER)
 int reset_controller_register(struct reset_controller_dev *rcdev);
 void reset_controller_unregister(struct reset_controller_dev *rcdev);
+#else
+static inline int reset_controller_register(struct reset_controller_dev *r)
+{
+	return -EINVAL;
+}
 
+static inline void reset_controller_unregister(struct reset_controller_dev *r)
+{
+}
 #endif
-- 
2.6.2.402.g2635c2b


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER
  2015-12-01 15:34 [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER Nishanth Menon
@ 2015-12-01 15:56 ` kbuild test robot
  2015-12-01 16:07   ` Nishanth Menon
  2015-12-01 16:38 ` [PATCH V2] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER is not set Nishanth Menon
  2015-12-01 20:20 ` [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER kbuild test robot
  2 siblings, 1 reply; 5+ messages in thread
From: kbuild test robot @ 2015-12-01 15:56 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: kbuild-all, Philipp Zabel, linux-kernel, linux-omap,
	linux-arm-kernel, Nishanth Menon

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

Hi Nishanth,

[auto build test ERROR on v4.4-rc3]
[also build test ERROR on next-20151127]

url:    https://github.com/0day-ci/linux/commits/Nishanth-Menon/reset-Introduce-static-inline-dummy-function-when-CONFIG_RESET_CONTROLLER/20151201-233708
config: i386-randconfig-n0-201548 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from drivers/reset/core.c:18:0:
>> include/linux/reset-controller.h:1:0: error: unterminated #ifndef
    #ifndef _LINUX_RESET_CONTROLLER_H_
    ^

vim +1 include/linux/reset-controller.h

61fc4131 Philipp Zabel 2012-11-19 @1  #ifndef _LINUX_RESET_CONTROLLER_H_
61fc4131 Philipp Zabel 2012-11-19  2  #define _LINUX_RESET_CONTROLLER_H_
61fc4131 Philipp Zabel 2012-11-19  3  
61fc4131 Philipp Zabel 2012-11-19  4  #include <linux/list.h>

:::::: The code at line 1 was first introduced by commit
:::::: 61fc41317666be400802ac793f47de816ef7bd57 reset: Add reset controller API

:::::: TO: Philipp Zabel <p.zabel@pengutronix.de>
:::::: CC: Philipp Zabel <p.zabel@pengutronix.de>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 19727 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER
  2015-12-01 15:56 ` kbuild test robot
@ 2015-12-01 16:07   ` Nishanth Menon
  0 siblings, 0 replies; 5+ messages in thread
From: Nishanth Menon @ 2015-12-01 16:07 UTC (permalink / raw)
  To: kbuild test robot, Nishanth Menon
  Cc: linux-kernel, kbuild-all, Philipp Zabel, linux-omap, linux-arm-kernel

On 12/01/2015 09:56 AM, kbuild test robot wrote:
> Hi Nishanth,
> 
> [auto build test ERROR on v4.4-rc3]
> [also build test ERROR on next-20151127]
> 
> url:    https://github.com/0day-ci/linux/commits/Nishanth-Menon/reset-Introduce-static-inline-dummy-function-when-CONFIG_RESET_CONTROLLER/20151201-233708
> config: i386-randconfig-n0-201548 (attached as .config)
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from drivers/reset/core.c:18:0:
>>> include/linux/reset-controller.h:1:0: error: unterminated #ifndef
>     #ifndef _LINUX_RESET_CONTROLLER_H_
>     ^

Uggh.. thanks kbot... :).. my bad.. last minute whitespace editscan end
up deleting #endifs  :(

While at it, will fix $subject as well.

-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH V2] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER is not set
  2015-12-01 15:34 [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER Nishanth Menon
  2015-12-01 15:56 ` kbuild test robot
@ 2015-12-01 16:38 ` Nishanth Menon
  2015-12-01 20:20 ` [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER kbuild test robot
  2 siblings, 0 replies; 5+ messages in thread
From: Nishanth Menon @ 2015-12-01 16:38 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: linux-kernel, linux-omap, linux-arm-kernel, Nishanth Menon

When CONFIG_RESET_CONTROLLER is not defined (example COMPILE_TEST),
provide a dummy static inline implementation.

Signed-off-by: Nishanth Menon <nm@ti.com>
---

V2: Thanks to kbot, I realized i messed up the patch -> hopefully, this revision
has better luck.

V1: https://patchwork.kernel.org/patch/7738191/

 include/linux/reset-controller.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h
index ce6b962ffed4..e294565540db 100644
--- a/include/linux/reset-controller.h
+++ b/include/linux/reset-controller.h
@@ -48,7 +48,18 @@ struct reset_controller_dev {
 	unsigned int nr_resets;
 };
 
+#if IS_ENABLED(CONFIG_RESET_CONTROLLER)
 int reset_controller_register(struct reset_controller_dev *rcdev);
 void reset_controller_unregister(struct reset_controller_dev *rcdev);
+#else
+static inline int reset_controller_register(struct reset_controller_dev *r)
+{
+	return -EINVAL;
+}
+
+static inline void reset_controller_unregister(struct reset_controller_dev *r)
+{
+}
+#endif	/* IS_ENABLED(CONFIG_RESET_CONTROLLER) */
 
 #endif
-- 
2.6.2.402.g2635c2b


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER
  2015-12-01 15:34 [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER Nishanth Menon
  2015-12-01 15:56 ` kbuild test robot
  2015-12-01 16:38 ` [PATCH V2] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER is not set Nishanth Menon
@ 2015-12-01 20:20 ` kbuild test robot
  2 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2015-12-01 20:20 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: kbuild-all, Philipp Zabel, linux-kernel, linux-omap,
	linux-arm-kernel, Nishanth Menon

Hi Nishanth,

[auto build test WARNING on: v4.4-rc3]
[also build test WARNING on: next-20151127]

url:    https://github.com/0day-ci/linux/commits/Nishanth-Menon/reset-Introduce-static-inline-dummy-function-when-CONFIG_RESET_CONTROLLER/20151201-233708
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> include/linux/reset-controller.h:1:2: sparse: unterminated preprocessor conditional
   include/linux/compiler.h:228:8: sparse: attribute 'no_sanitize_address': unknown attribute
   In file included from drivers/reset/core.c:18:0:
   include/linux/reset-controller.h:1:0: error: unterminated #ifndef
    #ifndef _LINUX_RESET_CONTROLLER_H_
    ^
--
>> include/linux/reset-controller.h:1:2: sparse: unterminated preprocessor conditional
>> include/linux/reset-controller.h:1:2: sparse: unterminated preprocessor conditional
   include/linux/compiler.h:228:8: sparse: attribute 'no_sanitize_address': unknown attribute
   In file included from drivers/clk/qcom/reset.c:17:0:
   include/linux/reset-controller.h:1:0: error: unterminated #ifndef
    #ifndef _LINUX_RESET_CONTROLLER_H_
    ^
   In file included from drivers/clk/qcom/reset.h:17:0,
                    from drivers/clk/qcom/reset.c:20:
   include/linux/reset-controller.h:1:0: error: unterminated #ifndef
    #ifndef _LINUX_RESET_CONTROLLER_H_
    ^

vim +1 include/linux/reset-controller.h

61fc4131 Philipp Zabel 2012-11-19 @1  #ifndef _LINUX_RESET_CONTROLLER_H_
61fc4131 Philipp Zabel 2012-11-19  2  #define _LINUX_RESET_CONTROLLER_H_
61fc4131 Philipp Zabel 2012-11-19  3  
61fc4131 Philipp Zabel 2012-11-19  4  #include <linux/list.h>
61fc4131 Philipp Zabel 2012-11-19  5  
61fc4131 Philipp Zabel 2012-11-19  6  struct reset_controller_dev;
61fc4131 Philipp Zabel 2012-11-19  7  
61fc4131 Philipp Zabel 2012-11-19  8  /**
61fc4131 Philipp Zabel 2012-11-19  9   * struct reset_control_ops

:::::: The code at line 1 was first introduced by commit
:::::: 61fc41317666be400802ac793f47de816ef7bd57 reset: Add reset controller API

:::::: TO: Philipp Zabel <p.zabel@pengutronix.de>
:::::: CC: Philipp Zabel <p.zabel@pengutronix.de>

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-01 20:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-01 15:34 [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER Nishanth Menon
2015-12-01 15:56 ` kbuild test robot
2015-12-01 16:07   ` Nishanth Menon
2015-12-01 16:38 ` [PATCH V2] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER is not set Nishanth Menon
2015-12-01 20:20 ` [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).