From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com [209.85.128.179]) by dpdk.org (Postfix) with ESMTP id 339ED2C2B for ; Fri, 7 Jul 2017 10:31:44 +0200 (CEST) Received: by mail-wr0-f179.google.com with SMTP id c11so36448368wrc.3 for ; Fri, 07 Jul 2017 01:31:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=9aymCFuw0n+cW5j5zL7NAn3qYKzEUAuS6K7mf9/SuzA=; b=U5SJ2EnfsYcgh+BuDRKnPsaQIzHo8CqQE1i/K2S/4h+d6Kr+RBPQzSyaRnkO8V7N7K aHOL/ItSZIw7KkUlB3I4FdrrHB4EsAbBTOf548p0D0bw1pNxjsk18hQEHoAC1caYnBqa ftY9lepAb8vjQ1rsFp48PyilXgDiCoNvILIizXgQatHZE9kHg9MwLD3zEaFOyoGxqxlY KHyTvzwb8cMialcutf1O16vh1hWcnkglP6+GkYGIG+aZSHMgxlg0J02IVzYggf/cUrD0 sukHWIxtEGpTQrDrpx0/LLrRLFxhH5rLWp+fzoPb+TkiEzIge75PZRj+s+Yx26oCdvSc zNBA== 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:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=9aymCFuw0n+cW5j5zL7NAn3qYKzEUAuS6K7mf9/SuzA=; b=qo5Kut39sIV8DU/Rk13gBv7LBo7390LVmrzypC5Cqb+Ns+KaYJ0UQzuJjKn/WxBAtc u4yCk7aguHrmrZn6jtUNnlK5QjsskLF8/2SbpvMxPJzZ3RGidLxlc+cVyKg5Fyi1bTu7 THmBYXMTqN31Q5da1FNpLgqt5FXcXxPh0K+Fb9F3JYSg+3pilYzzXoXwoEHNePh2ykx7 z47WD1YSzLFkJP1M9FPUozH9oS6/vGRzy27IziH1iDK1/By/yN3RDVAMtLYQ/rNdLJDs 7XuPETJGbdpRIAbIFf0th76DNG2VAqV7npehsA+HM+MDGWKZKgcXpxqxL9j2eXwr3pHz OF8w== X-Gm-Message-State: AIVw110Oa0Um7unAoRd2U6ezgVaOO2xrpTXSkA1xB+5TQqI1IioVbNUp 0dF2zgRalw+uf4Bp+40= X-Received: by 10.28.156.202 with SMTP id f193mr1338833wme.22.1499416303819; Fri, 07 Jul 2017 01:31:43 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id b205sm1111370wmb.14.2017.07.07.01.31.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jul 2017 01:31:42 -0700 (PDT) Date: Fri, 7 Jul 2017 10:31:35 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Stephen Hemminger Cc: dev@dpdk.org Message-ID: <20170707083135.GP11154@bidouze.vm.6wind.com> References: <20170706174502.0eaa5d0c@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170706174502.0eaa5d0c@xeon-e3> User-Agent: Mutt/1.5.23 (2014-03-12) 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 08:31:44 -0000 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: > > > +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 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. -- Gaëtan Rivet 6WIND