From patchwork Thu Feb 25 00:08:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 8415151 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0E599C0553 for ; Thu, 25 Feb 2016 00:09:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42228202EB for ; Thu, 25 Feb 2016 00:09:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69546202E6 for ; Thu, 25 Feb 2016 00:09:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757337AbcBYAJI (ORCPT ); Wed, 24 Feb 2016 19:09:08 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35072 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755960AbcBYAJE (ORCPT ); Wed, 24 Feb 2016 19:09:04 -0500 Received: by mail-wm0-f54.google.com with SMTP id c200so5766340wme.0 for ; Wed, 24 Feb 2016 16:09:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=E/ozFiRBPGD4QSIehGm9bhVZ890TmHVEvySEUYSUsFo=; b=aGEp9CidlGFPTWORv04yQtTgfDka8up+fXFZpkbIF/zif46pBaNnliLv/kItG0ZAmG Ck9uzaATplyRpI/Jv3stxbjy9JzgJ5UVldb9/Ip50E3TnqvIme3Ic6lB1bJy+CGcgJiD 2yHREhfBbwodr4RQZTLEOM0WANEV3LVaeak/JN4zerrtmFzprRZPVuiNhKzmdXY2cP7o wblNZYERpYKhF5kfscE8OH6OlnhN4Pe6pJS//QdfCyXnC/JljBaKjPIai3gjJR7PiB1x umU7cqhU5WQxDL6B5SShRUeDJT3jxbxvAeu3j5dUBHJOWAyMRzmrdKZQHWwqs3F6oA4W BmLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=E/ozFiRBPGD4QSIehGm9bhVZ890TmHVEvySEUYSUsFo=; b=AdIHPAnCQEiZhSYQY5F0VbT71rTe4cmSs5lIcJAGJsDNC0lq7WKUQxdIAN5AaX8bdy xGk98Xw/57R2ZttcY4ba0qqfgAJmFDSr/H5an9a6HsnpEjmoJXS/dnU1izFO4FYZQg1x SblYIBrSgoO0kODVdnIQdfxafAaYQqaHfytrGgzZNxLjxMoDwWttRwegobFc+K6x9TMY jOsdT3FSqIZCYmLZpJlt2HFSh5RoZo3OBM3fFvFBJukQJDR1utjWk/eJgvCr2kKg9X3f qFjcpB/ZRpEhr3eeektjGdg+Kfmut+iIadOhYJAQDAe7x/ncWgbpCNw1SuMjpOFXiFK+ b9Og== X-Gm-Message-State: AG10YOTCJLfkbYkw3h1l8QyJg+MHEThNZrggkhYS1VwyN7m5X3GjwK8R26TAB3Djahf+hA== X-Received: by 10.28.228.213 with SMTP id b204mr413363wmh.82.1456358943427; Wed, 24 Feb 2016 16:09:03 -0800 (PST) Received: from localhost (b195.sivinet.vp.cust.gts.sk. [85.248.57.195]) by smtp.gmail.com with ESMTPSA id gt7sm5272850wjc.1.2016.02.24.16.09.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Feb 2016 16:09:02 -0800 (PST) From: Andreas Fenkart To: linux-wireless@vger.kernel.org Cc: Amitkumar Karwar , Nishant Sarmukadam , Kalle Valo , Andreas Fenkart Subject: [PATCH 3/7] mwifiex: scan: simplify ternary operators using gnu extension Date: Thu, 25 Feb 2016 01:08:48 +0100 Message-Id: <1456358932-23114-4-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456358932-23114-1-git-send-email-afenkart@gmail.com> References: <1456358932-23114-1-git-send-email-afenkart@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 "x ? x : y" can be simplified as "x ? : y" https://gcc.gnu.org/onlinedocs/gcc/Conditionals.html#Conditionals Signed-off-by: Andreas Fenkart Reviewed-by: Julian Calaby --- drivers/net/wireless/marvell/mwifiex/scan.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c index 276382e..f612c1b 100644 --- a/drivers/net/wireless/marvell/mwifiex/scan.c +++ b/drivers/net/wireless/marvell/mwifiex/scan.c @@ -845,14 +845,11 @@ mwifiex_config_scan(struct mwifiex_private *priv, /* Set the BSS type scan filter, use Adapter setting if unset */ scan_cfg_out->bss_mode = - (user_scan_in->bss_mode ? (u8) user_scan_in-> - bss_mode : (u8) adapter->scan_mode); + (u8)(user_scan_in->bss_mode ?: adapter->scan_mode); /* Set the number of probes to send, use Adapter setting if unset */ - num_probes = - (user_scan_in->num_probes ? user_scan_in-> - num_probes : adapter->scan_probes); + num_probes = user_scan_in->num_probes ?: adapter->scan_probes; /* * Set the BSSID filter to the incoming configuration,