Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4983049yba; Wed, 10 Apr 2019 08:54:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMxOKwl1sn6thxEUVTlT004d8xQ9UpBexQzcVNUY1KRWpU3bOFXfgBdt1w4bieQMls2yKB X-Received: by 2002:a63:3185:: with SMTP id x127mr42070755pgx.299.1554911680100; Wed, 10 Apr 2019 08:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554911680; cv=none; d=google.com; s=arc-20160816; b=JTP4rUFhYNrDcFYeRMwtjDjLgxMDSFGGUepNM3IyIzjhI+53Rnxhld4pDckz9/o3wN l79RHK1eAu5k1p4OLtvngJro3ICP+jHZd35aE68OInsN5goFUgZY6KdMzEJbMSRmrWDJ 13Tcp7aZBG1fs7Heqg1uQO0kf6fxxFfHXiZRnNl6itG+mh8XKnP/8ezgEqVfHFkrnBP6 H+vyRRx8bFbV2MMtDsQWXw/WeHrG1qKHIdA3OqAupwgdNyCzH0EAGKZ8BBRKMH45V3M+ bg1TOsOhu1UN2ZFwxCBRKkM2h+6ZqvrwrYqxcc8O1+nsW7uUYkWY0sNXMphbF9q6uOQf 9CqA== 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=mbPZfnAcubRXX3idZiLguulhP01XlORsst0DByyBS54=; b=wIubvvalMhMaNWoA5QwXvLdxJcjuR+UXpwHccPwqVpvqp8wwRNpq5l69LjpSUTxblC /iWtkPSbcgp/boAvX12p10yQn/qxskgt1w5GHV0h2OpkvhbEJ200PK1eXuotNfkc8/AE mO+GdrfIqB4Dd+S/6tbVHw/xqzJqCSLuPYa/C1g4nFpriJOjgHnc2BcWXmU7umuESpDj nRa9nIobwcLvM632NMkgZTlZ4NCF/qn3CeJO9QotFsmb8Tdf4ejpt24REDBStoWH3FMG zkNFwxcbrMrFSxztqQAhQkJ8BqXs62HSWFFbzST4w5bxuHu+dQmsje9gawU1Lmmd5+gF QBTw== 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 cf15si19946190plb.359.2019.04.10.08.54.23; Wed, 10 Apr 2019 08:54:40 -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 S1731676AbfDJMUh (ORCPT + 99 others); Wed, 10 Apr 2019 08:20:37 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:42298 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727497AbfDJMUh (ORCPT ); Wed, 10 Apr 2019 08:20:37 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id CB177365FD8213AFB144; Wed, 10 Apr 2019 20:20:34 +0800 (CST) Received: from [127.0.0.1] (10.177.31.96) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.408.0; Wed, 10 Apr 2019 20:20:33 +0800 Subject: Re: [PATCH v2] spi: spi-mem: Fix build error without CONFIG_SPI_MEM To: , References: <20190408143949.10688-1-yuehaibing@huawei.com> <20190410121341.17560-1-yuehaibing@huawei.com> CC: , , From: YueHaibing Message-ID: <31c64408-a290-4135-ec33-0401133dbfef@huawei.com> Date: Wed, 10 Apr 2019 20:20:32 +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: <20190410121341.17560-1-yuehaibing@huawei.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 Well, Naga Sureshkumar Relli has post new patch based this, Pls ignore this. On 2019/4/10 20:13, Yue Haibing 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 > --- > 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) > >