From patchwork Thu Oct 11 12:41:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 10636631 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D925E112B for ; Thu, 11 Oct 2018 12:46:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC6232B49E for ; Thu, 11 Oct 2018 12:46:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEE182B4A3; Thu, 11 Oct 2018 12:46:33 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 631AE2B49E for ; Thu, 11 Oct 2018 12:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qpOsSt907O3UVn/aqc6s6fkAKnPy+js3scTtY06MlfY=; b=RRyYuXKzcw9rJl iLFjuOsVRw+Z5plCcURtMOjdE49QM0qwhwmVV6X/6jPunzdn3gPXL0gBJykOfaashQG3AJK02rj58 qaCUkXCUYOo3+p9V3TMRyQ+py7ExR4MCRNNPi/RNbs4rsuyE0KSXS87V1v0wV6nTT2HOtEFtQMM1N QKjtavg/KZaVNipHSwAzing+xrlfmM+VbKOsKoz/dTiKkv2IaaBSs+nzsjW7QHb3TEuWHWGl/1bDk rNWKttYtavmAdsKNbI10a5PuRkMKmTzDk0ozr90O5ykCDc3k+2YQML/ixhLVb78pLt7fz8LdXUWSQ YgVHO/Jy3f5U0zVVvOjA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAaMJ-0002Pt-SP; Thu, 11 Oct 2018 12:46:31 +0000 Received: from mga18.intel.com ([134.134.136.126]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAaMH-0002Og-13 for ath10k@lists.infradead.org; Thu, 11 Oct 2018 12:46:30 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2018 05:46:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,368,1534834800"; d="scan'208";a="81765107" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by orsmga006.jf.intel.com with ESMTP; 11 Oct 2018 05:42:11 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1gAaI6-000Dpw-Mo; Thu, 11 Oct 2018 20:42:10 +0800 Date: Thu, 11 Oct 2018 20:41:15 +0800 From: kbuild test robot To: Govind Singh Subject: [PATCH] ath10k: fix array_size.cocci warnings Message-ID: <20181011124115.GA49377@lkp-hsx02.lkp.intel.com> References: <201810112011.CVcr259b%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201810112011.CVcr259b%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181011_054629_136332_F2D763A4 X-CRM114-Status: GOOD ( 15.34 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kalle Valo , kbuild-all@01.org, ath10k@lists.infradead.org, Bjorn Andersson Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot drivers/net/wireless/ath/ath10k/snoc.c:984:58-59: WARNING: Use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Semantic patch information: This makes an effort to find cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Generated by: scripts/coccinelle/misc/array_size.cocci Fixes: 5639a5d3cc24 ("ath10k: Add QMI message handshake for wcn3990 client") CC: Govind Singh Signed-off-by: kbuild test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending head: 54a7bb96eb4b7f8171448dfaa5173c88cd3c29e1 commit: 5639a5d3cc242473d600a400dc41edcbb0b19092 [26/28] ath10k: Add QMI message handshake for wcn3990 client snoc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -981,8 +981,7 @@ static int ath10k_snoc_wlan_enable(struc sizeof(struct ath10k_svc_pipe_cfg); cfg.ce_svc_cfg = (struct ath10k_svc_pipe_cfg *) &target_service_to_ce_map_wlan; - cfg.num_shadow_reg_cfg = sizeof(target_shadow_reg_cfg_map) / - sizeof(struct ath10k_shadow_reg_cfg); + cfg.num_shadow_reg_cfg = ARRAY_SIZE(target_shadow_reg_cfg_map); cfg.shadow_reg_cfg = (struct ath10k_shadow_reg_cfg *) &target_shadow_reg_cfg_map;