diff mbox series

[LINUX,v2] spi: spi-mem: Fix build error without CONFIG_SPI_MEM

Message ID 1554875085-25350-1-git-send-email-naga.sureshkumar.relli@xilinx.com (mailing list archive)
State Superseded
Headers show
Series [LINUX,v2] spi: spi-mem: Fix build error without CONFIG_SPI_MEM | expand

Commit Message

Naga Sureshkumar Relli April 10, 2019, 5:44 a.m. UTC
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: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
---
Changes in v2
 - Added static inline to the function spi_mem_default_supports_op();
---
 include/linux/spi/spi-mem.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Mark Brown April 10, 2019, 10:31 a.m. UTC | #1
On Wed, Apr 10, 2019 at 11:14:45AM +0530, Naga Sureshkumar Relli wrote:
> 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: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>

Why is there a signed off by for YueHaibing here?  Did they write the
patch (in which case the authorship is incorrect)?

You've also got an extra blank line between the Fixes and the rest of
the tags which is unusual and might confuse some tools.
Naga Sureshkumar Relli April 10, 2019, 11:34 a.m. UTC | #2
Hi Mark,

> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: Wednesday, April 10, 2019 4:01 PM
> To: Naga Sureshkumar Relli <nagasure@xilinx.com>
> Cc: yuehaibing@huawei.com; vigneshr@ti.com; linux-kernel@vger.kernel.org; linux-
> spi@vger.kernel.org; Michal Simek <michals@xilinx.com>; nagasuresh12@gmail.com
> Subject: Re: [LINUX PATCH v2] spi: spi-mem: Fix build error without CONFIG_SPI_MEM
> 
> On Wed, Apr 10, 2019 at 11:14:45AM +0530, Naga Sureshkumar Relli wrote:
> > 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: Naga Sureshkumar Relli
> > <naga.sureshkumar.relli@xilinx.com>
> 
> Why is there a signed off by for YueHaibing here?  Did they write the patch (in which case the
> authorship is incorrect)?
Yes, YueHaibing has wrote this patch.
I will update the Author name.

> 
> You've also got an extra blank line between the Fixes and the rest of the tags which is unusual
> and might confuse some tools.
Ok I will remove that extra line.

Thanks,
Naga Sureshkumar Relli
diff mbox series

Patch

diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index eb71e9d..bf399f2 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -295,6 +295,8 @@  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 +312,9 @@  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);
 #endif /* CONFIG_SPI_MEM */
 
 int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
@@ -336,9 +341,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)