Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3038657rwo; Mon, 24 Jul 2023 05:29:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlEsh+fr5fQ54NwRGo20+1URQxwf59kEtwud+wb4/liJikTo2AdJ+RqyrYaHYJ1SXojbC+40 X-Received: by 2002:a17:902:ba88:b0:1b8:944a:a932 with SMTP id k8-20020a170902ba8800b001b8944aa932mr6057350pls.2.1690201778168; Mon, 24 Jul 2023 05:29:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690201778; cv=none; d=google.com; s=arc-20160816; b=ynT3K5R44y63M8NhWb1iKKskSJOwO7J+iDvO1UIb3WIV/W5u57TmIeXj7hqFYJcCCm /je6Kp/xTkkWe9Xn8001bH+n+eYWsnZ6bR69KvvHfskFpDaX4+usPwNrOLRdT73bvlRf r4MA9o5OKwSgXIT+gb0gPg2DbvDz1Bgry5l4kh6pE9ZU1rlbLLYa4gffbe2DIsNMT+3+ 69hqRh434dZ1/F0n+U0Bz6pE1f9zrhSpAxdXSlDyN5aPa9vrk286sKMgK4ZxIL4Kgesp SPiouUXKwQeu69YC3grJx+HbS7JKJRHW2e8MXQh7fSF9UYmDXGGpAOs5MFrrDZRNJADe w8wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=7PZexeN6hbpUZYsCuquywDZe2gRag40g3yvpPz+0Uh8=; fh=0Rg8n1G5CviFL+01fwCd5hWpPmo4L20D7K0B61+grBA=; b=MwzW7CVacAV8t2XF5dxkBJtyyIl9yb/S12zwLglFsg1/UJEiDnPLJUdFKfVXkbYmWJ uUbZa0tnfu38WoYp5jt3wWWip+R9/JF5r10WRQs1Oxy5Ho7exzF0ye99IzXJi0AP5sre uRRPWg2laF8aLa0S4grFGDQWf1EFdiELIb9OUxlOo9K2psnQIlfEIbWM9LmUQh5UdJnI PgtIHsnw5pnlKuRgK4Fo/kCMNfkDC34C/ekr4++Co68Xxdq41KBhVNQeQeBe0hgS1fbX jTkbSuNr/QolHRcN/DndlqLLYVqg1kwbfE4WXm3wVvsaxTzLNc3laXN6WxFp6IOlQ4ty NROw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=StjLlV4Z; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020a17090341c200b001b8698149fbsi9692104ple.477.2023.07.24.05.29.26; Mon, 24 Jul 2023 05:29:38 -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=@kernel.org header.s=k20201202 header.b=StjLlV4Z; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230200AbjGXMKC (ORCPT + 99 others); Mon, 24 Jul 2023 08:10:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbjGXMKA (ORCPT ); Mon, 24 Jul 2023 08:10:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B64D51A1; Mon, 24 Jul 2023 05:09:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4C0D5610E8; Mon, 24 Jul 2023 12:09:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4737AC433C8; Mon, 24 Jul 2023 12:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690200598; bh=EoXi+SbOO8vDaHlFvh9EVJp1zz3LkQYJjaqWNgjLlMg=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=StjLlV4ZDnlH8S/PUJPmeeHp4xb/d4yNw9ruUP40RQZy+02d8C9iGKL7RkR9dfAzl PPgXHMDFI5ua3KsfTIS7TaGJrZ63AgXdb6cKjM339T0o1iCsOY4tvSx0ydGrdQN9FM 6G8wQnFJZAVg9bsRE2p1PaeC68SxB0+4uQpjSSazboueB7dV6vV+PfPSFQo8j4h4fU vWE03u0xUcxUu7SqV2uf1CVpP8u2hy/e3Hc8tqZ2Q8yNeJigFqjBrNNVDhJXSWsiBb /1MKZG5Ts9vaXldmTkQd9XMsm5JkOL5tz/cVUzrNvxYb7lSPwcOQxIKEaM225naVHX WAzgngAvED0dQ== From: Leon Romanovsky To: Dennis Dalessandro , Jason Gunthorpe , Christophe JAILLET Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-rdma@vger.kernel.org In-Reply-To: =?utf-8?q?=3Cf4618a67d5ae0a30eb3f2b4558c8cc790feed79a=2E1690044?= =?utf-8?q?376=2Egit=2Echristophe=2Ejaillet=40wanadoo=2Efr=3E?= References: =?utf-8?q?=3Cf4618a67d5ae0a30eb3f2b4558c8cc790feed79a=2E16900443?= =?utf-8?q?76=2Egit=2Echristophe=2Ejaillet=40wanadoo=2Efr=3E?= Subject: Re: [PATCH v2] IB/hfi1: Use struct_size() Message-Id: <169020059491.473139.10236132535455236281.b4-ty@kernel.org> Date: Mon, 24 Jul 2023 15:09:54 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12-dev-a055d X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 On Sat, 22 Jul 2023 18:47:24 +0200, Christophe JAILLET wrote: > Use struct_size() instead of hand-writing it, when allocating a structure > with a flex array. > > This is less verbose, more robust and more informative. > > Applied, thanks! [1/1] IB/hfi1: Use struct_size() https://git.kernel.org/rdma/rdma/c/24b1b5d85c1c1e Best regards, -- Leon Romanovsky