Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15256027rwd; Sun, 25 Jun 2023 13:37:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CMG4R+3sBWXWFZB8UYfMYtcUUPfTBEsc47Ub+0Svbc3ed0g0C3B5Ulkgv7p4JUTjGKWcT X-Received: by 2002:a17:902:ecca:b0:1b3:c62d:71b7 with SMTP id a10-20020a170902ecca00b001b3c62d71b7mr5776414plh.18.1687725452794; Sun, 25 Jun 2023 13:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687725452; cv=none; d=google.com; s=arc-20160816; b=FdFW71CFmHdDDXwgcUar1mXzdRkjpnoVpCbBWpspXXC3g/VFoHw/4AZ/oh8+U/SHdr nXFlx2hpADPx2DYeyxpUDj/R2j11gJuT0qMkxzox/SRBcpVlEyMoJH3WW1Z5BIIfy5al F+gTM2XaCdEGV3xP1dmjTf1y8BvCS9mPAK4MbkdmGTnrju+A9n7D/EHxBAST2Aubd9d+ OAESadRm2E/4rjSFvXUqSNdAcEUBO5HPXHFGCu/J4NpqYf7mL9i7IpaLM2ykSnJWDgJr RsMBb53ZMTU5Oc7tBeXJPL4WSOadtSa1ymge4crMwdFH4Ad2wctc0euDhk1M335ALsBI 93Lw== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=nXME6OkhzX+Q4/pak1Ee9R+HRMC5lmyRGp4wFkA/euE=; fh=2EVOzNiwlIj92fgVFdT9eTTz/OSeg7iXtPQzmzucPEc=; b=etDmFiJ9SeuGxswhcuYt4YAU46ypAty/LoM9KvpgbaPW84qioKOwVwRPa51nM0CwYW dIz7CqeaDyFJObidO9acLk0RlLdmHZgemPtSDnJrucdCm7DIz7YSw0NYpF3ww6WK04L4 tHd6LBJTDxwJq2uEyXWiQm+ihDRjon/YixhQaBs3XEtgEU+heCj+jbXNPPzznRwRpONX NJjrmg2cxiuf+j0BKqh9kirvHYDizBBgYIe2gqdgdlK2yR/f6YMu8CfIijMJKPgNB9dD FZrmvIi775KBN/qfiB6snse+v7t1YWXbEx+iqH0jhuYvbCgPesqLg+cdFJmSW+2rqCWW HC9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=K2ec7ji3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z15-20020a170903018f00b001b3dd62b1dbsi3948957plg.560.2023.06.25.13.37.19; Sun, 25 Jun 2023 13:37:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=K2ec7ji3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229599AbjFYUcd (ORCPT + 99 others); Sun, 25 Jun 2023 16:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjFYUcc (ORCPT ); Sun, 25 Jun 2023 16:32:32 -0400 Received: from smtp.smtpout.orange.fr (smtp-15.smtpout.orange.fr [80.12.242.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D9DB1B1 for ; Sun, 25 Jun 2023 13:32:31 -0700 (PDT) Received: from [192.168.1.18] ([86.243.2.178]) by smtp.orange.fr with ESMTPA id DWPLqcf9VaSuRDWPLqwghG; Sun, 25 Jun 2023 22:32:29 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1687725149; bh=nXME6OkhzX+Q4/pak1Ee9R+HRMC5lmyRGp4wFkA/euE=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=K2ec7ji3GcYvg/KUnFVjxHN/jm84mzOYzLt9J//aQuo6uoAOhtGX5hht1eT+0EUKN dzM4RD+e0+4JPCFPHvF/c1/JNdKgOx+VpkF5EmeSqEmryeMAkTsxsu4IOtA3dpljdE hqrRDwA4FQhTDMENHMHRcPCM4UC3gperLZKXUyoYThwInX2E1lhWJSux3l5yYCB2CL ArgD103J54cXgWADbDhOp2GdOfALHfG+Unhj/bh+d1ozdVlUV4Jvh0zUwJuKY+VVEW f1lRtyvEZ2UXn3pzXjSxkOEyYk0Kg1Y2a58RAuDyxCrmY1S7FR2Q2MtzbhiLy++uGF npg+Ir+solJ5w== X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 25 Jun 2023 22:32:29 +0200 X-ME-IP: 86.243.2.178 Message-ID: <36d9998f-e8b1-58cb-9b0a-97273b5eb91b@wanadoo.fr> Date: Sun, 25 Jun 2023 22:32:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 02/26] octeon_ep: use array_size Content-Language: fr, en-GB To: Julia Lawall Cc: Jakub Kicinski , Veerasenareddy Burru , keescook@chromium.org, kernel-janitors@vger.kernel.org, Abhijit Ayarekar , "David S. Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, corbet@lwn.net References: <20230623211457.102544-1-Julia.Lawall@inria.fr> <20230623211457.102544-3-Julia.Lawall@inria.fr> <20230624152826.10e3789b@kernel.org> From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 25/06/2023 à 22:25, Julia Lawall a écrit : > > > On Sun, 25 Jun 2023, Christophe JAILLET wrote: > >> Le 25/06/2023 à 00:28, Jakub Kicinski a écrit : >>> On Fri, 23 Jun 2023 23:14:33 +0200 Julia Lawall wrote: >>>> - oq->buff_info = vzalloc(oq->max_count * OCTEP_OQ_RECVBUF_SIZE); >>>> + oq->buff_info = vzalloc(array_size(oq->max_count, >>>> OCTEP_OQ_RECVBUF_SIZE)); >>> >>> vcalloc seems to exist, is there a reason array_size() is preferred? >> >> Hi, >> >> just for your information, I've just sent [1]. >> >> CJ >> >> [1]: >> https://lore.kernel.org/all/3484e46180dd2cf05d993ff1a78b481bc2ad1f71.1687723931.git.christophe.jaillet@wanadoo.fr/ > > For some reason, I have only received Christophe's mail, not Jakub's... > > In any case, thanks for pointing out the existence of these functions. I > just redid what Kees did in 2018, when I guess these functions didn't > exist. I will look more carefully to see what functions are now available > and resend the whole thing. Hi, should you want to go 1 step further and simplify some code: git grep v[mz]alloc.*array_size\( | wc -l 174 CJ > > Thanks! > > julia