From patchwork Thu Mar 10 08:44:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 8554461 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 96BB5C0553 for ; Thu, 10 Mar 2016 08:44:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AF892202FE for ; Thu, 10 Mar 2016 08:44:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D13F2202FF for ; Thu, 10 Mar 2016 08:44:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935170AbcCJIo0 (ORCPT ); Thu, 10 Mar 2016 03:44:26 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:33924 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932846AbcCJIoY (ORCPT ); Thu, 10 Mar 2016 03:44:24 -0500 Received: by mail-wm0-f54.google.com with SMTP id p65so18583453wmp.1 for ; Thu, 10 Mar 2016 00:44:23 -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=mGvBDkYoW7UkaNUmWsZbgG0k3v/ly2g8psndzz3Trfw=; b=w/H+5iVKn8/I153dg8wScY0rYl+z0FuUvmL/FeZ+y0vwhBCko3FhmUyNivREyfDgAr BhAs04ziWBJuzal8aW9AVy9rIntUGRRa/OdGCq08VyqvMJznWDao4klitNjNCYPMFxYk N04ZzvaZtd6UsRyI1KRODBRskVSvjGIqJIyllclCkdwSbZCJHuL+pqz49ASZ7R1fr8Tw 09Md65eDwoPhChbML4YrLWxsDOxM2TasPD7z9Kmnn3rtZ9qxkyx8Qpg0PSHJiK51Zq3i 6i81EDyzWuP667wexx+WPOXB1oEAESU6835A/q1croeVIA2u6fe04zczRljjlfwJ4vkG PZ/Q== 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=mGvBDkYoW7UkaNUmWsZbgG0k3v/ly2g8psndzz3Trfw=; b=c1yWJuDD3H1YgSrOzzAk2jPKgYPirO4qcavW3vzQI6r4w7r+K2ghsqE01tPJpOF9R/ axmBzkyCAm5zrCpjHyhlZXqz/hDd+T9803PGq71NzdMAR4HsUi3e7W2YuCGlsBf8mCsp qPr7hgNTr4XNjwM1JO7vD4F8j9Ian65NhiFIPZ9tIemJU5466w9AFbBuvRPyVICgSQKw v5agYWkIUo3sM1GcLNyP2GfrHBzf15WZTs2I1ArsUFATadA0Yk+V0vxYm8QayxS0ru+9 blCOouBwpiQRt/gjs/1W/ZmJ1Pv5gWQaHIgt5XyMO+zoQDGoV19tMqabgilnNQ0ARzOh CALQ== X-Gm-Message-State: AD7BkJJUpsm6Mbjg0JkxFjTNMJwSG3Q5Vmiebm2CHAawjteUCvputUtZaQ6qm9rye9QB+w== X-Received: by 10.28.224.212 with SMTP id x203mr2451245wmg.75.1457599462459; Thu, 10 Mar 2016 00:44:22 -0800 (PST) Received: from localhost (ip-89-176-167-254.net.upcbroadband.cz. [89.176.167.254]) by smtp.gmail.com with ESMTPSA id b1sm2411245wjy.0.2016.03.10.00.44.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Mar 2016 00:44:21 -0800 (PST) From: Andreas Fenkart To: linux-wireless@vger.kernel.org Cc: Amitkumar Karwar , Nishant Sarmukadam , Julian Calaby , Kalle Valo , Andreas Fenkart Subject: [PATCH v2 3/7] mwifiex: scan: simplify ternary operators using gnu extension Date: Thu, 10 Mar 2016 09:44:07 +0100 Message-Id: <1457599451-13910-4-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1457599451-13910-1-git-send-email-afenkart@gmail.com> References: <1457599451-13910-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 Reviewed-by: Julian Calaby Signed-off-by: Andreas Fenkart --- 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 ed886af..f623834 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,