From patchwork Fri Feb 7 14:46:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Gordeev X-Patchwork-Id: 3605511 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 77B09BF418 for ; Fri, 7 Feb 2014 14:44:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7D272016C for ; Fri, 7 Feb 2014 14:44:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 29DDF20131 for ; Fri, 7 Feb 2014 14:44:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752412AbaBGOor (ORCPT ); Fri, 7 Feb 2014 09:44:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40352 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752305AbaBGOoq (ORCPT ); Fri, 7 Feb 2014 09:44:46 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s17EiiZe030784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Feb 2014 09:44:44 -0500 Received: from dhcp-26-207.brq.redhat.com (dhcp-27-68.brq.redhat.com [10.34.27.68]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s17Eie23018735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 7 Feb 2014 09:44:42 -0500 Date: Fri, 7 Feb 2014 15:46:40 +0100 From: Alexander Gordeev To: linux-kernel@vger.kernel.org Cc: Vladimir Kondratiev , linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com, linux-pci@vger.kernel.org Subject: [PATCH] wil6210: Fix switch operator "missing break?" warning Message-ID: <20140207144639.GA10939@dhcp-26-207.brq.redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This update fixes a warning introduced with commit bc977ba1 ("wil6210: Use pci_enable_msi_range() instead of pci_enable_msi_block()") drivers/net/wireless/ath/wil6210/pcie_bus.c:65 wil_if_pcie_enable() warn: missing break? reassigning 'use_msi' Signed-off-by: Alexander Gordeev --- drivers/net/wireless/ath/wil6210/pcie_bus.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/pcie_bus.c b/drivers/net/wireless/ath/wil6210/pcie_bus.c index 4e1bf54..e1c8cc4 100644 --- a/drivers/net/wireless/ath/wil6210/pcie_bus.c +++ b/drivers/net/wireless/ath/wil6210/pcie_bus.c @@ -51,16 +51,12 @@ static int wil_if_pcie_enable(struct wil6210_priv *wil) use_msi = 1; } - switch (use_msi) { - case 3: - if (pci_enable_msi_range(pdev, 3, 3) > 0) - break; + if (use_msi == 3 && pci_enable_msi_range(pdev, 3, 3) < 0) { wil_err(wil, "3 MSI mode failed, try 1 MSI\n"); use_msi = 1; - /* fallthrough */ - case 1: - if (!pci_enable_msi(pdev)) - break; + } + + if (use_msi == 1 && pci_enable_msi(pdev)) { wil_err(wil, "pci_enable_msi failed, use INTx\n"); use_msi = 0; }