From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f54.google.com (mail-pg0-f54.google.com [74.125.83.54]) by dpdk.org (Postfix) with ESMTP id 6260F2C8 for ; Fri, 7 Jul 2017 02:45:12 +0200 (CEST) Received: by mail-pg0-f54.google.com with SMTP id u62so8707040pgb.3 for ; Thu, 06 Jul 2017 17:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C4rSRkZcT0fZlaXfUKs7rh59CFlGxGBAaNOCS/CwJeM=; b=CEUwEspEcrYlXKykAvXnskm8qDEH/C1zHIxMej3AMjLtAY+V3LE0hV5zNl7BwGiJVg mKpwtSVRFNRyi2ETQ3Uo9rgH5TQCRRZLoBOKMHsfDUH9OCZn+WByMIeqS/99PETP+8os UUH1STCaPQE6/96xOcf7wgRHLwJVVeMREI71X7Ae/fmIE4EpFQOY3rqZBGCzs+xgSc6+ jEZgBhiq4z1DbNq46mclyglFfZCKbuCTC+Kjznsu309l58LciydJnA07O6c204iyNtrn vaNvYOD6Qp/cLWmThuknSVMJ92P6xaEYvUT4C4tUFQjgMNM2JnUTeKK/wH0IkAipqcx0 YbKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C4rSRkZcT0fZlaXfUKs7rh59CFlGxGBAaNOCS/CwJeM=; b=ikH/b+OWd3vtVJrfd5N5jcpQkSZMSSndn25Dr4gIhnLqCY6lexHGFMvZMbjHPTvm2o ZBVt+PNTzopU7XuR3nf3BcTL6MoWrXrU1/WZAlV08ZAjRsb1Tb7E3dkN8wwk+UYt9aV+ w05+JsiHV92mSC40VCuFXy17DQoB46QcmeKH+SGB5DlNOVebuEOpVExzXugma8tre+a8 atBWAe2PvhiX4vOlMUsRB2YJoWaTsMpFX5iHPsdbdIyqMzwX7J8kF4vBcE9GROlEhM8K xamqMQoQZ6pjB6t8FIW5RoSJ/OOCp9NBQC6BHZApOqG0q53O0qXP3pfbX2+H2vX5jGH+ zjJQ== X-Gm-Message-State: AIVw1135S7pY4kz+Kffiku0wx0VQGTZeY9KGbMF6I3NTJv47odkyJ7c6 YHEVCI4RpziV5/iMx5VL+Q== X-Received: by 10.98.18.16 with SMTP id a16mr27918881pfj.91.1499388311562; Thu, 06 Jul 2017 17:45:11 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id r9sm3148510pfi.114.2017.07.06.17.45.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jul 2017 17:45:11 -0700 (PDT) Date: Thu, 6 Jul 2017 17:45:02 -0700 From: Stephen Hemminger To: Gaetan Rivet Cc: dev@dpdk.org Message-ID: <20170706174502.0eaa5d0c@xeon-e3> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v8 6/6] devargs: parse bus info X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 00:45:12 -0000 On Fri, 7 Jul 2017 02:03:12 +0200 Gaetan Rivet wrote: > +static int > +bus_name_cmp(const struct rte_bus *bus, const void *_name) > +{ > + const char *name = _name; > + > + return strncmp(bus->name, name, > + strlen(bus->name)); I don't think you need the _name variable hack. C will cast the argument to strncmp