All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM
@ 2019-04-08 14:39 Yue Haibing
  2019-04-09 16:30 ` Vignesh Raghavendra
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Yue Haibing @ 2019-04-08 14:39 UTC (permalink / raw)
  To: broonie, naga.sureshkumar.relli; +Cc: linux-kernel, linux-spi, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

When building with CONFIG_SPI_MEM is not set
gc warns this:

drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'

Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI controller")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 include/linux/spi/spi-mem.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index c845cd6..1941b84 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
 void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 					  const struct spi_mem_op *op,
 					  struct sg_table *sg);
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+				 const struct spi_mem_op *op);
+
 #else
 static inline int
 spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
@@ -310,6 +314,13 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 				     struct sg_table *sg)
 {
 }
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+				 const struct spi_mem_op *op)
+{
+	return false;
+}
+
 #endif /* CONFIG_SPI_MEM */
 
 int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
@@ -341,9 +352,6 @@ int spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
 
 void spi_mem_driver_unregister(struct spi_mem_driver *drv);
 
-bool spi_mem_default_supports_op(struct spi_mem *mem,
-				 const struct spi_mem_op *op);
-
 #define spi_mem_driver_register(__drv)                                  \
 	spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
 
-- 
2.7.4



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

* Re: [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM
  2019-04-08 14:39 [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM Yue Haibing
@ 2019-04-09 16:30 ` Vignesh Raghavendra
  2019-04-10  3:33   ` YueHaibing
  2019-04-10 12:13 ` [PATCH v2] " Yue Haibing
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Vignesh Raghavendra @ 2019-04-09 16:30 UTC (permalink / raw)
  To: Yue Haibing, broonie, naga.sureshkumar.relli; +Cc: linux-kernel, linux-spi

On 08/04/19 8:09 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
> 
> When building with CONFIG_SPI_MEM is not set
> gc warns this:
> 
> drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
> spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'
> 
> Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI controller")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  include/linux/spi/spi-mem.h | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
> index c845cd6..1941b84 100644
> --- a/include/linux/spi/spi-mem.h
> +++ b/include/linux/spi/spi-mem.h
> @@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
>  void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
>  					  const struct spi_mem_op *op,
>  					  struct sg_table *sg);
> +
> +bool spi_mem_default_supports_op(struct spi_mem *mem,
> +				 const struct spi_mem_op *op);
> +
>  #else
>  static inline int
>  spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
> @@ -310,6 +314,13 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
>  				     struct sg_table *sg)
>  {
>  }
> +
> +bool spi_mem_default_supports_op(struct spi_mem *mem,
> +				 const struct spi_mem_op *op)

This needs to be declared static inline to avoid multiple definitions.
Right?

> +{
> +	return false;
> +}
> +
>  #endif /* CONFIG_SPI_MEM */
>  
>  int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
> @@ -341,9 +352,6 @@ int spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
>  
>  void spi_mem_driver_unregister(struct spi_mem_driver *drv);
>  
> -bool spi_mem_default_supports_op(struct spi_mem *mem,
> -				 const struct spi_mem_op *op);
> -
>  #define spi_mem_driver_register(__drv)                                  \
>  	spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
>  
> 

-- 
Regards
Vignesh

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

* Re: [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM
  2019-04-09 16:30 ` Vignesh Raghavendra
@ 2019-04-10  3:33   ` YueHaibing
  2019-04-10  5:23     ` Naga Sureshkumar Relli
  0 siblings, 1 reply; 11+ messages in thread
From: YueHaibing @ 2019-04-10  3:33 UTC (permalink / raw)
  To: Vignesh Raghavendra, broonie, naga.sureshkumar.relli
  Cc: linux-kernel, linux-spi

On 2019/4/10 0:30, Vignesh Raghavendra wrote:
> On 08/04/19 8:09 PM, Yue Haibing wrote:
>> From: YueHaibing <yuehaibing@huawei.com>
>>
>> When building with CONFIG_SPI_MEM is not set
>> gc warns this:
>>
>> drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
>> spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'
>>
>> Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI controller")
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  include/linux/spi/spi-mem.h | 14 +++++++++++---
>>  1 file changed, 11 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
>> index c845cd6..1941b84 100644
>> --- a/include/linux/spi/spi-mem.h
>> +++ b/include/linux/spi/spi-mem.h
>> @@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
>>  void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
>>  					  const struct spi_mem_op *op,
>>  					  struct sg_table *sg);
>> +
>> +bool spi_mem_default_supports_op(struct spi_mem *mem,
>> +				 const struct spi_mem_op *op);
>> +
>>  #else
>>  static inline int
>>  spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
>> @@ -310,6 +314,13 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
>>  				     struct sg_table *sg)
>>  {
>>  }
>> +
>> +bool spi_mem_default_supports_op(struct spi_mem *mem,
>> +				 const struct spi_mem_op *op)
> 
> This needs to be declared static inline to avoid multiple definitions.
> Right?

Indeed, thanks!

> 
>> +{
>> +	return false;
>> +}
>> +
>>  #endif /* CONFIG_SPI_MEM */
>>  
>>  int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
>> @@ -341,9 +352,6 @@ int spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
>>  
>>  void spi_mem_driver_unregister(struct spi_mem_driver *drv);
>>  
>> -bool spi_mem_default_supports_op(struct spi_mem *mem,
>> -				 const struct spi_mem_op *op);
>> -
>>  #define spi_mem_driver_register(__drv)                                  \
>>  	spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
>>  
>>
> 


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

* RE: [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM
  2019-04-10  3:33   ` YueHaibing
@ 2019-04-10  5:23     ` Naga Sureshkumar Relli
  2019-04-10  5:31       ` Naga Sureshkumar Relli
  0 siblings, 1 reply; 11+ messages in thread
From: Naga Sureshkumar Relli @ 2019-04-10  5:23 UTC (permalink / raw)
  To: YueHaibing, Vignesh Raghavendra, broonie; +Cc: linux-kernel, linux-spi

Hi Vignesh,

> -----Original Message-----
> From: linux-spi-owner@vger.kernel.org <linux-spi-owner@vger.kernel.org> On Behalf Of
> YueHaibing
> Sent: Wednesday, April 10, 2019 9:03 AM
> To: Vignesh Raghavendra <vigneshr@ti.com>; broonie@kernel.org; Naga Sureshkumar Relli
> <nagasure@xilinx.com>
> Cc: linux-kernel@vger.kernel.org; linux-spi@vger.kernel.org
> Subject: Re: [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM
> 
> On 2019/4/10 0:30, Vignesh Raghavendra wrote:
> > On 08/04/19 8:09 PM, Yue Haibing wrote:
> >> From: YueHaibing <yuehaibing@huawei.com>
> >>
> >> When building with CONFIG_SPI_MEM is not set gc warns this:
> >>
> >> drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
> >> spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'
> >>
> >> Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI
> >> controller")
> >> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> >> ---
> >>  include/linux/spi/spi-mem.h | 14 +++++++++++---
> >>  1 file changed, 11 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/include/linux/spi/spi-mem.h
> >> b/include/linux/spi/spi-mem.h index c845cd6..1941b84 100644
> >> --- a/include/linux/spi/spi-mem.h
> >> +++ b/include/linux/spi/spi-mem.h
> >> @@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct
> >> spi_controller *ctlr,  void spi_controller_dma_unmap_mem_op_data(struct spi_controller
> *ctlr,
> >>  					  const struct spi_mem_op *op,
> >>  					  struct sg_table *sg);
> >> +
> >> +bool spi_mem_default_supports_op(struct spi_mem *mem,
> >> +				 const struct spi_mem_op *op);
> >> +
> >>  #else
> >>  static inline int
> >>  spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr, @@
> >> -310,6 +314,13 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
> >>  				     struct sg_table *sg)
> >>  {
> >>  }
> >> +
> >> +bool spi_mem_default_supports_op(struct spi_mem *mem,
> >> +				 const struct spi_mem_op *op)
> >
> > This needs to be declared static inline to avoid multiple definitions.
> > Right?
> 
> Indeed, thanks!
If we declare this as static inline, then we can't access that in zynq-qspi driver.
This is the error I am getting.
In file included from drivers/spi/spi-zynq-qspi.c:19:0:
./include/linux/spi/spi-mem.h:298:20: warning: ‘spi_mem_default_supports_op’ used but never defined
 static inline bool spi_mem_default_supports_op(struct spi_mem *mem,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi-zynq-qspi.c: In function ‘zynq_qspi_supports_op’:
./include/linux/spi/spi-mem.h:298:20: error: inlining failed in call to always_inline ‘spi_mem_default_supports_op’: function body not available
drivers/spi/spi-zynq-qspi.c:223:7: note: called from here
  if (!spi_mem_default_supports_op(mem, op))

Thanks,
Naga Sureshkumar Relli
> 
> >
> >> +{
> >> +	return false;
> >> +}
> >> +
> >>  #endif /* CONFIG_SPI_MEM */
> >>
> >>  int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op
> >> *op); @@ -341,9 +352,6 @@ int
> >> spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
> >>
> >>  void spi_mem_driver_unregister(struct spi_mem_driver *drv);
> >>
> >> -bool spi_mem_default_supports_op(struct spi_mem *mem,
> >> -				 const struct spi_mem_op *op);
> >> -
> >>  #define spi_mem_driver_register(__drv)                                  \
> >>  	spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
> >>
> >>
> >


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

* RE: [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM
  2019-04-10  5:23     ` Naga Sureshkumar Relli
@ 2019-04-10  5:31       ` Naga Sureshkumar Relli
  0 siblings, 0 replies; 11+ messages in thread
From: Naga Sureshkumar Relli @ 2019-04-10  5:31 UTC (permalink / raw)
  To: Naga Sureshkumar Relli, YueHaibing, Vignesh Raghavendra, broonie
  Cc: linux-kernel, linux-spi

Hi Vignesh,

> -----Original Message-----
> From: linux-spi-owner@vger.kernel.org <linux-spi-owner@vger.kernel.org> On Behalf Of
> Naga Sureshkumar Relli
> Sent: Wednesday, April 10, 2019 10:53 AM
> To: YueHaibing <yuehaibing@huawei.com>; Vignesh Raghavendra <vigneshr@ti.com>;
> broonie@kernel.org
> Cc: linux-kernel@vger.kernel.org; linux-spi@vger.kernel.org
> Subject: RE: [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM
> 
> Hi Vignesh,
> 
> > -----Original Message-----
> > From: linux-spi-owner@vger.kernel.org
> > <linux-spi-owner@vger.kernel.org> On Behalf Of YueHaibing
> > Sent: Wednesday, April 10, 2019 9:03 AM
> > To: Vignesh Raghavendra <vigneshr@ti.com>; broonie@kernel.org; Naga
> > Sureshkumar Relli <nagasure@xilinx.com>
> > Cc: linux-kernel@vger.kernel.org; linux-spi@vger.kernel.org
> > Subject: Re: [PATCH] spi: spi-mem: Fix build error without
> > CONFIG_SPI_MEM
> >
> > On 2019/4/10 0:30, Vignesh Raghavendra wrote:
> > > On 08/04/19 8:09 PM, Yue Haibing wrote:
> > >> From: YueHaibing <yuehaibing@huawei.com>
> > >>
> > >> When building with CONFIG_SPI_MEM is not set gc warns this:
> > >>
> > >> drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
> > >> spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'
> > >>
> > >> Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI
> > >> controller")
> > >> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > >> ---
> > >>  include/linux/spi/spi-mem.h | 14 +++++++++++---
> > >>  1 file changed, 11 insertions(+), 3 deletions(-)
> > >>
> > >> diff --git a/include/linux/spi/spi-mem.h
> > >> b/include/linux/spi/spi-mem.h index c845cd6..1941b84 100644
> > >> --- a/include/linux/spi/spi-mem.h
> > >> +++ b/include/linux/spi/spi-mem.h
> > >> @@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct
> > >> spi_controller *ctlr,  void
> > >> spi_controller_dma_unmap_mem_op_data(struct spi_controller
> > *ctlr,
> > >>  					  const struct spi_mem_op *op,
> > >>  					  struct sg_table *sg);
> > >> +
> > >> +bool spi_mem_default_supports_op(struct spi_mem *mem,
> > >> +				 const struct spi_mem_op *op);
> > >> +
> > >>  #else
> > >>  static inline int
> > >>  spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr, @@
> > >> -310,6 +314,13 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller
> *ctlr,
> > >>  				     struct sg_table *sg)
> > >>  {
> > >>  }
> > >> +
> > >> +bool spi_mem_default_supports_op(struct spi_mem *mem,
> > >> +				 const struct spi_mem_op *op)
> > >
> > > This needs to be declared static inline to avoid multiple definitions.
> > > Right?
> >
> > Indeed, thanks!
Please ignore this. I did mistake in declaring.
It compiled with out any issues using static inline.

Thanks,
Naga Sureshkumar Relli

> If we declare this as static inline, then we can't access that in zynq-qspi driver.
> This is the error I am getting.
> In file included from drivers/spi/spi-zynq-qspi.c:19:0:
> ./include/linux/spi/spi-mem.h:298:20: warning: ‘spi_mem_default_supports_op’ used but
> never defined  static inline bool spi_mem_default_supports_op(struct spi_mem *mem,
>                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/spi/spi-zynq-qspi.c: In function ‘zynq_qspi_supports_op’:
> ./include/linux/spi/spi-mem.h:298:20: error: inlining failed in call to always_inline
> ‘spi_mem_default_supports_op’: function body not available
> drivers/spi/spi-zynq-qspi.c:223:7: note: called from here
>   if (!spi_mem_default_supports_op(mem, op))
> 
> Thanks,
> Naga Sureshkumar Relli
> >
> > >
> > >> +{
> > >> +	return false;
> > >> +}
> > >> +
> > >>  #endif /* CONFIG_SPI_MEM */
> > >>
> > >>  int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op
> > >> *op); @@ -341,9 +352,6 @@ int
> > >> spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
> > >>
> > >>  void spi_mem_driver_unregister(struct spi_mem_driver *drv);
> > >>
> > >> -bool spi_mem_default_supports_op(struct spi_mem *mem,
> > >> -				 const struct spi_mem_op *op);
> > >> -
> > >>  #define spi_mem_driver_register(__drv)                                  \
> > >>  	spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
> > >>
> > >>
> > >


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

* [PATCH v2] spi: spi-mem: Fix build error without CONFIG_SPI_MEM
  2019-04-08 14:39 [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM Yue Haibing
  2019-04-09 16:30 ` Vignesh Raghavendra
@ 2019-04-10 12:13 ` Yue Haibing
  2019-04-10 12:20   ` YueHaibing
  2019-04-10 12:26   ` Mark Brown
  2019-05-02  2:19   ` Mark Brown
  3 siblings, 1 reply; 11+ messages in thread
From: Yue Haibing @ 2019-04-10 12:13 UTC (permalink / raw)
  To: broonie, naga.sureshkumar.relli
  Cc: linux-kernel, linux-spi, vigneshr, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

When building with CONFIG_SPI_MEM is not set
gc warns this:

drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'

Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI controller")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: make stub helper static inline
---
 include/linux/spi/spi-mem.h | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index c845cd6..3d57db8 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
 void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 					  const struct spi_mem_op *op,
 					  struct sg_table *sg);
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+				 const struct spi_mem_op *op);
+
 #else
 static inline int
 spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
@@ -310,6 +314,14 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 				     struct sg_table *sg)
 {
 }
+
+static inline bool
+spi_mem_default_supports_op(struct spi_mem *mem,
+			    const struct spi_mem_op *op)
+{
+	return false;
+}
+
 #endif /* CONFIG_SPI_MEM */
 
 int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
@@ -341,9 +353,6 @@ int spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
 
 void spi_mem_driver_unregister(struct spi_mem_driver *drv);
 
-bool spi_mem_default_supports_op(struct spi_mem *mem,
-				 const struct spi_mem_op *op);
-
 #define spi_mem_driver_register(__drv)                                  \
 	spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
 
-- 
2.7.4



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

* Re: [PATCH v2] spi: spi-mem: Fix build error without CONFIG_SPI_MEM
  2019-04-10 12:13 ` [PATCH v2] " Yue Haibing
@ 2019-04-10 12:20   ` YueHaibing
  0 siblings, 0 replies; 11+ messages in thread
From: YueHaibing @ 2019-04-10 12:20 UTC (permalink / raw)
  To: broonie, naga.sureshkumar.relli; +Cc: linux-kernel, linux-spi, vigneshr

Well, Naga Sureshkumar Relli has post new patch based this, Pls ignore this.

On 2019/4/10 20:13, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
> 
> When building with CONFIG_SPI_MEM is not set
> gc warns this:
> 
> drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
> spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'
> 
> Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI controller")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> v2: make stub helper static inline
> ---
>  include/linux/spi/spi-mem.h | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
> index c845cd6..3d57db8 100644
> --- a/include/linux/spi/spi-mem.h
> +++ b/include/linux/spi/spi-mem.h
> @@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
>  void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
>  					  const struct spi_mem_op *op,
>  					  struct sg_table *sg);
> +
> +bool spi_mem_default_supports_op(struct spi_mem *mem,
> +				 const struct spi_mem_op *op);
> +
>  #else
>  static inline int
>  spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
> @@ -310,6 +314,14 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
>  				     struct sg_table *sg)
>  {
>  }
> +
> +static inline bool
> +spi_mem_default_supports_op(struct spi_mem *mem,
> +			    const struct spi_mem_op *op)
> +{
> +	return false;
> +}
> +
>  #endif /* CONFIG_SPI_MEM */
>  
>  int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
> @@ -341,9 +353,6 @@ int spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
>  
>  void spi_mem_driver_unregister(struct spi_mem_driver *drv);
>  
> -bool spi_mem_default_supports_op(struct spi_mem *mem,
> -				 const struct spi_mem_op *op);
> -
>  #define spi_mem_driver_register(__drv)                                  \
>  	spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
>  
> 


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

* Applied "spi: spi-mem: Fix build error without CONFIG_SPI_MEM" to the spi tree
  2019-04-08 14:39 [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM Yue Haibing
@ 2019-04-10 12:26   ` Mark Brown
  2019-04-10 12:13 ` [PATCH v2] " Yue Haibing
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2019-04-10 12:26 UTC (permalink / raw)
  To: YueHaibing
  Cc: broonie, linux-kernel, linux-spi, Mark Brown, naga.sureshkumar.relli

The patch

   spi: spi-mem: Fix build error without CONFIG_SPI_MEM

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 0e530e4eba5e9003af83c6afda833c64c7fcae08 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Mon, 8 Apr 2019 22:39:49 +0800
Subject: [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM

When building with CONFIG_SPI_MEM is not set
gc warns this:

drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'

Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI controller")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/linux/spi/spi-mem.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index c845cd6e22ba..1941b845aa15 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
 void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 					  const struct spi_mem_op *op,
 					  struct sg_table *sg);
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+				 const struct spi_mem_op *op);
+
 #else
 static inline int
 spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
@@ -310,6 +314,13 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 				     struct sg_table *sg)
 {
 }
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+				 const struct spi_mem_op *op)
+{
+	return false;
+}
+
 #endif /* CONFIG_SPI_MEM */
 
 int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
@@ -341,9 +352,6 @@ int spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
 
 void spi_mem_driver_unregister(struct spi_mem_driver *drv);
 
-bool spi_mem_default_supports_op(struct spi_mem *mem,
-				 const struct spi_mem_op *op);
-
 #define spi_mem_driver_register(__drv)                                  \
 	spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
 
-- 
2.20.1


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

* Applied "spi: spi-mem: Fix build error without CONFIG_SPI_MEM" to the spi tree
@ 2019-04-10 12:26   ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2019-04-10 12:26 UTC (permalink / raw)
  To: YueHaibing
  Cc: broonie, linux-kernel, linux-spi, Mark Brown, naga.sureshkumar.relli

The patch

   spi: spi-mem: Fix build error without CONFIG_SPI_MEM

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 0e530e4eba5e9003af83c6afda833c64c7fcae08 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Mon, 8 Apr 2019 22:39:49 +0800
Subject: [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM

When building with CONFIG_SPI_MEM is not set
gc warns this:

drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'

Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI controller")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/linux/spi/spi-mem.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index c845cd6e22ba..1941b845aa15 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
 void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 					  const struct spi_mem_op *op,
 					  struct sg_table *sg);
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+				 const struct spi_mem_op *op);
+
 #else
 static inline int
 spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
@@ -310,6 +314,13 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 				     struct sg_table *sg)
 {
 }
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+				 const struct spi_mem_op *op)
+{
+	return false;
+}
+
 #endif /* CONFIG_SPI_MEM */
 
 int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
@@ -341,9 +352,6 @@ int spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
 
 void spi_mem_driver_unregister(struct spi_mem_driver *drv);
 
-bool spi_mem_default_supports_op(struct spi_mem *mem,
-				 const struct spi_mem_op *op);
-
 #define spi_mem_driver_register(__drv)                                  \
 	spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
 
-- 
2.20.1

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

* Applied "spi: spi-mem: Fix build error without CONFIG_SPI_MEM" to the spi tree
  2019-04-08 14:39 [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM Yue Haibing
@ 2019-05-02  2:19   ` Mark Brown
  2019-04-10 12:13 ` [PATCH v2] " Yue Haibing
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2019-05-02  2:19 UTC (permalink / raw)
  To: YueHaibing
  Cc: broonie, linux-kernel, linux-spi, Mark Brown, naga.sureshkumar.relli

The patch

   spi: spi-mem: Fix build error without CONFIG_SPI_MEM

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 72e6841608b9ce7e04515ed43693b2878936c93a Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Mon, 8 Apr 2019 22:39:49 +0800
Subject: [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM

When building with CONFIG_SPI_MEM is not set
gc warns this:

drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'

Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI controller")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/linux/spi/spi-mem.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index c845cd6e22ba..1941b845aa15 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
 void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 					  const struct spi_mem_op *op,
 					  struct sg_table *sg);
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+				 const struct spi_mem_op *op);
+
 #else
 static inline int
 spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
@@ -310,6 +314,13 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 				     struct sg_table *sg)
 {
 }
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+				 const struct spi_mem_op *op)
+{
+	return false;
+}
+
 #endif /* CONFIG_SPI_MEM */
 
 int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
@@ -341,9 +352,6 @@ int spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
 
 void spi_mem_driver_unregister(struct spi_mem_driver *drv);
 
-bool spi_mem_default_supports_op(struct spi_mem *mem,
-				 const struct spi_mem_op *op);
-
 #define spi_mem_driver_register(__drv)                                  \
 	spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
 
-- 
2.20.1


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

* Applied "spi: spi-mem: Fix build error without CONFIG_SPI_MEM" to the spi tree
@ 2019-05-02  2:19   ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2019-05-02  2:19 UTC (permalink / raw)
  To: YueHaibing
  Cc: broonie, linux-kernel, linux-spi, Mark Brown, naga.sureshkumar.relli

The patch

   spi: spi-mem: Fix build error without CONFIG_SPI_MEM

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 72e6841608b9ce7e04515ed43693b2878936c93a Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Mon, 8 Apr 2019 22:39:49 +0800
Subject: [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM

When building with CONFIG_SPI_MEM is not set
gc warns this:

drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'

Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI controller")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/linux/spi/spi-mem.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index c845cd6e22ba..1941b845aa15 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
 void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 					  const struct spi_mem_op *op,
 					  struct sg_table *sg);
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+				 const struct spi_mem_op *op);
+
 #else
 static inline int
 spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
@@ -310,6 +314,13 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
 				     struct sg_table *sg)
 {
 }
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+				 const struct spi_mem_op *op)
+{
+	return false;
+}
+
 #endif /* CONFIG_SPI_MEM */
 
 int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
@@ -341,9 +352,6 @@ int spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
 
 void spi_mem_driver_unregister(struct spi_mem_driver *drv);
 
-bool spi_mem_default_supports_op(struct spi_mem *mem,
-				 const struct spi_mem_op *op);
-
 #define spi_mem_driver_register(__drv)                                  \
 	spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
 
-- 
2.20.1

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

end of thread, other threads:[~2019-05-02  2:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 14:39 [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM Yue Haibing
2019-04-09 16:30 ` Vignesh Raghavendra
2019-04-10  3:33   ` YueHaibing
2019-04-10  5:23     ` Naga Sureshkumar Relli
2019-04-10  5:31       ` Naga Sureshkumar Relli
2019-04-10 12:13 ` [PATCH v2] " Yue Haibing
2019-04-10 12:20   ` YueHaibing
2019-04-10 12:26 ` Applied "spi: spi-mem: Fix build error without CONFIG_SPI_MEM" to the spi tree Mark Brown
2019-04-10 12:26   ` Mark Brown
2019-05-02  2:19 ` Mark Brown
2019-05-02  2:19   ` Mark Brown

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.