From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8029042FBD; Thu, 3 Aug 2023 04:33:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C436406BA; Thu, 3 Aug 2023 04:33:29 +0200 (CEST) Received: from smtpbgeu2.qq.com (smtpbgeu2.qq.com [18.194.254.142]) by mails.dpdk.org (Postfix) with ESMTP id A6553406B8 for ; Thu, 3 Aug 2023 04:33:27 +0200 (CEST) X-QQ-mid: bizesmtp76t1691029988tcxljzr4 Received: from LAPTOP96V0OHHN ( [183.81.182.182]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 03 Aug 2023 10:33:07 +0800 (CST) X-QQ-SSF: 00400000000000D0F000000A0000000 X-QQ-FEAT: BycE0arnt6T/86eKrdl4j7zyH/x9UixMYjzfgf13589PB5JmF43frFymAqspY TtANDV1iykEiqB1r4WbQKVHqPzv4n5+Lw4ewigfjkYdhDAgt9O5pLZT0jFbY+Q5al54aSXz 28XhF7WUd3BZQ/K1//3UzfTbiD5GPEMr+Q+T9p74iMWS73Du0CoAMrrwSp46Mrb8p1T7RC3 ARYx01N6BAN8GRHhZNLHMPTtGltExzs2W5/N1udMWr5xfxZlEa1uva4kipepYbHbVfWV/vb pIJDnH3zJmAAUOVRoX0iz7Q5/jqDx04ScDeF6zkOsCRrYhyeX8xgdiw4NfoUQDA1mx1hri4 gT9n9S2qj83v8SICsQNGRIKNVZiDsUEMavyCRiUGRADG3C6fo1emIcoyI0zGDqVpsnZn7Lp X-QQ-GoodBg: 2 X-BIZMAIL-ID: 656212502325561144 From: "11" To: "'Stephen Hemminger'" Cc: "'Anatoly Burakov'" , , , References: <20230802081106.2340406-1-caowenbo@mucse.com> <20230802081106.2340406-4-caowenbo@mucse.com> <20230802090825.328eae84@hermes.local> In-Reply-To: <20230802090825.328eae84@hermes.local> Subject: RE: [PATCH v2 3/8] net/rnp: add device init and uninit Date: Thu, 3 Aug 2023 10:33:07 +0800 Message-ID: <5EF3440E44D05DAD+010501d9c5b2$d734c2b0$859e4810$@mucse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHlFHEU5qaXLLOEBoQYNo08TPBbuwKATknNAd4rvLCvnkb74A== Content-Language: zh-cn X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:mucse.com:qybglogicsvrgz:qybglogicsvrgz5a-0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Thanks a lot, this problem that I have never been thought about it. Regards Wenbo. -----Original Message----- From: Stephen Hemminger =20 Sent: 2023=C4=EA8=D4=C23=C8=D5 0:08 To: Wenbo Cao Cc: Anatoly Burakov ; dev@dpdk.org; ferruh.yigit@intel.com; andrew.rybchenko@oktetlabs.ru Subject: Re: [PATCH v2 3/8] net/rnp: add device init and uninit On Wed, 2 Aug 2023 08:11:01 +0000 Wenbo Cao wrote: > +struct rnp_hw { > + void *back; > + char *iobar0; > + uint32_t iobar0_len; > + char *iobar4; > + uint32_t iobar4_len; If possible, don't use untyped pointer for link list (back). The iobar's should probably be void * or better yet map to data = structure. Casts are often a source of bugs in C code.