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 D94EA42437; Fri, 20 Jan 2023 17:47:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73A3F40E5A; Fri, 20 Jan 2023 17:47:21 +0100 (CET) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 2AE0C4067E for ; Fri, 20 Jan 2023 17:47:19 +0100 (CET) Received: by mail-pj1-f44.google.com with SMTP id n20-20020a17090aab9400b00229ca6a4636so8731010pjq.0 for ; Fri, 20 Jan 2023 08:47:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=k6Ffm0spdKe22JZ30+jn2PPBi8aQB+pULnqlth3Itoc=; b=EHNeBS/LfwqjEilc0cnMQ8wZNpPSsAiMY1avrNgCiGN5A6obuyWZFW8BrzO84ZjTLq fS0AHLShO/LBjsI0PtM6ps7Z4G5SdTfw7/rpBYjD7OkWTI+VuxjIyRbBxpLAM92bluBV fMO4tgnsbURdmfZHFaBwfoy0MsbuDU5ghPVx4aZR1tSGSbhwOPBCP1GGEggP2vCmJK5g ULu/Pe171/iLJfxIBdD60/Z7XRe4KC4FBLE/uoYl/YQTnMPQJVW4nz1/lp9HYxVRrp99 B+S7IMVD0f1PB2IbLmUjMLMrurs75luZt0LVCFX93SJIXYEo6xmOp2btxsrH95aNvoqy Qo7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=k6Ffm0spdKe22JZ30+jn2PPBi8aQB+pULnqlth3Itoc=; b=Pl4YfyW3izUjGYAxAOMADWc0xUXnH+Nz+jTz9MWfsx8121nH7tRAGKPuDR1FL2GPwM /WKbaTv7Dc1NhRKP7zQgIohN3tkKqnTWr0pMN6k48jL2XBWHbwNHBdxPRxo/gt+ErbaA cBxm7X+lIIAEhLtweUx1jC7B2Wo24mPVvFLN5iyLAqSf+mUMUl0mCzakOpqXDoZXHTeC A7/7W/DSkY+zyCJSi7F51AQGM0AS/sGm3vHgx0kLigkJQVXwtxO0Z4f7gu2GBiWQYAlq eKkj/jt3wtK+Vool9X4wwWa9peD89HNmBm2s83vyLkvR3e4BNfLo4txXxzUqzVXwtw2q P0+g== X-Gm-Message-State: AFqh2koXYVqGLQaClZ7cMCKXX4TWYLZuVIGh5YVAKEH1wvuDMMRGBLO5 3B/cZY7+dUnuJ5OGeMSsvTRw9Q== X-Google-Smtp-Source: AMrXdXsqZFFIZVEoiqfowXHxInhlSWEw5Uinj7rmnn8cXQLFj7TAm7PujPQ2TrD9mNyTLaJ5AkO60A== X-Received: by 2002:a17:90b:3902:b0:228:a39c:8d11 with SMTP id ob2-20020a17090b390200b00228a39c8d11mr16034990pjb.1.1674233238056; Fri, 20 Jan 2023 08:47:18 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id o71-20020a17090a0a4d00b00229094aabd0sm1680430pjo.35.2023.01.20.08.47.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 08:47:17 -0800 (PST) Date: Fri, 20 Jan 2023 08:47:15 -0800 From: Stephen Hemminger To: okaya@kernel.org Cc: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , dev@dpdk.org Subject: Re: [PATCH v3 10/10] bus/vdev: check result of rte_vdev_device_name Message-ID: <20230120084715.18e0fb24@hermes.local> In-Reply-To: <20230120044140.95975-11-okaya@kernel.org> References: <20230120044140.95975-1-okaya@kernel.org> <20230120044140.95975-11-okaya@kernel.org> 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 Thu, 19 Jan 2023 23:41:40 -0500 okaya@kernel.org wrote: > diff --git a/lib/ethdev/ethdev_vdev.h b/lib/ethdev/ethdev_vdev.h > index 364f140f91..6d94a65d97 100644 > --- a/lib/ethdev/ethdev_vdev.h > +++ b/lib/ethdev/ethdev_vdev.h > @@ -34,6 +34,8 @@ rte_eth_vdev_allocate(struct rte_vdev_device *dev, size_t private_data_size) > { > struct rte_eth_dev *eth_dev; > const char *name = rte_vdev_device_name(dev); > + if (name == NULL) > + return NULL; Please add a blank line after declarations and before code. For some reason the DPDK version of checkpatch suppresses this warning.