Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2765943rdg; Mon, 16 Oct 2023 14:22:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBvN0T2SZ2HtY3szFdGVdo4C5Y1E/5S/KtEO9MjDDifGji6HDuLuw9E80/23MM6pEyUv26 X-Received: by 2002:a17:903:88f:b0:1bb:c64f:9a5e with SMTP id kt15-20020a170903088f00b001bbc64f9a5emr509743plb.5.1697491363497; Mon, 16 Oct 2023 14:22:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697491363; cv=none; d=google.com; s=arc-20160816; b=g64unY4FSitha0rOOCgRODiZp6hcPXi8+J46bY+T7a3Cw/2x1gk7V6oqg/tRrCGIY8 ySLP6sM5gL6pEP2Iy2TMjPHq6TSYwVPapVHu8L1Q+KAoEKwHC1G+AKceCA8aqzaFvFxk uxK68Q8FX2wa9cLusU7LhnSFmlyHXg7ZJHuSsi3N6fYI7H7vfWoiXZzQ0Colmy881TKn 2VCOEIjZSrF8g40GTw0QOLWcmT9VKEwm4qbaHqr5SPx3yoRK5ac2JZQ2YCkPOIAUIsKm pex6lKVOBqjXPeNxKDAyVyuRtrE8n5PdMk46JgA5F/vRQth2qocNE058c0luu24G0kWv AV7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=0mmINDpTwCAmUV8dD8J0BfvK4SwBpCRLkJ0C+AEu8wI=; fh=ab4hqzKEwWp7Rrb7FeSlWPVYgeIfae+MoUBg4Yo+Qm0=; b=MVlboKzvhgWjXO2V7rHSyQi1L+9qPM8BCw3TaDaB9k3qxpRcDG1v9xELIcFwQyxhzm klrVHK3NnMbD09hbuhSdqSKSmqRmAh1lJfrIS7h04W6iSCc8Ud5q8mAaAeSMQ3A3cbBz arc6zbd4UetcW5Qa6l9YwsKA9qnekBNjIc2vqnONQxz7xOSwrS6EJHQHu8T1wq7ZhKxb 0PKLvdns4rzJZXtBS8XnBCZU//NtG5R3ebmyp6StqD9F6e/TZ5IK+V20dnQyz08BvTkZ xvQsczIMGXUtnzc5G6vfeiXFapCnlGZMUIC7AvTYps6/s2Gb+TnfRo9mwrTVZvclPKum o16w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=RL0vrCkI; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id h12-20020a170902eecc00b001ca85b797c9si149912plb.624.2023.10.16.14.22.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 14:22:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=RL0vrCkI; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 8D36980622A2; Mon, 16 Oct 2023 14:22:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233282AbjJPVWa (ORCPT + 52 others); Mon, 16 Oct 2023 17:22:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbjJPVW3 (ORCPT ); Mon, 16 Oct 2023 17:22:29 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 370CEA7; Mon, 16 Oct 2023 14:22:27 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 88B70FF806; Mon, 16 Oct 2023 21:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1697491345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0mmINDpTwCAmUV8dD8J0BfvK4SwBpCRLkJ0C+AEu8wI=; b=RL0vrCkIKGAZwxV6uYhZHAVRTQmO9ReaEW3Vl4Ru5LwwV8Edezze6IutuIfGIOOeBxi3bK /qwysA4DD0gJgGAO0REtTdFzqHmsu49/TyKTSmzehh4sViV30BanApvE144lIKq6IEFuGi WNi4Hiif+q9Jrj/mxwfPP90Adsvao1/wkJ76JfPbN9Gj0gDe2hLeymq5aRRWOw+VJIqQ6p x5w4IHIjDPjIEiXxv52NeU62tLIEaqJij+JPdTxGrzSvqoyENSf8ZpTbU56UWKydMZV4hu 0S0sb72ZYD1bghF+NAAB6znGXCXkrpCvB9i8p7QmsB6WpwMKAHdczac095Znug== Message-ID: <74eac5f2-228b-4775-a101-53b2fdd5bf86@bootlin.com> Date: Mon, 16 Oct 2023 23:23:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] wifi: wilc1000: use vmm_table as array in wilc struct To: Jeff Johnson , Claudiu Beznea , Kalle Valo , Michael Walle Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Ajay Singh , stable@vger.kernel.org References: <20231016-wilc1000_tx_oops-v2-1-8d1982a29ef1@bootlin.com> Content-Language: en-US From: =?UTF-8?Q?Alexis_Lothor=C3=A9?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: alexis.lothore@bootlin.com X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 16 Oct 2023 14:22:40 -0700 (PDT) Hello Jeff, On 10/16/23 17:26, Jeff Johnson wrote: > On 10/16/2023 1:29 AM, Alexis Lothoré wrote: >> diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c >> b/drivers/net/wireless/microchip/wilc1000/wlan.c >> index 58bbf50081e4..e4113f2dfadf 100644 >> --- a/drivers/net/wireless/microchip/wilc1000/wlan.c >> +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c >> @@ -1492,7 +1492,7 @@ int wilc_wlan_init(struct net_device *dev) >>       } >>         if (!wilc->vmm_table) >> -        wilc->vmm_table = kzalloc(WILC_VMM_TBL_SIZE, GFP_KERNEL); >> +        wilc->vmm_table = kzalloc(WILC_VMM_TBL_SIZE * sizeof(u32), GFP_KERNEL); > > this is probably OK since the values are constant, but kcalloc() is generally > preferred Ok, I can submit a new version with kcalloc. One thing that I do not understand however is why checkpatch.pl remains silent on this one. I guess it should raise the ALLOC_WITH_MULTIPLY warning here. I tried to dive into the script to understand why, but I drowned in regexes (and Perl, with which I am not familiar with). Could it be because of both sides being constant ? Thanks, Alexis -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com