From patchwork Thu Jul 18 20:30:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasyl Gomonovych X-Patchwork-Id: 11049555 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 EAA14746 for ; Thu, 18 Jul 2019 20:31:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D907628710 for ; Thu, 18 Jul 2019 20:31:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCF1A28894; Thu, 18 Jul 2019 20:31:09 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 7CA0628893 for ; Thu, 18 Jul 2019 20:31:09 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=KlnxQJMdijDN0A+1/GMg++xNnM//8pu+D1vnw5iY+74=; b=V1f Gqp4uuaRkoEOqPN8IpB5RZK6gY/tv/oNNUqqTcz6eNHpQiURZh74a0tKLV6NRyGDtSdrzMzj9kcKf UT1I8m9pTBiQgsOJOQ1rf39v+D/iWgeQv2GfVCjAk5HxV7OD8NJ0t7sxlH/1H2GEIDSUAW5MNiY7w 4xawkxf55u5Jl9rxTga+lV96Abg3OP1BfUXvxWq7P78ziKN4gPKjXBgF6K1N/BzLHdv4O7APYcpBu u39fjZnpjS8oVmQRnsp5yiRYPCHU9A6RnEID1IJwVRkl1+wH+jmUuUq1J3IxDIh14x6MMjUo0u/Fp cfGvbFh3obDPYCt9QtFWmq3gyiMRtqg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hoD3Q-0002Jj-RA; Thu, 18 Jul 2019 20:31:04 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hoD3O-0002Iu-5f for ath10k@lists.infradead.org; Thu, 18 Jul 2019 20:31:03 +0000 Received: by mail-lj1-x242.google.com with SMTP id r9so28638116ljg.5 for ; Thu, 18 Jul 2019 13:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=5uFK7MqKRb+oFVKD89Io/malOAroV84oVCRoYwQTVLs=; b=ByuNj8jVyAGVVYdET8ktdlDqRCowxA9phMWJ7m0Sg/hw15WKOcetKCoYWFrQQJQRKo LtEcfREetsclcT4WkgGXcEBP0H8PXdH/UinOi0mrnbXCaG1uU7JZ/TSnEnww/R4X/mTz oY9MWuFdVzOuJB5eaML5omcF2fQwGzk4Q2mCo4iQ+VdUEQ8P4ArKNmYpxQn4VQnZcBIm tZibUPoWhfIJRuQA9XBnVICH4JPqmb7LBSilxOxr8Kol1LQFKxRHzVLNBPcYd0GBe9qK UJK5HYVWYrK9uQ2rjRIQICntWRhJ/+09hxemcPaQHi7E/J8jQ2HvL+W709oR5yYvVCaO 1FkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5uFK7MqKRb+oFVKD89Io/malOAroV84oVCRoYwQTVLs=; b=uY3GnyrysWPwJd4cEhaO6OVLJ9qp5OM4DtDcb2op1yXqdmBz72nyzjvwUlEG2DKBd2 z1pSvqSw+l5/px+c9BMRKxtRpsWWNEFzFig42AAon2bRY140ctgExvUhGEb4noYC88Iv /TWSsVE4A6JkTdIBtxkuNWeIsRqq+SPKgv+FGb+P5ZCiw7QmCCFGgPlWr2z6cO0xH2og pUAS7D/uVfjnKoSMOYoSeoG7WJfL3oZeH+ICkhMC0wq2O99grzDohXbk7uj7g9GKP81L fNorgXNcDsHLr5sZ2dHWCFqtZXtiUciKc4YGV6I4HOEpE5BCPw/OVR2xTB8cKdaMJXLM re8Q== X-Gm-Message-State: APjAAAXH9z1MlUpYcb3fAgzPOkwRLNrJ+K5cumCr8DzTVaiPuqTEzQpW 5poZd4zUwVWNgwTvn/Eig4Q= X-Google-Smtp-Source: APXvYqzYOuKKYg4wEuoB/Wrmt94ndQPSqKVzWpoKOkFOelXaVESsDwy8xn8HcjyigaNiphMBNBSVag== X-Received: by 2002:a2e:9a13:: with SMTP id o19mr26037315lji.102.1563481858169; Thu, 18 Jul 2019 13:30:58 -0700 (PDT) Received: from ul001888.eu.tieto.com ([91.90.160.140]) by smtp.gmail.com with ESMTPSA id d16sm5229387ljc.96.2019.07.18.13.30.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 18 Jul 2019 13:30:57 -0700 (PDT) From: Vasyl Gomonovych To: kvalo@codeaurora.org, davem@davemloft.net, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH] ath10k: Use ARRAY_SIZE Date: Thu, 18 Jul 2019 22:30:32 +0200 Message-Id: <20190718203032.15528-1-gomonovych@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190718_133102_239686_67686FDB X-CRM114-Status: UNSURE ( 8.21 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Vasyl Gomonovych , linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP fix coccinelle warning, use ARRAY_SIZE Signed-off-by: Vasyl Gomonovych --- drivers/net/wireless/ath/ath10k/snoc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index b491361e6ed4..49fc04412e9b 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -976,8 +976,7 @@ static int ath10k_snoc_wlan_enable(struct ath10k *ar, 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;