From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4BE3EB64DC for ; Sun, 25 Jun 2023 20:25:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230039AbjFYUZV (ORCPT ); Sun, 25 Jun 2023 16:25:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230023AbjFYUZT (ORCPT ); Sun, 25 Jun 2023 16:25:19 -0400 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6BEE9E; Sun, 25 Jun 2023 13:25:13 -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=4paSFHeIlmi01eelJjcHibWu0numZnAAbkmYQwsVvVw=; b=uTuUd+lYkqHEhC/7BYEgrQLODKlleWH78OO7eRNLvWWsdlxUHM5yQBYw xRE3XSszHkl6bHc1aHvBcIAto3CrGBfPhNk5l3nVLWEY6hW5S9ACjsQsM 7A95HWKENPTaXZGy4u+aI+Dsn1QImuOWTVzsQfDfeIGMLVGYx/9XNA9MI U=; Authentication-Results: mail3-relais-sop.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="59758804" Received: from 231.85.89.92.rev.sfr.net (HELO hadrien) ([92.89.85.231]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2023 22:25:12 +0200 Date: Sun, 25 Jun 2023 22:25:11 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Christophe JAILLET cc: Jakub Kicinski , Julia Lawall , 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: Message-ID: References: <20230623211457.102544-1-Julia.Lawall@inria.fr> <20230623211457.102544-3-Julia.Lawall@inria.fr> <20230624152826.10e3789b@kernel.org> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1326197144-1687724711=:3022" 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-1326197144-1687724711=:3022 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT 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. Thanks! julia --8323329-1326197144-1687724711=:3022--