Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13474077ybl; Sun, 29 Dec 2019 12:46:37 -0800 (PST) X-Google-Smtp-Source: APXvYqzjGRzDb6ojpwCD3iLnWbD7472T9YiimLL4/JdpcRpjW2Gom83k/Bs6ETIDtfhx9/9Ow/Hv X-Received: by 2002:a9d:6502:: with SMTP id i2mr42965542otl.206.1577652397224; Sun, 29 Dec 2019 12:46:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652397; cv=none; d=google.com; s=arc-20160816; b=Jb9rkAAaYrL5IjloMZ3qtkJnZm6XsUGFD62ROM4O6mq8lzy+sVlYDLaZKiHXrThrCN 4gyVUHvGr9d07JwJi40cryJQjYk6HZ3H617IptXpimGs8fD3awKwHP5Jl/UXYTSBXgAa AVsgLZ0wH43U0vXmQz1/nZaReFP4nCtIG9c/n8zvYS/a2DBUHy2Ncjuj/g183FPJS7Ap Vmy8tApapEgzEWlzD7mm7LKfYGOJ+gNmrEYroecMAiwo00r6z8QeeOjWD7eBSXj8rl4x NfOIV6mlsmaFoTeg9c7EK/KV9KWnEMbLNh4mgvt/tsvpziCVqdAaj49kIuIAYz3cmA2R QzlQ== 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 o83si12865922oib.44.2019.12.29.12.46.26; Sun, 29 Dec 2019 12:46:37 -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 S1731571AbfL2RtG (ORCPT + 99 others); Sun, 29 Dec 2019 12:49:06 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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(-) 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 */ -- 2.20.1