From patchwork Sun Sep 23 06:31:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10611603 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A140C913 for ; Sun, 23 Sep 2018 06:32:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78CF52A3B1 for ; Sun, 23 Sep 2018 06:32:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D31B2A3B3; Sun, 23 Sep 2018 06:32:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A0292A3B1 for ; Sun, 23 Sep 2018 06:32:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726046AbeIWM2Y (ORCPT ); Sun, 23 Sep 2018 08:28:24 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39164 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726011AbeIWM2X (ORCPT ); Sun, 23 Sep 2018 08:28:23 -0400 Received: by mail-wm1-f66.google.com with SMTP id q8-v6so6977665wmq.4; Sat, 22 Sep 2018 23:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H333hdIv99u4O3EPtOYXC4qj6MMzuzW/SZ5pBDZ3X9A=; b=g97WCU8PmQSX+1ZhRX4h2jZxCZmYoGJF8CoyhwFKbMepY0TepddeTzuLcn1COo7G74 x+x7uOK4cj5skddCp+OzyJLS5etJ9KATyaOXWkKkZfNq/90hL+BAevfYkMi+cbxfWfO/ jPeTSKGdedYiK82NGPDBUCJ3+2iDgrCS8vZ294imCVvuVGn844mGYK5nk9+OLq+l584Q VhAOw6eTwKlEQFSDqV/FpUfN99KYtQo/P2+TUjZ1a8yQy6lQuiiBoRAz7lG2OeJK8nU2 kdBNKMXDaRUXy5Iw37hxzEl8qh0l9wIbUJW9POg348HXU85twUP5cZPYZSCuF4/kJp8s gHOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H333hdIv99u4O3EPtOYXC4qj6MMzuzW/SZ5pBDZ3X9A=; b=sY7wom+1US2OUWQlmpJ73ZJtVTz6JRip48fXpD/FtgVamn9KM8rxlcyAw85TDNaNw0 TCFTa4mSNvz0I+h8E0Z/EsiG382Pt4csznx8nENnpxz9cmmA88gPGtkmaVzvxZS0nV4w j9xys/f/kzCwlQLXaPW3frI3GbzBOeJmo0yUa9g2/xO4R69ZQcTRW0dOBeBqf/ELFuP5 Rcl2rSW0lXrAB9R6MZPi9h8wLKEEthtALOBAzdacCGR5MLEDdLPiH9kZAyd78IjNC9tv a5tA/cNJ+zcz6bOu3xCNnEhhEWLbkUvDkHw/41WGHg77PiGhGYJ2ngMLSeFi5mL7Ffhp zjPg== X-Gm-Message-State: APzg51AvW3p4umYz+kOBQ6/V6t5vIyCtxnN0//l7dZ/dRE/+Feqfhg60 hQ7XVzq0QkOBglbIE29htC0= X-Google-Smtp-Source: ACcGV611pYZBQ+HZHm8TsshsvwKn5gcG/++gg0zK7xQBvY5dQ3wYw5KplR4om5tTQPl2bu9Qm49DWg== X-Received: by 2002:a1c:e286:: with SMTP id z128-v6mr3122463wmg.30.1537684321550; Sat, 22 Sep 2018 23:32:01 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id k5-v6sm30046778wrc.14.2018.09.22.23.31.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Sep 2018 23:32:00 -0700 (PDT) From: Nathan Chancellor To: Ping-Ke Shih , Kalle Valo Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH v2] rtlwifi: btcoex: Use proper enumerated types for Wi-Fi only interface Date: Sat, 22 Sep 2018 23:31:15 -0700 Message-Id: <20180923063114.11446-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clang warns when one enumerated type is implicitly converted to another. drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1327:34: warning: implicit conversion from enumeration type 'enum btc_chip_interface' to different enumeration type 'enum wifionly_chip_interface' [-Wenum-conversion] wifionly_cfg->chip_interface = BTC_INTF_PCI; ~ ^~~~~~~~~~~~ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1330:34: warning: implicit conversion from enumeration type 'enum btc_chip_interface' to different enumeration type 'enum wifionly_chip_interface' [-Wenum-conversion] wifionly_cfg->chip_interface = BTC_INTF_USB; ~ ^~~~~~~~~~~~ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1333:34: warning: implicit conversion from enumeration type 'enum btc_chip_interface' to different enumeration type 'enum wifionly_chip_interface' [-Wenum-conversion] wifionly_cfg->chip_interface = BTC_INTF_UNKNOWN; ~ ^~~~~~~~~~~~~~~~ 3 warnings generated. Use the values from the correct enumerated type, wifionly_chip_interface. BTC_INTF_UNKNOWN = WIFIONLY_INTF_UNKNOWN = 0 BTC_INTF_PCI = WIFIONLY_INTF_PCI = 1 BTC_INTF_USB = WIFIONLY_INTF_USB = 2 Link: https://github.com/ClangBuiltLinux/linux/issues/135 Signed-off-by: Nathan Chancellor Acked-by: Ping-Ke Shih --- v1 -> v2: * Fix enum values in commit message (previously all 0) .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c index b026e80940a4..6fbf8845a2ab 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c @@ -1324,13 +1324,13 @@ bool exhalbtc_initlize_variables_wifi_only(struct rtl_priv *rtlpriv) switch (rtlpriv->rtlhal.interface) { case INTF_PCI: - wifionly_cfg->chip_interface = BTC_INTF_PCI; + wifionly_cfg->chip_interface = WIFIONLY_INTF_PCI; break; case INTF_USB: - wifionly_cfg->chip_interface = BTC_INTF_USB; + wifionly_cfg->chip_interface = WIFIONLY_INTF_USB; break; default: - wifionly_cfg->chip_interface = BTC_INTF_UNKNOWN; + wifionly_cfg->chip_interface = WIFIONLY_INTF_UNKNOWN; break; }