mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] memory: tegra: include linux/spinlock.h
@ 2018-05-25 21:11 Arnd Bergmann
  2018-05-25 21:18 ` Dmitry Osipenko
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-05-25 21:11 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Dmitry Osipenko, Arnd Bergmann
  Cc: linux-tegra, linux-kernel

The newly added code in this file causes a build error unless
we include linux/spinlock.h, at least in some configurations:

In file included from drivers/memory/tegra/mc.h:15,
                 from drivers/memory/tegra/tegra20.c:11:
include/soc/tegra/mc.h:159:2: error: unknown type name 'spinlock_t'
  spinlock_t lock;
  ^~~~~~~~~~
drivers/memory/tegra/tegra20.c: In function 'terga20_mc_hotreset_assert':
drivers/memory/tegra/tegra20.c:207:2: error: implicit declaration of function 'spin_lock_irqsave'; did you mean 'arch_local_irq_save'? [-Werror=implicit-function-declaration]
  spin_lock_irqsave(&mc->lock, flags);
  ^~~~~~~~~~~~~~~~~

Fixes: cb557757e1aa ("memory: tegra: Add Tegra20 memory controller hot resets")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/memory/tegra/tegra20.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/memory/tegra/tegra20.c b/drivers/memory/tegra/tegra20.c
index 7119e532471c..8853e21b773f 100644
--- a/drivers/memory/tegra/tegra20.c
+++ b/drivers/memory/tegra/tegra20.c
@@ -6,6 +6,7 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/spinlock.h>
 #include <dt-bindings/memory/tegra20-mc.h>
 
 #include "mc.h"
-- 
2.9.0

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

* Re: [PATCH] memory: tegra: include linux/spinlock.h
  2018-05-25 21:11 [PATCH] memory: tegra: include linux/spinlock.h Arnd Bergmann
@ 2018-05-25 21:18 ` Dmitry Osipenko
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Osipenko @ 2018-05-25 21:18 UTC (permalink / raw)
  To: Arnd Bergmann, Thierry Reding, Jonathan Hunter; +Cc: linux-tegra, linux-kernel

On 26.05.2018 00:11, Arnd Bergmann wrote:
> The newly added code in this file causes a build error unless
> we include linux/spinlock.h, at least in some configurations:
> 
> In file included from drivers/memory/tegra/mc.h:15,
>                  from drivers/memory/tegra/tegra20.c:11:
> include/soc/tegra/mc.h:159:2: error: unknown type name 'spinlock_t'
>   spinlock_t lock;
>   ^~~~~~~~~~
> drivers/memory/tegra/tegra20.c: In function 'terga20_mc_hotreset_assert':
> drivers/memory/tegra/tegra20.c:207:2: error: implicit declaration of function 'spin_lock_irqsave'; did you mean 'arch_local_irq_save'? [-Werror=implicit-function-declaration]
>   spin_lock_irqsave(&mc->lock, flags);
>   ^~~~~~~~~~~~~~~~~
> 
> Fixes: cb557757e1aa ("memory: tegra: Add Tegra20 memory controller hot resets")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/memory/tegra/tegra20.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/memory/tegra/tegra20.c b/drivers/memory/tegra/tegra20.c
> index 7119e532471c..8853e21b773f 100644
> --- a/drivers/memory/tegra/tegra20.c
> +++ b/drivers/memory/tegra/tegra20.c
> @@ -6,6 +6,7 @@
>   * published by the Free Software Foundation.
>   */
>  
> +#include <linux/spinlock.h>
>  #include <dt-bindings/memory/tegra20-mc.h>
>  
>  #include "mc.h"

Yes, the spinlock header was getting included indirectly.

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>

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

end of thread, other threads:[~2018-05-25 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-25 21:11 [PATCH] memory: tegra: include linux/spinlock.h Arnd Bergmann
2018-05-25 21:18 ` Dmitry Osipenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®