Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4982263yba; Wed, 10 Apr 2019 08:53:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxe4Y5K2L1kOmDSpH24TPxqizUkAUgcaj4/pvekcrMnq2qF06iUz/LHSOXGO80c2JDKVPtQ X-Received: by 2002:a17:902:b407:: with SMTP id x7mr45580489plr.288.1554911622481; Wed, 10 Apr 2019 08:53:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554911622; cv=none; d=google.com; s=arc-20160816; b=QnyvE/X0gxCdvxJ6hb1G9wVXFBn16cZOAgXSWMfPfOTiX0BL74EwrzLr6iVlQ19aSp jppgZzEJe+ooF5G+NnR3+E2UPSZVZh2VNxgrN09cvdJAgPSSaU8dNUm3aETW1SnevHzA 9SLDpoTx7wNenflHr4iXej+0j4Y5y2KuMrOzuo7jYhI21H3GLfY1r7tbU3qxoxloKoMU WX8TP07HNRQ3OZf1ZWz3F6xLpbhhc9VHsQLPb5LaDjNKv37FY9PhrTKw6HDQHD7FIMaD Me0v35fXgAgN89ZRLwOBTFd3q+nbilebNDEJZQcbghoRbvpSHvlmqm/mLPzEo0fQK6rK DpPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=rsP1dfdKasX2t7VPk4Ziwm+WXTjNyqcSt34NVMJBzh4=; b=SXChoWYqRPtb9MO8aY+KY9KYBKHlfbKGUIytrNwTV+UdmLpr7jQsQ701oi/k+zQFGv jTgjNo9gWWesL0dIATiVZR5wvXcgQoFSv2m2gaqahWrkQAukTnT7DpR3IygL13WHrZ1m YuCbZXGuG1EZurtYacdJzMRhay5phoogqIDMkiH+v58SrPFqLh71UJQ50UPOOmqLfz0H BAnLn5/JyDz4yD0zrZo5WHnSqMjv0VfTvK7I+Yswnpr4pG3V0Ly5S5FZnsGoLBNns+IF pPiWlDViHugSv8/e/4aJUR1JEAuIgDGxFgHmF278Jsc/CUdbe8xRh4OLVo3NFnMqvncM nQIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si6700437pgf.519.2019.04.10.08.53.26; Wed, 10 Apr 2019 08:53:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730644AbfDJMWg (ORCPT + 99 others); Wed, 10 Apr 2019 08:22:36 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6141 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727497AbfDJMWg (ORCPT ); Wed, 10 Apr 2019 08:22:36 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 5F8318B7C3622181CB30; Wed, 10 Apr 2019 20:22:34 +0800 (CST) Received: from [127.0.0.1] (10.177.31.96) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.408.0; Wed, 10 Apr 2019 20:22:30 +0800 Subject: Re: [LINUX PATCH v3] spi: spi-mem: Fix build error without CONFIG_SPI_MEM To: Naga Sureshkumar Relli , , References: <1554897429-5959-1-git-send-email-naga.sureshkumar.relli@xilinx.com> CC: , , , From: YueHaibing Message-ID: <2d9cee19-a776-ad18-b8ac-6d0d1b096ad6@huawei.com> Date: Wed, 10 Apr 2019 20:22:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1554897429-5959-1-git-send-email-naga.sureshkumar.relli@xilinx.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/4/10 19:57, Naga Sureshkumar Relli wrote: > From: YueHaibing > > 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 > Signed-off-by: Naga Sureshkumar Relli > --- > Changes in v3 > - Updated the Author name > - Removed extra line between Fixes and rest of the tags > 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(-) > > 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); Here miss a Function body, right? +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); > @@ -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) > >