From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07F56C32774 for ; Fri, 27 Sep 2019 06:43:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DCEF7206B7 for ; Fri, 27 Sep 2019 06:43:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726151AbfI0GnP convert rfc822-to-8bit (ORCPT ); Fri, 27 Sep 2019 02:43:15 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:39455 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbfI0GnP (ORCPT ); Fri, 27 Sep 2019 02:43:15 -0400 Received: from marcel-macpro.fritz.box (p4FEFC197.dip0.t-ipconnect.de [79.239.193.151]) by mail.holtmann.org (Postfix) with ESMTPSA id 286ECCECE9; Fri, 27 Sep 2019 08:52:06 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH] Bluetooth: btusb: avoid unused function warning From: Marcel Holtmann In-Reply-To: <20190918195918.2190556-1-arnd@arndb.de> Date: Fri, 27 Sep 2019 08:43:12 +0200 Cc: Johan Hedberg , Alex Lu , Matthias Kaehlcke , Rajat Jain , Raghuram Hegde , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <490CBF52-4D9E-4807-9E26-BDA45461F111@holtmann.org> References: <20190918195918.2190556-1-arnd@arndb.de> To: Arnd Bergmann X-Mailer: Apple Mail (2.3445.104.11) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, > 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 > --- > drivers/bluetooth/btusb.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel