From patchwork Thu Mar 10 08:44:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 8554481 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7E9669F46A for ; Thu, 10 Mar 2016 08:44:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9FDA1202FF for ; Thu, 10 Mar 2016 08:44:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 214A7202FE for ; Thu, 10 Mar 2016 08:44:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935184AbcCJIob (ORCPT ); Thu, 10 Mar 2016 03:44:31 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37968 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935176AbcCJIo3 (ORCPT ); Thu, 10 Mar 2016 03:44:29 -0500 Received: by mail-wm0-f51.google.com with SMTP id l68so18503989wml.1 for ; Thu, 10 Mar 2016 00:44:28 -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=RSeci+j7ZfZ0YhavBWMJ0CfRe6Iya2uULEgpKI1MdF4=; b=t+oUI7/PXEOc5RYe6ObKSBOavwDM5za8tbffqMSyFS5izLJpJj7AYFcbCoWtqIcfCZ vMvahZAMzn5YHy8e1+3EzCQqbaTwUDAC93CTpg3We0hy9++BAdLTOVyVEMA/8QVlmtM0 uO2arG5P6AooToqtKxq6TDg0kPEnI62i9mK0vAldW/vSC/ljIJhZrXutb4z5BbsLmOAh Lpw2znMGW0MSb1myyYJhMBnoisAbFtFFh2mBPIIfQcKnj2iZXQd+pl9YkpCpR5NpSzKy RQxph2erNjXWglpvfjPBSXgalaANDx5M/81ylx9Glk37FOMJI0uJE1bnnZX5wj6RoPEw Y6zQ== 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=RSeci+j7ZfZ0YhavBWMJ0CfRe6Iya2uULEgpKI1MdF4=; b=G5FqvwxDFAUBm0aYlgqnSMPKNM1ABZtz9jqLVmP1HQk0cfoqTN0IbHFbX228lU023L /DFze3C0KsQdRtV1PyCPSr3Jpfsz/rn80DB9q1nYs9KePbDBJjkUUtl7FmH8x5iIL/tM bHCuKitatshg+eobZzvnNhBp1xayGY/nfBscEm2Queb1dHmwkgU6v0Kk5ADmLVFmPHh3 NurnxxIVfCuf0YrSGR685aIKQmeHW5PariwE1upyw39DpDJG8B0CYGDBEuAJL2q8V2EJ qYhGO9eJZyNAnaZhjTtTImii4ZLG4EWYtX5Tf287ZT/vZIZp6B9Ehf4/t+9dXLCXUTDY xeQA== X-Gm-Message-State: AD7BkJLww9vS1XaZk8AyYjFQJqaq+kyk6O47PhTQ0U/JiNGLvYVJ4dtqh0Fh4C+uZ1I2YA== X-Received: by 10.194.91.205 with SMTP id cg13mr2254943wjb.166.1457599467923; Thu, 10 Mar 2016 00:44:27 -0800 (PST) Received: from localhost (ip-89-176-167-254.net.upcbroadband.cz. [89.176.167.254]) by smtp.gmail.com with ESMTPSA id t8sm2348247wjy.41.2016.03.10.00.44.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Mar 2016 00:44:27 -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 5/7] mwifiex: scan: replace pointer arithmetic with array access Date: Thu, 10 Mar 2016 09:44:09 +0100 Message-Id: <1457599451-13910-6-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 improves readability Reviewed-by: Julian Calaby Signed-off-by: Andreas Fenkart --- 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 c137fd8..327b4d8 100644 --- a/drivers/net/wireless/marvell/mwifiex/scan.c +++ b/drivers/net/wireless/marvell/mwifiex/scan.c @@ -1000,27 +1000,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) { @@ -1035,9 +1032,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); }