From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 383AC5A40 for ; Tue, 14 Apr 2015 11:29:15 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 14 Apr 2015 02:29:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,575,1422950400"; d="scan'208";a="480645499" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by FMSMGA003.fm.intel.com with ESMTP; 14 Apr 2015 02:29:13 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 14 Apr 2015 17:29:04 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.24]) by shsmsx102.ccr.corp.intel.com ([169.254.2.223]) with mapi id 14.03.0224.002; Tue, 14 Apr 2015 17:29:03 +0800 From: "Qiu, Michael" To: Stephen Hemminger , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] pci: cleanup whitespace Thread-Index: AQHQdjbLNXRfTanMZU+PYDoXdVEKVg== Date: Tue, 14 Apr 2015 09:29:03 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E602860465254A@SHSMSX101.ccr.corp.intel.com> References: <1428963071-4226-1-git-send-email-stephen@networkplumber.org> <1428963071-4226-2-git-send-email-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] pci: cleanup whitespace X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2015 09:29:15 -0000 On 4/14/2015 6:11 AM, Stephen Hemminger wrote:=0A= > Fix whitespace errors reported by checkpatch, including=0A= > missing space around operators and places where tab should=0A= > be used instead of space.=0A= >=0A= > Signed-off-by: Stephen Hemminger =0A= =0A= Acked-by: Michael Qiu =0A= =0A= > ---=0A= > lib/librte_eal/linuxapp/eal/eal_pci.c | 17 ++++++++---------=0A= > 1 file changed, 8 insertions(+), 9 deletions(-)=0A= >=0A= > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linux= app/eal/eal_pci.c=0A= > index 9cb0ffd..c98a778 100644=0A= > --- a/lib/librte_eal/linuxapp/eal/eal_pci.c=0A= > +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c=0A= > @@ -68,22 +68,22 @@ pci_unbind_kernel_driver(struct rte_pci_device *dev)= =0A= > =0A= > /* open /sys/bus/pci/devices/AAAA:BB:CC.D/driver */=0A= > snprintf(filename, sizeof(filename),=0A= > - SYSFS_PCI_DEVICES "/" PCI_PRI_FMT "/driver/unbind",=0A= > - loc->domain, loc->bus, loc->devid, loc->function);=0A= > + SYSFS_PCI_DEVICES "/" PCI_PRI_FMT "/driver/unbind",=0A= > + loc->domain, loc->bus, loc->devid, loc->function);=0A= > =0A= > f =3D fopen(filename, "w");=0A= > if (f =3D=3D NULL) /* device was not bound */=0A= > return 0;=0A= > =0A= > n =3D snprintf(buf, sizeof(buf), PCI_PRI_FMT "\n",=0A= > - loc->domain, loc->bus, loc->devid, loc->function);=0A= > + loc->domain, loc->bus, loc->devid, loc->function);=0A= > if ((n < 0) || (n >=3D (int)sizeof(buf))) {=0A= > RTE_LOG(ERR, EAL, "%s(): snprintf failed\n", __func__);=0A= > goto error;=0A= > }=0A= > if (fwrite(buf, n, 1, f) =3D=3D 0) {=0A= > RTE_LOG(ERR, EAL, "%s(): could not write to %s\n", __func__,=0A= > - filename);=0A= > + filename);=0A= > goto error;=0A= > }=0A= > =0A= > @@ -205,8 +205,7 @@ pci_parse_sysfs_resource(const char *filename, struct= rte_pci_device *dev)=0A= > return -1;=0A= > }=0A= > =0A= > - for (i =3D 0; i -=0A= > + for (i =3D 0; i < PCI_MAX_RESOURCE; i++) {=0A= > if (fgets(buf, sizeof(buf), f) =3D=3D NULL) {=0A= > RTE_LOG(ERR, EAL,=0A= > "%s(): cannot read resource\n", __func__);=0A= > @@ -402,8 +401,8 @@ parse_pci_addr_format(const char *buf, int bufsize, u= int16_t *domain,=0A= > };=0A= > char *str[PCI_FMT_NVAL]; /* last element-separator is "." not ":" */= =0A= > } splitaddr;=0A= > -=0A= > char *buf_copy =3D strndup(buf, bufsize);=0A= > +=0A= > if (buf_copy =3D=3D NULL)=0A= > return -1;=0A= > =0A= > @@ -411,7 +410,7 @@ parse_pci_addr_format(const char *buf, int bufsize, u= int16_t *domain,=0A= > !=3D PCI_FMT_NVAL - 1)=0A= > goto error;=0A= > /* final split is on '.' between devid and function */=0A= > - splitaddr.function =3D strchr(splitaddr.devid,'.');=0A= > + splitaddr.function =3D strchr(splitaddr.devid, '.');=0A= > if (splitaddr.function =3D=3D NULL)=0A= > goto error;=0A= > *splitaddr.function++ =3D '\0';=0A= > @@ -671,7 +670,7 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *d= r, struct rte_pci_device *d=0A= > if (ret !=3D 0)=0A= > return ret;=0A= > } else if (dr->drv_flags & RTE_PCI_DRV_FORCE_UNBIND &&=0A= > - rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) {=0A= > + rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) {=0A= > /* unbind current driver */=0A= > if (pci_unbind_kernel_driver(dev) < 0)=0A= > return -1;=0A= =0A=