From patchwork Tue Mar 20 11:43:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hariprasath.elango@gmail.com X-Patchwork-Id: 10296923 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.web.codeaurora.org (Postfix) with ESMTP id E81D860385 for ; Tue, 20 Mar 2018 11:44:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D929229577 for ; Tue, 20 Mar 2018 11:44:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD6C729581; Tue, 20 Mar 2018 11:44:29 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable 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 77B1929577 for ; Tue, 20 Mar 2018 11:44:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752779AbeCTLoO (ORCPT ); Tue, 20 Mar 2018 07:44:14 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:40628 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752700AbeCTLoN (ORCPT ); Tue, 20 Mar 2018 07:44:13 -0400 Received: by mail-pl0-f67.google.com with SMTP id x4-v6so794729pln.7; Tue, 20 Mar 2018 04:44:13 -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; bh=mvc/czDxJoE3A4GK7VdQ7LPGsKxQrxAVJDSLk2ytUWk=; b=ezmCb7BzyBDCnddGZ8/wyEFu0f5/XP3z0YHMFwwHakFGHmEMdRsn1bYvY6Sx6spknX eVGHdL+0sdorBMOXZUNvTw8+7TMjoAC3NA28RRKvnNH9GSwv6VYI6ZFCkFO4FTqef/0s i03txxTm901Y+ZDoKA01BAo+XZOKeljgv4p/N5r2z0z7VyRbJhpZ3dIgBq94iGPjrZ6O SfdYgECRGU7nRA7B74V1dRfv5WFQiqGU8rIM6pGyAsBHnqByqaJPIQYGApQ9+42z4+9g slhV4FPpasdxMy32pgaOdGEYkh0RgIMstdyq6i8yeN5JH5plTF7EgIqf0Vtbj2XmMBzZ FYUg== 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; bh=mvc/czDxJoE3A4GK7VdQ7LPGsKxQrxAVJDSLk2ytUWk=; b=rPiK7ll/7FN6WIpo/8fJ62lsg3u2+oJzW8DW2LMfvfZy9LVPw9zQM1/0+d+OIZmqjP HIkbVdpDXLaLMXQb+GuraDC5D0R+w0/uIMlaVLBdAzM39uNDXQzyQ51bCcDHDOiGtb9l X/XriZ+wG0wQJUrGBfm6zya0Q7f2ST0OLgu7GD74EQl7TVeRXvJdid9q/qzedZ6jiVFd 1LDXjGKrGzp6WTU7RnZ5402MUCF60TCEmfbiMsIXKYByXXgXNXenC8EcThf8Jil0NDtZ obqX+sZ/wZ4gJJy/cAGMDHonZDozP/syj6LkZH3iDi+gS3GC6xJEVYwrlSxtD5owQ84m P3Mw== X-Gm-Message-State: AElRT7FePVNAMcmk7/ZVelU1W75M8YIej9fX41jMz8MMOThcJwA9WBpl EqSbrW3W0Wn7MKxvYXRkkyg= X-Google-Smtp-Source: AG47ELtJvLBM/RXoXCHxLJ7sDDirJJVXE8rSfbDZmcoZUtlEh2CttqQpa1xMqhY5tgE5ZQu81iEkqw== X-Received: by 2002:a17:902:7290:: with SMTP id d16-v6mr16094016pll.31.1521546252935; Tue, 20 Mar 2018 04:44:12 -0700 (PDT) Received: from hariprasath.domain.name ([122.165.96.181]) by smtp.gmail.com with ESMTPSA id t16sm1729184pgu.63.2018.03.20.04.44.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 04:44:11 -0700 (PDT) From: hariprasath.elango@gmail.com To: aditya.shankar@microchip.com, gregkh@linuxfoundation.org, ganesh.krishna@microchip.com, dan.carpenter@oracle.com Cc: gehariprasath@gmail.com, HariPrasath Elango , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCHv2] staging: wilc1000: replace switch statement by simple if condition Date: Tue, 20 Mar 2018 17:13:31 +0530 Message-Id: <20180320114331.4084-1-hariprasath.elango@gmail.com> X-Mailer: git-send-email 2.10.0.GIT 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 From: HariPrasath Elango In this case,there is only a single switch case statement.So replacing by a simple if condition Signed-off-by: HariPrasath Elango --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 9d8d5d0..730d64f 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -776,14 +776,8 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, } if (sme->crypto.n_akm_suites) { - switch (sme->crypto.akm_suites[0]) { - case WLAN_AKM_SUITE_8021X: + if (sme->crypto.akm_suites[0] == WLAN_AKM_SUITE_8021X) auth_type = IEEE8021; - break; - - default: - break; - } } curr_channel = nw_info->ch;