From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Qiu, Michael" Subject: Re: [PATCH 1/2] pci: cleanup whitespace 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: Stephen Hemminger , "dev-VfR2kkLFssw@public.gmane.org" Return-path: Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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=