Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1363364ybl; Thu, 22 Aug 2019 13:18:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyys7uBOi6q4kgAI2gF8+5wCDqZRAu8kI5fJhezmynDxDqWzOHK8QCbdtXM5hFEiA1KRwFH X-Received: by 2002:a17:90a:a4c5:: with SMTP id l5mr1514801pjw.49.1566505125898; Thu, 22 Aug 2019 13:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566505125; cv=none; d=google.com; s=arc-20160816; b=vA/Etqe1TEPN+0InaWnOLWG1bGDHe5Oi/DdYPRRC1uruLSiuvOoSvsLfLJUARjzoRd SGgmJ5IwCVlYR8BINh9BcmYrVNvGFiA7nKTOATl5wKGYWKZ7HQ4brcutKEsghbWILj/j ODMftOmyelD2NSYBTRMjMRXHjiwwp53DudSZe4sBV9Az8lSgzlUgzAGO0yv3Bf1F8XFv /3jcN39OfsxBR64hpCFQczhUapAXTaosgCZA0kFi4mVo67ZqXWCUvit6/w3oK/VJO/Yp GMP8FTnKxgmcjxVY9G3XsO3G4DXAejmBXtMgYjkxLYnpDKblgGA+6YKAapyw31H9mMDy WkSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=lzuXz0hYGUzz7/m+0xuJSgMYCie78EJX8FgDvL5iexM=; b=Pxc60YV9BvJLshU2M6kAVsLxAdfQm2xbyH+4xCspdiY97Ryd9ckNQhyKf9nQQqpzly smK0ZAzLwcRNDH/8B7CqDD3VuN4CJEB0i+f79Vyub/uUV68hExpy/gBmOj9ndCmGDOyB 68XXeyx9kZwVIDw9PXpP56Dbzr1inzk57yvi2L9y/z2UuPOruqpbz+7d5Jue/4yosp+k Fv8D3NOB9Mn9YES/H6K4P8iAtbyY82aXMGA0Ynb/GRZWaoHnHBni7mymZPJcTedo0IzT tMk0QjB9u20/ABFvWGP6bU5jl9h0mHdYmGNqEsd31PkNqqoKU9tWb9pOO0LabjD9CzbC pY1Q== 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 n12si233053pgi.550.2019.08.22.13.18.30; Thu, 22 Aug 2019 13:18:45 -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 S2388837AbfHVO5J (ORCPT + 99 others); Thu, 22 Aug 2019 10:57:09 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5200 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729922AbfHVO5I (ORCPT ); Thu, 22 Aug 2019 10:57:08 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3BA7652E0CFE38D2A19A; Thu, 22 Aug 2019 22:56:41 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Thu, 22 Aug 2019 22:56:35 +0800 From: YueHaibing To: , , , CC: , , YueHaibing Subject: [PATCH v2 -next] soundwire: Fix -Wunused-function warning Date: Thu, 22 Aug 2019 22:54:08 +0800 Message-ID: <20190822145408.76272-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20190816141409.49940-1-yuehaibing@huawei.com> References: <20190816141409.49940-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_ACPI is not set, gcc warning this: drivers/soundwire/slave.c:16:12: warning: 'sdw_slave_add' defined but not used [-Wunused-function] Now all code in slave.c is only used on ACPI enabled, so compiles it while CONFIG_ACPI is set. Reported-by: Hulk Robot Suggested-by: Ladislav Michl Signed-off-by: YueHaibing --- v2: use obj-$(CONFIG_ACPI) += slave.o --- drivers/soundwire/Makefile | 3 ++- drivers/soundwire/slave.c | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/soundwire/Makefile b/drivers/soundwire/Makefile index 45b7e50..a28bf3e 100644 --- a/drivers/soundwire/Makefile +++ b/drivers/soundwire/Makefile @@ -4,8 +4,9 @@ # #Bus Objs -soundwire-bus-objs := bus_type.o bus.o slave.o mipi_disco.o stream.o +soundwire-bus-objs := bus_type.o bus.o mipi_disco.o stream.o obj-$(CONFIG_SOUNDWIRE) += soundwire-bus.o +obj-$(CONFIG_ACPI) += slave.o #Cadence Objs soundwire-cadence-objs := cadence_master.o diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c index f39a581..0dc188e 100644 --- a/drivers/soundwire/slave.c +++ b/drivers/soundwire/slave.c @@ -60,7 +60,6 @@ static int sdw_slave_add(struct sdw_bus *bus, return ret; } -#if IS_ENABLED(CONFIG_ACPI) /* * sdw_acpi_find_slaves() - Find Slave devices in Master ACPI node * @bus: SDW bus instance @@ -110,5 +109,3 @@ int sdw_acpi_find_slaves(struct sdw_bus *bus) return 0; } - -#endif -- 2.7.4