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 0BC3043B55; Tue, 20 Feb 2024 16:14:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E52A940648; Tue, 20 Feb 2024 16:14:50 +0100 (CET) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 0009740289 for ; Tue, 20 Feb 2024 16:14:48 +0100 (CET) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6e46e07ff07so1229664b3a.3 for ; Tue, 20 Feb 2024 07:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1708442088; x=1709046888; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=LNQFJMpsyZ6UdRqRVo+z+zfTt3Y30yKnkot7oNeKggM=; b=bkbxkwpcYbsOL/esUQcHg2qZr42wyXNOWQklLjfVPZVx5tjDq/N+tkVVROpG7NHHnQ FWpLhU0iZziGdz/1yNprcaPG46cED9Wm4+hcuywlar76GywvzlSI4KH6/BWolUi47+Mr ae22/JjbK6dVM/lkgCRyLPDV8JmUnuORTHy59or1Ztbegx+icF8AXsGPaLywvxVKmz2S OVRf9xXAEbleLeiOp83H3shDbOj3jy3n29XgxkCg8cHeKH2gJ/SuuVSXDq/iI/TXP4Um lspuuG/N9mEsI2THo8AfGC4eQDXg09kHenRcTnj8X5tbskV2HeRyFWm94FT7SesqxCIr MbZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708442088; x=1709046888; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LNQFJMpsyZ6UdRqRVo+z+zfTt3Y30yKnkot7oNeKggM=; b=DCGW8/kLFdkF8TI4v2iKVPFXPGHIH3V1j9F3CdA3vfBk7JnX/BmUOMowGzffXeIM1C MdqyT8Qze6kED+dEWZVYV+n45f66N17RFkvQ/2WoTamguCreCq7V8m7es9qIckFzV0SU FWc8H27bGqZw3xMrkOpsTtHRuad5MB5Xt4/oGoGbODc6eKrZBMmARMTt5gDydkDEVB4Z KlLnQTVrAlD0z+gdWpmiwaTP6RCbpK1eK56MS0/6MPOl9iFAxR4TUf1GS141vzK5VVxI QQGjtxRmAno0qVfJmkjQd5YcfA0FhftAqNeXOEeB/wuc8NWVN5qyaSU34z7WuHNsV9RA wiIg== X-Gm-Message-State: AOJu0YyABGbY6QcFBcXww++pnU5pvIcPu/NayxkapBk0GEUFMkaI0Ajd 8TgOoEoNBw/t9fiItaHcytbIMPxxusgaWLPNnpkmrLklrPr+jtwvg4kkMKDTnjk= X-Google-Smtp-Source: AGHT+IFo5SvJikOW/M+Z8/fI1wjDX1lKQFAIhGRP/rAT3Mf9pWO4g0kDC2bK6ISW3pA8dTpJgqaaiA== X-Received: by 2002:a05:6a00:2da6:b0:6e3:b4a5:4b53 with SMTP id fb38-20020a056a002da600b006e3b4a54b53mr9569410pfb.24.1708442088128; Tue, 20 Feb 2024 07:14:48 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id du17-20020a056a002b5100b006e46672df97sm3690381pfb.75.2024.02.20.07.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:14:47 -0800 (PST) Date: Tue, 20 Feb 2024 07:14:46 -0800 From: Stephen Hemminger To: Jie Hai Cc: , , , , , Subject: Re: [PATCH v3 1/7] ethdev: support report register names and filter Message-ID: <20240220071446.6eea0168@hermes.local> In-Reply-To: <20240220105823.570841-2-haijie1@huawei.com> References: <20231214015650.3738578-1-haijie1@huawei.com> <20240220105823.570841-1-haijie1@huawei.com> <20240220105823.570841-2-haijie1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Tue, 20 Feb 2024 18:58:17 +0800 Jie Hai wrote: > int > rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info) > +{ > + struct rte_dev_reg_info reg_info = { 0 }; > + int ret; > + > + if (info == NULL) { > + RTE_ETHDEV_LOG_LINE(ERR, > + "Cannot get ethdev port %u register info to NULL", > + port_id); > + return -EINVAL; > + } > + > + reg_info.length = info->length; > + reg_info.data = info->data; > + reg_info.names = NULL; > + reg_info.filter = NULL; Those NULL assignments are unnecessary, already initialized structure.