From patchwork Sun Dec 29 17:23:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182561 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5462252ild; Sun, 29 Dec 2019 09:49:08 -0800 (PST) X-Google-Smtp-Source: APXvYqzSSCwzfuXIwfNCufH2UbK/VF0ekQGyFzbpykMpSpFiOTb3W25KHPG9yXhAYRLcjVOHPOgV X-Received: by 2002:a05:6830:1f95:: with SMTP id v21mr62639643otr.325.1577641748778; Sun, 29 Dec 2019 09:49:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577641748; cv=none; d=google.com; s=arc-20160816; b=Pq/ESbAN7/5O6+o1pH+4N/a8ETiCo1Dm9EB+t26241MamqrBeUctMzmOACtYtbE7pf VNQcihk9A9yBDUmcBQ81jDJ8hDgBFzL7/6Y+ugX7ymHWj2kOkGcmq8Ukwpyb7gzB1hfX 9UGN1XpVBVBG27nDK2lg9Rq4oYgbS2xxwvljHpQeMlTBQBooIOSiZJ6hF1R71+6Fggzt RXov0pv6p9XsJWUnphKVVlqUPZHjeYAH2nugCXMVh6URF7V9Coo7upAH84DVaGBgD9bs Tx/F4cqAap4UXBk6FDwvDpRWpn9uRnPazeSKNdQ36EcOJ8iJtfZrBxh8vbCaq+RXHYSu dKJA== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xAi+BqOXKpc5Vek77lcJVPsvM6EJkpBblplOOyL6jvc=; b=wR1f2IT4tnM7c6OR0rwLwlrzAwlkKXuIZcSw7BJiuKQXMiCEVQjHAiiXPEDvh5+oMC YKZfqixfRsXXHQgZqzmekGAwHPw0OtNYnnbDipP0tfxrzK388hDxiB2VV1BVMZvJz7ri eqdYLrojcp7FQm5oIF8ia276c4xBBYX5qalno27+WzysLP2ewha9Ib7BOQyHOYBDSfbJ mdqSwip0Aw/20zAe9yeOF9dou2F+r+8gobGuEoOIRJEf879wZJxzScwjfLCctY3JHVyx nBMnYIlBe3ZkAI9mHVqKIVMNo5a/DqFVSFUMw0SdRL2x598Qn3wafM6V7oC45xBejUh2 Za/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sds4mOiW; 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 r65si19767770oig.69.2019.12.29.09.49.08; Sun, 29 Dec 2019 09:49:08 -0800 (PST) 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=sds4mOiW; 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 S1730904AbfL2RtH (ORCPT + 27 others); Sun, 29 Dec 2019 12:49:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:60832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731261AbfL2RtE (ORCPT ); Sun, 29 Dec 2019 12:49:04 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 D9073206DB; Sun, 29 Dec 2019 17:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641744; bh=mPXe+j/UekjGyeu7KFX+1upusvWLubhG5A9IVZjXqoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sds4mOiWPaF336M2gcGWHsLqE84s1x1BsEvMmULUHvBKmevJKISXJmAydgT6a93NF BxgX0G4CCMNJkvoH3Cl0tBu9Bb76H9HkCwyfAAjzuyW9lVgGnLB0zsoDQxyGVTveKd v8CGSnHEUwgY6NKK9kWLZ7kV/0BABcxzeHUcxEGY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Marcel Holtmann , Sasha Levin Subject: [PATCH 5.4 152/434] Bluetooth: btusb: avoid unused function warning Date: Sun, 29 Dec 2019 18:23:25 +0100 Message-Id: <20191229172711.854616098@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 42d22098127d6384f789107f59caae87d7520fc4 ] The btusb_rtl_cmd_timeout() function is used inside of an ifdef, leading to a warning when this part is hidden from the compiler: drivers/bluetooth/btusb.c:530:13: error: unused function 'btusb_rtl_cmd_timeout' [-Werror,-Wunused-function] Use an IS_ENABLED() check instead so the compiler can see the code and then discard it silently. Fixes: d7ef0d1e3968 ("Bluetooth: btusb: Use cmd_timeout to reset Realtek device") Signed-off-by: Arnd Bergmann Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- drivers/bluetooth/btusb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index a9c35ebb30f8..23e606aaaea4 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3807,8 +3807,8 @@ static int btusb_probe(struct usb_interface *intf, btusb_check_needs_reset_resume(intf); } -#ifdef CONFIG_BT_HCIBTUSB_RTL - if (id->driver_info & BTUSB_REALTEK) { + if (IS_ENABLED(CONFIG_BT_HCIBTUSB_RTL) && + (id->driver_info & BTUSB_REALTEK)) { hdev->setup = btrtl_setup_realtek; hdev->shutdown = btrtl_shutdown_realtek; hdev->cmd_timeout = btusb_rtl_cmd_timeout; @@ -3819,7 +3819,6 @@ static int btusb_probe(struct usb_interface *intf, */ set_bit(BTUSB_WAKEUP_DISABLE, &data->flags); } -#endif if (id->driver_info & BTUSB_AMP) { /* AMP controllers do not support SCO packets */