Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1105294ybl; Fri, 23 Aug 2019 13:19:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzB/3Ejt+FjsH0URNMzHckCKBpAVcZ/kY+tKu2QNw+KX+qaxNds2gyZTU2Q58XS9A0Mctb X-Received: by 2002:a65:52c5:: with SMTP id z5mr5577507pgp.118.1566591551090; Fri, 23 Aug 2019 13:19:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566591551; cv=none; d=google.com; s=arc-20160816; b=tkezt8BhX08aRwYCDCs6J1ni6GWIHKQTPw+Vi1DfpLT0wZM5xuivQRcqWOzr4UBE7O hB5R4YI8c8x5Qyj0cqc4ou1Wui3FKgfBycJtdG5UiIGwxQ/R6a4Ixw3QItHQHPxVy+2u 7it1GtbIKn3nns36ybqwYpcxRDm8POvtaTlLZwoWSF3VhbneULQ7JSk/UeLzwd+0c8W7 ZqCK2mfeIhHkY0ugG/oor9eqNpiy3XUUKYmB+s/mJLO1tSCsucq6ZtCh9pUsmz3LtjT7 0cI5LU5XAw47w8TO29XJb5Bvnu6Ag/w4rhPSD0nI14fVB/x/NndPfTNQ64urTu1tYZey 9J3w== 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=H/jdQlBFY6p+btu11TJKkVmbalErztS2OAUy8tF2WyE=; b=EDNgLB5KifNzHzL8y3ADaZXQREQnPWP//XnwlsbTuIYB/1Dlb4VF9V7ozMz/Ed6v8e qro1o+tGYn+qWnd63eVG7ir7dxWBB02XG/uhNpwmLZNU76rDfZAaxrS6p9shLpFe0JxK DclAWBHrVGoj2vz9D/dR188dYREs8KzuF9p0MAzfIWLpW2Ip+b/M+nsadq8G0bc7pc2a 1bavHn9pzlN6mwfK6AfUBr1prC4luThyGyuQM6PezozrPNQ+PfP2bD6KwsxQMtVMT3nQ BlFOjonfRLH9/WMG6P8XLM6rTl8I8SdXDJAE1IhTxil+OhcODGa6SPj8isgYTzoRHkuQ oaxg== 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 c13si2823694pgi.588.2019.08.23.13.18.55; Fri, 23 Aug 2019 13:19:11 -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 S2389577AbfHWIKu (ORCPT + 99 others); Fri, 23 Aug 2019 04:10:50 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:34422 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733287AbfHWIKt (ORCPT ); Fri, 23 Aug 2019 04:10:49 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id F2834D33158D16DFF868; Fri, 23 Aug 2019 16:10:44 +0800 (CST) Received: from [127.0.0.1] (10.133.213.239) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Fri, 23 Aug 2019 16:10:43 +0800 Subject: Re: [PATCH v2 -next] soundwire: Fix -Wunused-function warning To: Vinod Koul References: <20190816141409.49940-1-yuehaibing@huawei.com> <20190822145408.76272-1-yuehaibing@huawei.com> <20190823064417.GC2672@vkoul-mobl> CC: , , , , From: Yuehaibing Message-ID: Date: Fri, 23 Aug 2019 16:10:43 +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: <20190823064417.GC2672@vkoul-mobl> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit 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 On 2019/8/23 14:44, Vinod Koul wrote: > On 22-08-19, 22:54, YueHaibing wrote: >> 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. > > Sorry YueHaibing as I have said to other patch doing this, this slave.c > is acpi specific but Srini has already send DT support for this so it > doesn't become acpi only and this warn also goes away. We should get the > DT support soon Ok, thanks! > >> >> 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 >> >