[dpdk-dev,v9,01/12] eal: Fix coding style of eal_pci.c and eal_pci_uio.c
Commit Message
From: "Tetsuya.Mukawa" <mukawa@igel.co.jp>
This patch fixes coding style of below files in linuxapp and bsdapp.
- eal_pci.c
- eal_pci_uio.c
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
lib/librte_eal/bsdapp/eal/eal_pci.c | 13 ++++++++-----
lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 13 +++++++++----
2 files changed, 17 insertions(+), 9 deletions(-)
Comments
On Wed, 8 Jul 2015 19:34:42 +0900
Tetsuya Mukawa <mukawa@igel.co.jp> wrote:
> diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
> index 2df5c1c..a63d450 100644
> --- a/lib/librte_eal/bsdapp/eal/eal_pci.c
> +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
> @@ -2,6 +2,7 @@
> * BSD LICENSE
> *
> * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> + * Copyright(c) 2015 IGEL Co., Ltd.
I think copyright in file should stay with original author, otherwise
the Copyright will keep growing with all patches.
2015-07-08 09:09, Stephen Hemminger:
> On Wed, 8 Jul 2015 19:34:42 +0900
> Tetsuya Mukawa <mukawa@igel.co.jp> wrote:
>
> > diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
> > index 2df5c1c..a63d450 100644
> > --- a/lib/librte_eal/bsdapp/eal/eal_pci.c
> > +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
> > @@ -2,6 +2,7 @@
> > * BSD LICENSE
> > *
> > * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
> > + * Copyright(c) 2015 IGEL Co., Ltd.
>
> I think copyright in file should stay with original author, otherwise
> the Copyright will keep growing with all patches.
Yes you're right.
There is no strict rule, but Copyright should be added only in new files
or with a really significant change.
Tetsuya, you have copyright on PMD null and hotplug framework in doc.
Hope you'll agree to not add new ones while doing some EAL cleanup.
On 2015/07/09 5:30, Thomas Monjalon wrote:
> 2015-07-08 09:09, Stephen Hemminger:
>> On Wed, 8 Jul 2015 19:34:42 +0900
>> Tetsuya Mukawa <mukawa@igel.co.jp> wrote:
>>
>>> diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
>>> index 2df5c1c..a63d450 100644
>>> --- a/lib/librte_eal/bsdapp/eal/eal_pci.c
>>> +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
>>> @@ -2,6 +2,7 @@
>>> * BSD LICENSE
>>> *
>>> * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
>>> + * Copyright(c) 2015 IGEL Co., Ltd.
>> I think copyright in file should stay with original author, otherwise
>> the Copyright will keep growing with all patches.
> Yes you're right.
> There is no strict rule, but Copyright should be added only in new files
> or with a really significant change.
>
> Tetsuya, you have copyright on PMD null and hotplug framework in doc.
> Hope you'll agree to not add new ones while doing some EAL cleanup.
Hi Thomas and Stephen,
Yes, I don't need to add copyrights.
Thanks for fixing to apply.
Regards,
Tetsuya
@@ -2,6 +2,7 @@
* BSD LICENSE
*
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ * Copyright(c) 2015 IGEL Co., Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -161,9 +162,10 @@ fail:
static int
pci_uio_map_secondary(struct rte_pci_device *dev)
{
- size_t i;
- struct uio_resource *uio_res;
- struct uio_res_list *uio_res_list = RTE_TAILQ_CAST(rte_uio_tailq.head, uio_res_list);
+ size_t i;
+ struct uio_resource *uio_res;
+ struct uio_res_list *uio_res_list =
+ RTE_TAILQ_CAST(rte_uio_tailq.head, uio_res_list);
TAILQ_FOREACH(uio_res, uio_res_list, next) {
@@ -201,7 +203,8 @@ pci_uio_map_resource(struct rte_pci_device *dev)
uint64_t pagesz;
struct rte_pci_addr *loc = &dev->addr;
struct uio_resource *uio_res;
- struct uio_res_list *uio_res_list = RTE_TAILQ_CAST(rte_uio_tailq.head, uio_res_list);
+ struct uio_res_list *uio_res_list =
+ RTE_TAILQ_CAST(rte_uio_tailq.head, uio_res_list);
struct uio_map *maps;
dev->intr_handle.fd = -1;
@@ -311,7 +314,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
/* FreeBSD has no NUMA support (yet) */
dev->numa_node = 0;
-/* parse resources */
+ /* parse resources */
switch (conf->pc_hdr & PCIM_HDRTYPE) {
case PCIM_HDRTYPE_NORMAL:
max = PCIR_MAX_BAR_0;
@@ -2,6 +2,7 @@
* BSD LICENSE
*
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ * Copyright(c) 2015 IGEL Co., Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -92,7 +93,8 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
{
int fd, i;
struct mapped_pci_resource *uio_res;
- struct mapped_pci_res_list *uio_res_list = RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
+ struct mapped_pci_res_list *uio_res_list =
+ RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
TAILQ_FOREACH(uio_res, uio_res_list, next) {
@@ -272,7 +274,8 @@ pci_uio_map_resource(struct rte_pci_device *dev)
uint64_t phaddr;
struct rte_pci_addr *loc = &dev->addr;
struct mapped_pci_resource *uio_res;
- struct mapped_pci_res_list *uio_res_list = RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
+ struct mapped_pci_res_list *uio_res_list =
+ RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
struct pci_map *maps;
dev->intr_handle.fd = -1;
@@ -417,7 +420,8 @@ static struct mapped_pci_resource *
pci_uio_find_resource(struct rte_pci_device *dev)
{
struct mapped_pci_resource *uio_res;
- struct mapped_pci_res_list *uio_res_list = RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
+ struct mapped_pci_res_list *uio_res_list =
+ RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
if (dev == NULL)
return NULL;
@@ -436,7 +440,8 @@ void
pci_uio_unmap_resource(struct rte_pci_device *dev)
{
struct mapped_pci_resource *uio_res;
- struct mapped_pci_res_list *uio_res_list = RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
+ struct mapped_pci_res_list *uio_res_list =
+ RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
if (dev == NULL)
return;