Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3009101rdg; Tue, 17 Oct 2023 01:27:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZwB1yr5R645YP01XQ2VFHA4K6aLxD49V9AQAQ9JFKDwUOnhfD3PFJvC9/9hch4RiPwP2t X-Received: by 2002:a05:6870:ac89:b0:1d6:790f:25a0 with SMTP id ns9-20020a056870ac8900b001d6790f25a0mr1650266oab.4.1697531238540; Tue, 17 Oct 2023 01:27:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697531238; cv=none; d=google.com; s=arc-20160816; b=cIVJXhbRSG2FJKSs4pgRC/OAnvyk05IJrh+FZ+M++AySNs9noJTi/wO+cxEq69zuRp 9QAA+b9lfEIfYDBUCH9W5ZJxDVInXlHNP+c8fD+0dYLXmzH1apCrsS7HZDy6+C4+WsFf fXTHjwfRWygpxWWS6pvaXdq9CF/pRfZaDG4E602wM5jCJVk+xua8brkkPCX4NWMqaJQw XF3sDNAVFjEtl1i/qutTuZcQxJj9Q8mDVUUM7hEQwJL4FzTuALY7kxtAwbs7hXyaypx9 j+SBrycno3VI3eGpcWc160QWXmdR5AqHJPRI6xnIzPMOilu1WdIPDqaYaMPwfUx5V4+6 AnAg== 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=V9RqjAr2qnLGSR32tAtTp3+NiG84U4voNqHqPUb3Jxc=; fh=ab4hqzKEwWp7Rrb7FeSlWPVYgeIfae+MoUBg4Yo+Qm0=; b=iAZ0WKYYDl4HScIYp/4tqROPavApYT2iER2cjoUvFJErtHfe/kUCXaenOyaH2o2W7Q oT0LOglhUV6Mz/NW0tTl5jHSsZe/M4033JCAWNDS7eVClOlOiZ5MFRQyMZRRA3sQcQU4 sViG7NW7bZyQxLTunsTBoeiNd6xtzuA9ViDG1UUHeRUh9sLCiW46MpbQLzSEe/OIRuCT oj29APJsBAmoybMqIcY1WQkLGkD5YA6XO9CiaTxxuOqQoQL21cC/AkgBwVQwyKQQUxSW +GCkzT79xZk8eM0q+PhfX+llv0v6pRWO3CRWoL8/ex34PmCmli3RlEMVxiyjLhzfa/OC UiiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=KfvPlVpg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id by34-20020a056a0205a200b00563d9ff5158si1398963pgb.350.2023.10.17.01.27.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 01:27:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=KfvPlVpg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 1B7B08040D71; Tue, 17 Oct 2023 01:27:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234627AbjJQI1K (ORCPT + 52 others); Tue, 17 Oct 2023 04:27:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbjJQI1J (ORCPT ); Tue, 17 Oct 2023 04:27:09 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17A93B0; Tue, 17 Oct 2023 01:27:06 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3833E240002; Tue, 17 Oct 2023 08:27:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1697531225; 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=V9RqjAr2qnLGSR32tAtTp3+NiG84U4voNqHqPUb3Jxc=; b=KfvPlVpgfS25r0+BHMHsTI+mssMt455BJEQYmxA2tLX0ukgtsxtFurlO8NpuKvvDiB9lWZ QSbs/muTmycKUetEmsxmeF3H2jky11G4+XfcXw3c0zedJLQyOH1QoPqUYBWAXBYQOGNscv W2p89fpzB5IkuSZaPAjqSVT65rQH5d1wNeeKq4o6DdG8ieJ+dOAs5BolVsETV4mwlGhxB6 TEgZtEt8Tait4Gl0pemq2pKNarxS0ofyHLg9AkPoenAOhn5rFCd5ji8+037RjDD6ZwiLZy Dz8/TPNbTGup89OIcXFNIc+na/l5ZRlHykwqfqzfaGdcIAiSeoicGPqD9B3cNQ== Message-ID: Date: Tue, 17 Oct 2023 10:28:19 +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> <74eac5f2-228b-4775-a101-53b2fdd5bf86@bootlin.com> <32ab8646-d41d-4dd2-a8c8-93845f198462@quicinc.com> Content-Language: en-US From: =?UTF-8?Q?Alexis_Lothor=C3=A9?= In-Reply-To: <32ab8646-d41d-4dd2-a8c8-93845f198462@quicinc.com> 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 morse.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 (morse.vger.email [0.0.0.0]); Tue, 17 Oct 2023 01:27:13 -0700 (PDT) On 10/17/23 00:51, Jeff Johnson wrote: > On 10/16/2023 2:23 PM, Alexis Lothoré wrote: >> Hello Jeff, >> >> On 10/16/23 17:26, Jeff Johnson wrote: >>> On 10/16/2023 1:29 AM, Alexis Lothoré wrote: >>> 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 ? > > I also drown when looking at checkpatch.pl -- so many "write-only" regexes! But > I think the following is what excludes your patch: > $r1 =~ /^[A-Z_][A-Z0-9_]*$ > > It is a compile-time constant so the compiler can flag on overflow, so it's your > call to modify or not. Thanks for taking a look. I have tried to tweak those lines to see if it makes checkpatch raise the warning, without success. Anyway, I agree with your initial statement, let's keep the code base homogeneous and replace kzalloc with kcalloc > /jeff -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com