From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 361852B9E for ; Sat, 8 Jul 2017 22:31:41 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CE337206B6; Sat, 8 Jul 2017 16:31:40 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sat, 08 Jul 2017 16:31:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Wuik/AwTsBDoH5q l4tCE6fMuYe0EgbXdojloRV+owJ0=; b=q+x2n7xTv8mfhWfiikD3P5XXCQiu2TC 1MIQPR0ZHyjOLa9HR1tte6wXGYE53ZIHo2XG9Wk1kezSmcvcy5G2ShMVBx3sjqkU oT6XWVYEseeKd0Zg9tAARPa1JGkDHj+jl2Qm72sC2LfdSXFkJMdigp6hNuYkDfsa DC/wAMKkqR20= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=Wuik/AwTsBDoH5ql4tCE6fMuYe0EgbXdojloRV+owJ0=; b=KEX9CYLK U7AUahvXFw0wG3Wj9x8jD2BblbdtbQEdSGFqInnhYaKF74AnEnSRLNSyaHR81OqP 15b5rSqT3mKFxX4eRFnuscfKmdVQ1A2XzbkQGMR9JfICYh2mI9M+vOpfHBM5INUf Ju94EKuQC4FbA/xBU2/4l8Uj3WKGNz1v5ZBO92fRZyJKcYMGZclrIh8wmqRFSrG0 uKezhe1XOqUgEVdELiYE7RrzXDSR87a97suXxCPDEsXOAdbNmP4MJ/tDYgkT+JOd 5ZhLnepo2QMhF1yvoDb/S1yDqhJ+TF8e1lRK5qcTCkNa7EU9twBU671OuZ/J/T+F FAyEtGvGriIi7Q== X-ME-Sender: X-Sasl-enc: Qm90pQVFCl94CPqK5dqwSPC1lQ/oe5MucZh7m0Ulp5Z0 1499545900 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 8A3942486C; Sat, 8 Jul 2017 16:31:40 -0400 (EDT) From: Thomas Monjalon To: =?ISO-8859-1?Q?Ga=EBtan?= Rivet , Stephen Hemminger Cc: dev@dpdk.org Date: Sat, 08 Jul 2017 22:31:39 +0200 Message-ID: <2387863.K5ZdIjvSud@xps> In-Reply-To: <20170707083135.GP11154@bidouze.vm.6wind.com> References: <20170706174502.0eaa5d0c@xeon-e3> <20170707083135.GP11154@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" 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: Sat, 08 Jul 2017 20:31:41 -0000 07/07/2017 10:31, Ga=EBtan Rivet: > On Thu, Jul 06, 2017 at 05:45:02PM -0700, Stephen Hemminger wrote: > > On Fri, 7 Jul 2017 02:03:12 +0200 > > Gaetan Rivet wrote: > >=20 > > > +static int > > > +bus_name_cmp(const struct rte_bus *bus, const void *_name) > > > +{ > > > + const char *name =3D _name; > > > + > > > + return strncmp(bus->name, name, > > > + strlen(bus->name)); > >=20 > > I don't think you need the _name variable hack. C will cast the argumen= t to strncmp >=20 > You're right, and it was just habit. Usually I prefer giving a type to a > generic parameter, but in this case it may be too trivial. Simplified when applying.