From patchwork Thu Feb 25 00:08:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 8415121 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 431B4C0553 for ; Thu, 25 Feb 2016 00:09:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B094202EB for ; Thu, 25 Feb 2016 00:09:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 857D6202E6 for ; Thu, 25 Feb 2016 00:09:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758410AbcBYAJL (ORCPT ); Wed, 24 Feb 2016 19:09:11 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:37123 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757428AbcBYAJJ (ORCPT ); Wed, 24 Feb 2016 19:09:09 -0500 Received: by mail-wm0-f41.google.com with SMTP id g62so5579160wme.0 for ; Wed, 24 Feb 2016 16:09:08 -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=/VFUzHzVFOMfjkiDZT0DmJlMCGfeGrMFFy8wCIZnmLw=; b=QgS5AfzliE63xMpdw/etF/AYHPVf+XSo0IbqIkKjKOOKpYh4r0oEADxOrEVCS12cL3 xVDLI3jQzv5Qk9UMOnjjm6SQYpyUWX730De4T1AzCJCcHzHWlQsXMIDFPxvjguTmroJZ I/b5gBtN+JvxSV9zEixIKoPC17Li70hJ5/E1HNf9WFIKrwx4EZyZU7y6j3VRmMI+uunI bXL3mkJStisn7HVu1FjJaCmY4raN3C/s2egepplymAidcsnqVYou1lyt46spO3i8URRq Op7S40JQw7oYfZd+EdjJhAwQSfG5t+6iDGD4Bq/BjOAZbioQtlXbgfqXSOlhoz0DlnGU KwmA== 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=/VFUzHzVFOMfjkiDZT0DmJlMCGfeGrMFFy8wCIZnmLw=; b=Hv490fuFjy5ZWZz7qLbLrlqa5sZi0fcJrWuLxXtlj8dUoZlf1cn99R16i/Y2bjLvhV yU7XzP1RfVZlFhuTtkYlQhe8aSuxEZSTozuEBli/UgfV8UYBGXUV+oHuF3S9/eAc3n5X xQWQ8NwS3z6iIwPGXHjyMZikoaxDwt4+BzqSf0aiTPSIOLWmSgQC4kT7O57+Ijaepa4o lj3oRdhmg8WGKywZ64SPMXekGzQJqG+nR16dbmFctxofOek44snDCNRqJ28kLwuXmZQG /2fnb0G1JCgHEMxaD3mR1GZUDfnIUE8T62MI+eahXVinCHrcHfuw1J+r9RLLPhQAMVFD 8++g== X-Gm-Message-State: AG10YOTdhBwI3Dp5+rPgMqlJc1P8aMvFLUsaP61zcIUGiVeWCkKh66sIMvOwsiCr9kLouQ== X-Received: by 10.194.189.211 with SMTP id gk19mr40332908wjc.63.1456358947578; Wed, 24 Feb 2016 16:09:07 -0800 (PST) Received: from localhost (b195.sivinet.vp.cust.gts.sk. [85.248.57.195]) by smtp.gmail.com with ESMTPSA id hh8sm5200458wjc.42.2016.02.24.16.09.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Feb 2016 16:09:06 -0800 (PST) From: Andreas Fenkart To: linux-wireless@vger.kernel.org Cc: Amitkumar Karwar , Nishant Sarmukadam , Kalle Valo , Andreas Fenkart Subject: [PATCH 5/7] mwifiex: scan: replace pointer arithmetic with array access Date: Thu, 25 Feb 2016 01:08:50 +0100 Message-Id: <1456358932-23114-6-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 improves readability Signed-off-by: Andreas Fenkart Reviewed-by: Julian Calaby --- drivers/net/wireless/marvell/mwifiex/scan.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c index 5588750..6ddc98b 100644 --- a/drivers/net/wireless/marvell/mwifiex/scan.c +++ b/drivers/net/wireless/marvell/mwifiex/scan.c @@ -999,27 +999,24 @@ mwifiex_config_scan(struct mwifiex_private *priv, chan_idx++) { channel = user_scan_in->chan_list[chan_idx].chan_number; - (scan_chan_list + chan_idx)->chan_number = channel; + scan_chan_list[chan_idx].chan_number = channel; radio_type = user_scan_in->chan_list[chan_idx].radio_type; - (scan_chan_list + chan_idx)->radio_type = radio_type; + scan_chan_list[chan_idx].radio_type = radio_type; scan_type = user_scan_in->chan_list[chan_idx].scan_type; if (scan_type == MWIFIEX_SCAN_TYPE_PASSIVE) - (scan_chan_list + - chan_idx)->chan_scan_mode_bitmap + scan_chan_list[chan_idx].chan_scan_mode_bitmap |= (MWIFIEX_PASSIVE_SCAN | MWIFIEX_HIDDEN_SSID_REPORT); else - (scan_chan_list + - chan_idx)->chan_scan_mode_bitmap + scan_chan_list[chan_idx].chan_scan_mode_bitmap &= ~MWIFIEX_PASSIVE_SCAN; if (*filtered_scan) - (scan_chan_list + - chan_idx)->chan_scan_mode_bitmap + scan_chan_list[chan_idx].chan_scan_mode_bitmap |= MWIFIEX_DISABLE_CHAN_FILT; if (user_scan_in->chan_list[chan_idx].scan_time) { @@ -1034,9 +1031,9 @@ mwifiex_config_scan(struct mwifiex_private *priv, scan_dur = adapter->active_scan_time; } - (scan_chan_list + chan_idx)->min_scan_time = + scan_chan_list[chan_idx].min_scan_time = cpu_to_le16(scan_dur); - (scan_chan_list + chan_idx)->max_scan_time = + scan_chan_list[chan_idx].max_scan_time = cpu_to_le16(scan_dur); }