Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1588570rwd; Tue, 13 Jun 2023 11:07:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6vcySzchCb+6ctow42fooIx9PKoMmsQi3c/loqz49e3WY2HDQ7hKOgJnUXDTSHiciiMInF X-Received: by 2002:a17:903:1390:b0:1b2:28ca:d16 with SMTP id jx16-20020a170903139000b001b228ca0d16mr9023459plb.44.1686679664162; Tue, 13 Jun 2023 11:07:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686679664; cv=pass; d=google.com; s=arc-20160816; b=iHeVjrsyxhx+ynHw8sNH+wP3xa7hsqOKwANZPjBUnTlqqI5yBwMimWbNkzgM8BaJDz fuM6/RHTGGsdV+W4mQEOYr+ynXzAGjlxJy7DX1Pp3Kb4ZmBIprHJ3v8sLwN40qD/UuuI VnyQfq6HNxh1WsYTI4DJxI0/L7y52FGNLUrNp4c98goJXuVykuRsfCdDQxHbQ2uI8fBC izWkPFlwL5ROiamQx1d134yU++pMANGWJCgxWxqnwyLYpcjvd4jMcrbUJX0UnM0UYbWR GdhJnXp1GBa9NDhoel3R+RM+lHFgN7DAeA/BWfZ4sPg3rq/nmZrv9a/pR85mzp1LtVBv brwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:in-reply-to :content-disposition:references:mail-followup-to:message-id:subject :cc:to:from:date:dkim-signature:dkim-signature; bh=SeGKV2FbE5oaBOinr8p+N5j5c9oH38W99kLRnydrRPc=; b=HtbVh7wSpLXCPWhg2mqPZnFq086OtH9CsikH3tbj7JijWut4PwoUvni8viwWDJ7Yfv qPw1OLdcWfnC8YlCwt7bUvDRr5m55f4uEBOwfqftxh6Fr43T1JaGVRL0V52LA0uY1+di LfoGfCoOL2IBxqaJKDqlyJ6tLh82s3R/1J1dWpHmqne8CAw2T5sqT1a5FjwI8jKCJsjV FCo7OJNoPP4ApWA0P+D/YCD4ayv7nLA7S6ue8NEz+cNXh6ofMPoWdbbmIXDE4MYqmbJR tYw4XNREf0myAzxsd76VmatbM/MV7NU+rruuuXmaDIzppitfTyfjqz8DJdXNA4+dNNf0 kSFQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b="KpH/HTz7"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=D2rDt5Eb; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t3-20020a170902bc4300b001a6ade4c8c2si6590298plz.142.2023.06.13.11.07.31; Tue, 13 Jun 2023 11:07: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=@oracle.com header.s=corp-2023-03-30 header.b="KpH/HTz7"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=D2rDt5Eb; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230297AbjFMR2q (ORCPT + 99 others); Tue, 13 Jun 2023 13:28:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbjFMR2o (ORCPT ); Tue, 13 Jun 2023 13:28:44 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57EA81FC6; Tue, 13 Jun 2023 10:28:15 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35DGiBQ2013871; Tue, 13 Jun 2023 17:25:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=corp-2023-03-30; bh=SeGKV2FbE5oaBOinr8p+N5j5c9oH38W99kLRnydrRPc=; b=KpH/HTz7AGBUeyPBCdGodQtbVg8CHUkGFsacvYM6ofveswjGfUYEeU7sxxzhW+t8q4GI BD5hZKxNC5QRcHa/MSXZ1LET6Gj/9MB/4EyXGAiul7a0chgGWGX63uUJ6PeqyyboTT80 z5N/OzehEL1OWv+6JYxYN0xph9KVH0aEwWOFMeYn+6zJ1rQ4VjNhE4XBrEYQvHkbTc+f MNxGEptWmyDmB7GiHaZ7JMgo+7Vg4NSDAMnDuaTd/5h1RinWVeN0lOIGRJG6t8RdC9GI +FPbii1wTyk/ADUfyYavhstLpxbJfLDlLzZbsUtLQWWuecab3RG5Jtx3ursJrU4vi3Gx 5Q== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r4fs1wvmq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jun 2023 17:25:41 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 35DG3n1j016278; Tue, 13 Jun 2023 17:25:39 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r4fm4fwsn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jun 2023 17:25:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y2PGmiPuEKiyVzpt05nwc/Rwja0W3XpOO/Ds6ZcHfaMeRqsz4P62wP6DggnYKxD1VgZEIaDjtJxRJUiAJnF+t8MqY59VbgV5+rhA8zo2R7uFOUBF1gh3WUsJbK5aPvyEEoIUzVT90rlsG4JoKxhO1LOwo62RGaWuMCbsXMTxfUJxj9TvZWQt/HOlOYvKhOL8ghO0w26gV/ltTNLfycbssqfGIQLEjHUxXTiVHTyLlWJCmOCkB9V7Anvw4PwFji9s8y2T9ZELHfWtOcbsAOacsZPy+SECLZl/YQM1wZlYFgk1kD0vlBqFuDFShCblnEZzNzPSNWOhne1icn0MEdFDHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SeGKV2FbE5oaBOinr8p+N5j5c9oH38W99kLRnydrRPc=; b=fY43GtwpKWijLFQShaSzLb/QmeatxLmqSox86ePatOj+I3jprZN1kin3j7AajL3wIs55cLDb0eGJtR+mfPejAin0Lih8Wj9Onm1wIJI+KFByDgZ2AOxrFS0h50A5hOxEIkKjC3Xg4J0Wd5l0FO3Ss8eYX7/6vCSkTDLwLZI542wYjKi4ZvU1M5fQdHFByHxqOTgVswy4ty0Z5T5A8HETPI7eoT+l0xlw6SMAHkNztSbWY6WUTuHSzlc+jpmMUrFpEcFGplgNkZE1MuVRGrX4tnUURDbkUQkwJwgYYvq/ku0Yye+J+SqGpFYIIUqT5Q59tIlXPmy90BSvZfFyHB95fA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SeGKV2FbE5oaBOinr8p+N5j5c9oH38W99kLRnydrRPc=; b=D2rDt5EblaTDW6CEKNtpOc2iWAtnRQ+s5kMmWgCsgrG6Z/M9beNFIB9LaTWkxUB6LZasdRVL9ScDVcxFp9tTnkBVruGaC0SsaR9qsAyQVrEdrwfuDCsii0LrDR0LHOHmaq/tpVL4Ou1i3SAO56c9EiDSsN3Spojng2kgIISwihQ= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by CO1PR10MB4596.namprd10.prod.outlook.com (2603:10b6:303:6f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.44; Tue, 13 Jun 2023 17:25:36 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::998f:d221:5fb6:c67d]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::998f:d221:5fb6:c67d%7]) with mapi id 15.20.6455.045; Tue, 13 Jun 2023 17:25:36 +0000 Date: Tue, 13 Jun 2023 13:25:32 -0400 From: "Liam R. Howlett" To: Danilo Krummrich Cc: airlied@gmail.com, daniel@ffwll.ch, tzimmermann@suse.de, mripard@kernel.org, corbet@lwn.net, christian.koenig@amd.com, bskeggs@redhat.com, matthew.brost@intel.com, boris.brezillon@collabora.com, alexdeucher@gmail.com, ogabbay@kernel.org, bagasdotme@gmail.com, willy@infradead.org, jason@jlekstrand.net, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH drm-next v4 02/14] maple_tree: split up MA_STATE() macro Message-ID: <20230613172532.o7gswjygcqndzsqw@revolver> Mail-Followup-To: "Liam R. Howlett" , Danilo Krummrich , airlied@gmail.com, daniel@ffwll.ch, tzimmermann@suse.de, mripard@kernel.org, corbet@lwn.net, christian.koenig@amd.com, bskeggs@redhat.com, matthew.brost@intel.com, boris.brezillon@collabora.com, alexdeucher@gmail.com, ogabbay@kernel.org, bagasdotme@gmail.com, willy@infradead.org, jason@jlekstrand.net, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20230606223130.6132-1-dakr@redhat.com> <20230606223130.6132-3-dakr@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230606223130.6132-3-dakr@redhat.com> User-Agent: NeoMutt/20220429 X-ClientProxiedBy: YT4PR01CA0403.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:108::17) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|CO1PR10MB4596:EE_ X-MS-Office365-Filtering-Correlation-Id: 640ce331-a024-4efd-a88b-08db6c333369 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NrdeWLbJxnPdQIxod87ZF/oe6Tv2HCT5m937UdAFwSwmaUKV25AnOI4P8twlLeim2B4qy8Hi2RbBbegYR0fXaS6EU6sLxoX3AlZNc0bYnMTiRXqvcI06Q75onYiqeU5k5L6+ywBsPQmgOa1yoYg4nwrF9hVrTJVxeU+Jk9w1POE9Ik2PwgCwQ1C9mSlkYDIurD+m9P45nOUvMSs0vOX/LpmZyEAO6uF3nJkfxs4tRsUrsnM12WfSv767eODzAbgBzTZUWshEPcpXLSvOtdCvBz8z35j5Iu6OCZFTLapc3zy1p+74pdvtYhAYVDNUbRuKCQOZ74ePQrYZinjUQGGKQZ3E60ZhGiT3uMOtNx8OjisrdbrfqP/29hAlLXjWx23HYe5a6twR8iGWnbbxZhfsZmcc1ihkC2VIlSKyQWnxevyx+0lGOlAZmSfzVEREQmNB/nbL9/qaePn5gEgZ1iVvYdwZoT5YgHBLL1fqygf0NBEuCZZajZQC+qd6CEib/h/8t4EqLEplSHzXp1GiKJU1cZECDwfb3Up/eeHQzhXedDmXDMrNRW0rDnvRf+tiyrsV X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(396003)(346002)(136003)(376002)(366004)(39860400002)(451199021)(6486002)(6666004)(9686003)(83380400001)(38100700002)(86362001)(33716001)(6512007)(26005)(1076003)(6506007)(186003)(2906002)(5660300002)(8676002)(7416002)(8936002)(316002)(41300700001)(6916009)(66946007)(66556008)(4326008)(66476007)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?riDRQKvDVDcQvV/GLBPlaOaEIJGT4e+YAImAlZNNXTo+Io3uogZNwOupum1Z?= =?us-ascii?Q?AKqG2RAq65hnZAkGde123Njw1FY4DA1lf+IuV9kgYZLysXlxxANPv/DKnd+r?= =?us-ascii?Q?67170BAljZs4ftmzZVbICxEp8bHMbcBusfz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-ascii?Q?YFCoDwxhGkGL5yoYIxlHjcf9W4fC/b4qMgCex+Xm10XGgN5HbELlB0ZL/gFy?= =?us-ascii?Q?OwhLJhpDMfg7QlyUxnKUDPMWjHFYl2KH8eFAuJhZvNK98MOq/mUN2i/vztK5?= =?us-ascii?Q?aXtXo9Ls8EHPSn3/Xo5R0Oq3DyuRL92kXko4Vh0QEbV4cauDhxzXuZa0jINN?= =?us-ascii?Q?ShhtL7f3cbtBpnqGO06iaUQkLsP92+hHXwB8r3yUTsahSZxZmkl6gNqRDHl3?= =?us-ascii?Q?sdvB4ecxEPpitaHnB7N5/LS0gDhnjW0kW+j93EMGm6lUIDY5KLfGnuTQRnkN?= =?us-ascii?Q?LoNzgiNVDh0MB1B255YaTnhKG1Ii1A0NCzCEiuxeuUREsYZnNsJUsTuiOH6W?= =?us-ascii?Q?Agz676ZaMUZglGz4jVVrrBKn1UHUk4Kndp9UcduaogZBast4v+WXd7JZTCrs?= =?us-ascii?Q?u80r9CfMs4smTnZslb0dltSkzhuyHlO4nHfgqvrKPdM84aoABe12lfrpu2zn?= =?us-ascii?Q?2kzhwqRc6t5LnSkoCx5OiurlzcWvXMXi/mVeS1Z97aYo9rAOHpJ2o/abD2wH?= =?us-ascii?Q?L2XjXymVg5WTcIQyDWiFpnGWO3jW9zORFobowSIOfbUVNRDSRsRK7Mhactfg?= =?us-ascii?Q?DQ=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?us-ascii?Q?N4WO+w89SjHcVLkFb4ZSm8WN+fMinGRDep2AOJDhKiZxA7ApQ9In/1oWTmyY?= =?us-ascii?Q?3fjIGyaB4rXko1MxneNNz6y2goncsuE7b2XD7Zzzt8NF/28ptNBpKUgWKi5K?= =?us-ascii?Q?38wkj7fesVoADTFNs5ic0gSk/sc3y1Zo+aiqdfwlVR/iWQHKpK+asybHVonI?= =?us-ascii?Q?PH4ZNmxaZxNyEh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ub?= =?us-ascii?Q?oivAyQtE6MPF0guu2DkDSc2++T5FYjZDBEVv7OUxcQ5HXQ04V95MAZMj7R+B?= =?us-ascii?Q?nfEbBrDmVMKwh/8giUYEGw9NmH1Do6/wzQ=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 640ce331-a024-4efd-a88b-08db6c333369 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2023 17:25:36.5681 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nR6pIlSOcQ1TdkqpFh3fuqPYbVilXS8AlpTWkn9LwfjkdlbcP3dusrSryZY/5zTfLvPWNEk3ssRJJKAzp0GNBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4596 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-13_20,2023-06-12_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 mlxscore=0 spamscore=0 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306130154 X-Proofpoint-GUID: vpWtrFuiJbunxAjfgUpK1H4iSDUxzOT1 X-Proofpoint-ORIG-GUID: vpWtrFuiJbunxAjfgUpK1H4iSDUxzOT1 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 * Danilo Krummrich [230606 18:31]: > Split up the MA_STATE() macro such that components using the maple tree > can easily inherit from struct ma_state and build custom tree walk > macros to hide their internals from users. > > Example: > > struct sample_iterator { > struct ma_state mas; > struct sample_mgr *mgr; > }; > > \#define SAMPLE_ITERATOR(name, __mgr, start) \ > struct sample_iterator name = { \ > .mas = MA_STATE_INIT(&(__mgr)->mt, start, 0), \ > .mgr = __mgr, \ > } > > \#define sample_iter_for_each_range(it__, entry__, end__) \ > mas_for_each(&(it__).mas, entry__, end__) > > -- > > struct sample *sample; > SAMPLE_ITERATOR(si, min); > > sample_iter_for_each_range(&si, sample, max) { > frob(mgr, sample); > } > > Signed-off-by: Danilo Krummrich Reviewed-by: Liam R. Howlett > --- > include/linux/maple_tree.h | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h > index 1fadb5f5978b..87d55334f1c2 100644 > --- a/include/linux/maple_tree.h > +++ b/include/linux/maple_tree.h > @@ -423,8 +423,8 @@ struct ma_wr_state { > #define MA_ERROR(err) \ > ((struct maple_enode *)(((unsigned long)err << 2) | 2UL)) > > -#define MA_STATE(name, mt, first, end) \ > - struct ma_state name = { \ > +#define MA_STATE_INIT(mt, first, end) \ > + { \ > .tree = mt, \ > .index = first, \ > .last = end, \ > @@ -435,6 +435,9 @@ struct ma_wr_state { > .mas_flags = 0, \ > } > > +#define MA_STATE(name, mt, first, end) \ > + struct ma_state name = MA_STATE_INIT(mt, first, end) > + > #define MA_WR_STATE(name, ma_state, wr_entry) \ > struct ma_wr_state name = { \ > .mas = ma_state, \ > -- > 2.40.1 > >