Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp433553ybl; Fri, 23 Aug 2019 03:08:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYA6vJBgLNyadkAD5mDNmf6wTYhvOngYSdD/zSHA/sXF4u6Ecbg6bfJ3CXqJYqO4UBDswJ X-Received: by 2002:aa7:93cf:: with SMTP id y15mr4224748pff.251.1566554912897; Fri, 23 Aug 2019 03:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566554912; cv=none; d=google.com; s=arc-20160816; b=LpZESFTniB57q+4Xo6wjhNJiT8nPBrGwiweEY4PgIE3VJqZE//dIlFY+LTcGKlc/0M 6ugNKYDSN7cdCgCIJ7E5Ny/ZOTgYcOjyAJItIDOpdEDrtgNmpoUz6KcWSt1NXFkA+wIy 51W8oPyXCFWOCmsRz964N+3wV2v4S9EGzKlto25T3Es0CCX4JIj8Bk/X0c5wf08xP4gF +5ELQxVFwk9+rpQv1JX+IIZPakEZQoL/PoT9uPxc5Z/j4PdWHrn0h6f09Sg06Oph4fhX DWnYfv1HtDCYlmMHd3UJJ382Da8cOhBLSe2yqFuxAPA5Ifi0JPXz+ZcxhvggmXI6H1YO 9bsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YEorC34G4AQuollj1P9aEl21cSjXCeBuSh5eK8VeeBI=; b=KyEmSng96o5ATRR06oTaK4wSe+P8jrLo3LoVNlK5N/AhV6OGyJa1tvq//fJuwbnvN4 aDU1ps5RWTTnXI+p9AydNySM8NgBUBi95OpMnaZp73ycmwT9Ue+BqxN/DfV7RiWz8nii WB6lyB4sQwJq5A8tnhT743Au5egE9bB6GOBi4dgeHQPE8dk8R9qBDG89GjKtVVT7VPCW vABGWPJ5Dzc3ub2fL/xUwqIvy2gT9C5Neygd0d2Jod0qmnqC90XNjuPVep9qQg2sn5QC 0kBvUSpKXZpHYOjYQtRYMDpd/gvHab9fLIGeAthdHmJF+m2XhkPI0gY68a3hagvaYpdH Xyjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U8wyb94o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3si1589100pgv.153.2019.08.23.03.08.16; Fri, 23 Aug 2019 03:08:32 -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=@kernel.org header.s=default header.b=U8wyb94o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392325AbfHWGpa (ORCPT + 99 others); Fri, 23 Aug 2019 02:45:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:50542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389682AbfHWGp3 (ORCPT ); Fri, 23 Aug 2019 02:45:29 -0400 Received: from localhost (unknown [106.200.210.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9173322CEC; Fri, 23 Aug 2019 06:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566542729; bh=RD4wwXaEVvl7Pb39QxEhxwdKqJW6ucyEsdVbg5nBR2o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=U8wyb94oGuWbzdpNGDHD8XaYCk4UupJKP10qYmx2SysXXRrC6pbbUHvwJY1BMrFcd WdlOLeEWFloEy1ew41PYSwLf3IqqL9qy8E6tOMxVbFDKsYCHVayob2I3P837Mp9wCi xPOQUplW+tvNOrPOkkXZ2u4UiAtUkVet2IeUT3q4= Date: Fri, 23 Aug 2019 12:14:17 +0530 From: Vinod Koul To: YueHaibing Cc: sanyog.r.kale@intel.com, pierre-louis.bossart@linux.intel.com, ladis@linux-mips.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 -next] soundwire: Fix -Wunused-function warning Message-ID: <20190823064417.GC2672@vkoul-mobl> References: <20190816141409.49940-1-yuehaibing@huawei.com> <20190822145408.76272-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190822145408.76272-1-yuehaibing@huawei.com> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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 > -- ~Vinod