Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15290089rwd; Sun, 25 Jun 2023 14:27:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Wm9n4roYeu00YQBqsDAfU2FYz+hjyCko/X1kf1zINbY3/ncu4wg8rk8wufmGRoZnIt6PO X-Received: by 2002:a17:90a:194c:b0:25b:ea12:a2f5 with SMTP id 12-20020a17090a194c00b0025bea12a2f5mr17221782pjh.35.1687728464770; Sun, 25 Jun 2023 14:27:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687728464; cv=none; d=google.com; s=arc-20160816; b=0JdKKfHiv+ee8Xg/DStv6YHYYa/bIQjIJ76d0DmnQFb6kfNLmOAvK1XxGs95trUEsy 8mxdxWmPG+6wIOQBNQ9+usSTP8oyPrMHpl/4ca/rbu0U3bHX9Oc3vxsJnMnEBcz1AqG1 k6m6BznUI/exyTyFMI8nLvkSxV/WelpkSR4McC3yRXRopF/3RmakR9Hi1XiJg7qvnaFO VlgmSbAJNbiEGCawIiMaFvFBUS00GDSyQqjCrzRSiihtGfVA74pDxGMCJEzrbWmytZPl NcgYo5l+qKE9bI4ddGsPDJlKC/GrSai3mlGWdpkeZPNbZ5MNnuojKB7M46FoGZXQoUoO 8ZfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=PcY9A9k+lzgcjaXAaUSzbrsIGgZvXGyJoIo17mx849A=; fh=V366lEvjOjw4KE5O0sEECDnOe1ZMzvxQsdADIOX2iA0=; b=pbGT6aS43RtLBp3kTiGOZr8mJA4ay5PbtjRfg2g0t7gRgTbopdzQuzKdr6MmxDJm5f MqFDLXFn2x6h2W7N1uQ4D7aaPGawp+rnTk7B/bS45ck1bEpMPijKrKF/XbT0OzH511zM TLpDs8nEPV8Qc4332QrIAwKV71tx3SVo+uksnWSKCd/maPEcIBjPjZ5MX3OztRWtz0Rp NOsQVfcl7SyL2AHlBvLZHheDErJTv/HMHHRG4J1Yjf4Rib8PwtRcAY24h0Q2tQaEiEMQ iZyjN4wV86J0TJ9gzK8yVqXgPvlyTDmeH5kd7LsbyDm9cF0uIRwZyZx4ibak1g9zuGo3 j19g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=jE9z5MBV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my17-20020a17090b4c9100b0025bec4468c2si4551435pjb.167.2023.06.25.14.27.33; Sun, 25 Jun 2023 14:27:44 -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=@inria.fr header.s=dc header.b=jE9z5MBV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229947AbjFYU5M (ORCPT + 99 others); Sun, 25 Jun 2023 16:57:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjFYU5K (ORCPT ); Sun, 25 Jun 2023 16:57:10 -0400 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6633126; Sun, 25 Jun 2023 13:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=PcY9A9k+lzgcjaXAaUSzbrsIGgZvXGyJoIo17mx849A=; b=jE9z5MBV4RruP5dTjzHAhdBF5Mf/Wg7a5tyjr4DzuMOn9+6+VMrVd+YQ IDcaY+NHhlCOc2Zn6jW7+Z6fV2Z3/DfLjcR1qD8EPGfo9WEpZ184cdGSB B4vFj4o5XhFa0JFXZA8a1IYlk7IJ0GX6Y7Q+sqPZK4fUnImnftWcz8r1z 0=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.01,158,1684792800"; d="scan'208";a="114549485" Received: from 231.85.89.92.rev.sfr.net (HELO hadrien) ([92.89.85.231]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2023 22:57:06 +0200 Date: Sun, 25 Jun 2023 22:57:06 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Christophe JAILLET 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 Subject: Re: [PATCH 02/26] octeon_ep: use array_size In-Reply-To: <36d9998f-e8b1-58cb-9b0a-97273b5eb91b@wanadoo.fr> Message-ID: References: <20230623211457.102544-1-Julia.Lawall@inria.fr> <20230623211457.102544-3-Julia.Lawall@inria.fr> <20230624152826.10e3789b@kernel.org> <36d9998f-e8b1-58cb-9b0a-97273b5eb91b@wanadoo.fr> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1352714705-1687726626=:3022" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1352714705-1687726626=:3022 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Sun, 25 Jun 2023, Christophe JAILLET wrote: > 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 Yes, thanks for the suggestion. julia > > CJ > > > > > Thanks! > > > > julia > > --8323329-1352714705-1687726626=:3022--