Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4543339yba; Tue, 9 Apr 2019 22:58:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3eZPSzelSjgUwqA4BR/QnJbo+lPE1i7cAjGfl/uXKEw/2nyM5TmuB+S9JQdjEr4yNfxLx X-Received: by 2002:a17:902:a01:: with SMTP id 1mr13184238plo.36.1554875938807; Tue, 09 Apr 2019 22:58:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554875938; cv=none; d=google.com; s=arc-20160816; b=MDlJl31E00+ttHt4rV7VCQx1YhQtGFAhj9+RuE20bR5NQh0n5kTROH58XknSRIIAQg 5G6hjMm9aXTwjcON5lA6XAVUHILYJtZ9MTqozo/dm6+qQzkXWLpYnLbkHwp3NVRHQwrn KkIOwOD6DPJWn1eETfkEhOTZiiv1P5w8bW5vNHejlilgid6ZixMtHWs4Ii/ak2ddLpZn X+IuxWRYBJN5H92uV51w4ovPM7Bt3064FTCDvcs2pbrnn94lMOJPxBKEspIIdJd4lvdL QfudJYuJtp6ntpF8AUareFvfqsMaUMde/N+7N8j4NLpU+RYCxw+C3EXleGDAXVEAXUoi yUIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=WHUSIBIKgDFF9SRH3DqLyETeINEDD2ngjWaK1InCPwU=; b=oa/hLdWmPu+96xxoQT5cqW3sLXcre5rP3IU1ymcfACBtxKSRP6i/vyP9lhR6mqvfAV Ti0oXSS4kjzL06J/4qz3L110aA9offMt2SqW4QXGYKLfr3wJo8NdnEW+YfUfRaC47o5v 01vrWKVxP2gRsfHisy3gckdu76E1/aGovhfQaBw5i/eOpE9qQ6tVVXOvjcEkhipI6bDK I5EaC6kpMOg1Xbp/2rRV8x8Xt1nIJMefcPNTwG4fba2MmINnAmCU2gdBjhU/5mzmb4Ow QAvTKxrjuBPoJCF8b3oDOw0MfmVv9LaCFRlENkpW7ydZbG+e25yG1D3BIxxMRgcFnGTI DaEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b="YsI/Cxrd"; 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 x13si18127809pga.2.2019.04.09.22.58.41; Tue, 09 Apr 2019 22:58:58 -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; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b="YsI/Cxrd"; 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 S1727464AbfDJFpD (ORCPT + 99 others); Wed, 10 Apr 2019 01:45:03 -0400 Received: from mail-eopbgr720042.outbound.protection.outlook.com ([40.107.72.42]:55232 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726247AbfDJFpD (ORCPT ); Wed, 10 Apr 2019 01:45:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WHUSIBIKgDFF9SRH3DqLyETeINEDD2ngjWaK1InCPwU=; b=YsI/CxrdXtfgLH8w3HyXyV1IMjskwKjno9mAotO6010oyIzMWiQLtUcBPrSIQukOW1I/5g5EeiOMRhgPW/pXBIB0Ni7NsaWOZzxJ+s0hlXoxPoyIdJnZAXj2457cgOAuiUG+pljX+KUJfWQrdtGnmGz1nEuj+nS2K2MqZxZQzuU= Received: from SN4PR0201CA0041.namprd02.prod.outlook.com (2603:10b6:803:2e::27) by DM5PR02MB3829.namprd02.prod.outlook.com (2603:10b6:4:b0::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.21; Wed, 10 Apr 2019 05:44:58 +0000 Received: from BL2NAM02FT047.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::200) by SN4PR0201CA0041.outlook.office365.com (2603:10b6:803:2e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1771.16 via Frontend Transport; Wed, 10 Apr 2019 05:44:58 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT047.mail.protection.outlook.com (10.152.77.9) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1771.16 via Frontend Transport; Wed, 10 Apr 2019 05:44:57 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1hE62b-0003nh-31; Tue, 09 Apr 2019 22:44:57 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1hE62W-00084s-06; Tue, 09 Apr 2019 22:44:52 -0700 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id x3A5inLx011881; Tue, 9 Apr 2019 22:44:50 -0700 Received: from [172.23.37.108] (helo=xhdnagasure40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1hE62T-000848-C4; Tue, 09 Apr 2019 22:44:49 -0700 From: Naga Sureshkumar Relli To: , , CC: , , , , Naga Sureshkumar Relli Subject: [LINUX PATCH v2] spi: spi-mem: Fix build error without CONFIG_SPI_MEM Date: Wed, 10 Apr 2019 11:14:45 +0530 Message-ID: <1554875085-25350-1-git-send-email-naga.sureshkumar.relli@xilinx.com> X-Mailer: git-send-email 2.7.4 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(136003)(39860400002)(376002)(396003)(346002)(2980300002)(189003)(199004)(16586007)(36386004)(51416003)(316002)(2201001)(50226002)(54906003)(110136005)(48376002)(2616005)(476003)(4326008)(126002)(7696005)(305945005)(9786002)(426003)(47776003)(107886003)(5660300002)(486006)(106002)(2906002)(63266004)(336012)(36756003)(50466002)(81166006)(81156014)(8676002)(106466001)(356004)(77096007)(6666004)(478600001)(26005)(8936002)(186003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR02MB3829;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-83.xilinx.com;MX:1;A:1; MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6ddce9c8-fbd7-4369-c8b8-08d6bd77aa7d X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4709054)(2017052603328);SRVR:DM5PR02MB3829; X-MS-TrafficTypeDiagnostic: DM5PR02MB3829: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 00032065B2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: Fwhnz21+T7hxWKaeVLz5JlsY2rbsj/AmjJ2M1nSifJFMMOMNM6q6aGET25JlHTGva7yx3Ud2+TJ5QdzRqTJ5zh/rjB5cGp2ejHMIXXpOOSCUpp5NCUh42qlLX85XYT+dUMKjSNpaXvDEz51/fhkuEIj2UqPm8LmRZ1/ZmmU5LkSe9Wm/+WZavHHnzBcYTPLXM5dAPDKm7iR7pJ71T2oAGNcLpIfVkFKbFQwYQFZFmAKtUQUgut+j+uSqdn3rTrvZSxj7vnIm3N3549rjSjHkgpRFjeuX7EZZHfAvgHF2s4GURW+DiL4ejRsG5OP1whCbolalt8pUC+8YpUjkrnvNHqb4ypQ7oNJXDYjje78JGH4K+ttY061I9aByGa413XO7qbkadKhKcpBrHWH54fcNtqZRsYCNeM5JZDz0LXZidag= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2019 05:44:57.6910 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6ddce9c8-fbd7-4369-c8b8-08d6bd77aa7d X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB3829 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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); #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) -- 2.7.4