public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Simon Guinot <simon.guinot@sequanux.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 07/12] board: LaCie: Move common headers to board-common directory
Date: Fri, 13 Nov 2015 11:30:43 +0100	[thread overview]
Message-ID: <20151113103043.GT4665@kw.sim.vm.gnt> (raw)
In-Reply-To: <1447393422-4169-8-git-send-email-nm@ti.com>

Hi Nishanth,

On Thu, Nov 12, 2015 at 11:43:37PM -0600, Nishanth Menon wrote:
> Header files can be located in a generic location without
> needing to reference them with ../common/
> 
> Generated with the following script
> 
>  #!/bin/bash
> vendor=board/LaCie
> common=$vendor/common
> 
> cfiles=`git grep "../common" $vendor|grep "#include"|cut -d '"' -f2|sort -u|grep c$`
> headers=`git grep "../common" $vendor|grep "#include"|cut -d '"' -f2|sort -u|grep h$`
> 
> mkdir -p $common/include/board-common
> set -x
> for header in $headers
> do
> 	echo "processing $header in $common"
> 	hbase=`basename $header`
> 	git mv $common/$hbase $common/include/board-common
> 	sed -i -e "s/\"..\/common\/$hbase\"/<board-common\/$hbase>/g" $vendor/*/*.[chS]
> 	sed -i -e "s/\"$hbase\"/<board-common\/$hbase>/g" $vendor/common/*.[chS]
> done
> 
> Cc: Simon Guinot <simon.guinot@sequanux.org>
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>  board/LaCie/common/cpld-gpio-bus.c                            | 2 +-
>  board/LaCie/common/{ => include/board-common}/common.h        | 0

Is that really a good idea to move a LaCie-specific file named common.h
to a place shared with other boards ?

>  board/LaCie/common/{ => include/board-common}/cpld-gpio-bus.h | 0

IMO, this headers are specific to LaCie boards and it don't make much
sense to move them to a shared place. Moreover it is quite convenient to
have them close from the board setup files.

Please don't move them.

Thanks,

Simon

>  board/LaCie/edminiv2/edminiv2.c                               | 2 +-
>  board/LaCie/net2big_v2/net2big_v2.c                           | 4 ++--
>  board/LaCie/netspace_v2/netspace_v2.c                         | 2 +-
>  6 files changed, 5 insertions(+), 5 deletions(-)
>  rename board/LaCie/common/{ => include/board-common}/common.h (100%)
>  rename board/LaCie/common/{ => include/board-common}/cpld-gpio-bus.h (100%)
> 
> diff --git a/board/LaCie/common/cpld-gpio-bus.c b/board/LaCie/common/cpld-gpio-bus.c
> index 9b24dc535c04..92a80243c5e0 100644
> --- a/board/LaCie/common/cpld-gpio-bus.c
> +++ b/board/LaCie/common/cpld-gpio-bus.c
> @@ -13,7 +13,7 @@
>   */
>  
>  #include <asm/arch/gpio.h>
> -#include "cpld-gpio-bus.h"
> +#include <board-common/cpld-gpio-bus.h>
>  
>  static void cpld_gpio_bus_set_addr(struct cpld_gpio_bus *bus, unsigned addr)
>  {
> diff --git a/board/LaCie/common/common.h b/board/LaCie/common/include/board-common/common.h
> similarity index 100%
> rename from board/LaCie/common/common.h
> rename to board/LaCie/common/include/board-common/common.h
> diff --git a/board/LaCie/common/cpld-gpio-bus.h b/board/LaCie/common/include/board-common/cpld-gpio-bus.h
> similarity index 100%
> rename from board/LaCie/common/cpld-gpio-bus.h
> rename to board/LaCie/common/include/board-common/cpld-gpio-bus.h
> diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c
> index edf6281797bf..66d0e8502256 100644
> --- a/board/LaCie/edminiv2/edminiv2.c
> +++ b/board/LaCie/edminiv2/edminiv2.c
> @@ -11,7 +11,7 @@
>  #include <common.h>
>  #include <miiphy.h>
>  #include <asm/arch/orion5x.h>
> -#include "../common/common.h"
> +#include <board-common/common.h>
>  #include <spl.h>
>  #include <ns16550.h>
>  
> diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c
> index 263bb5426c0d..0bfe76fde334 100644
> --- a/board/LaCie/net2big_v2/net2big_v2.c
> +++ b/board/LaCie/net2big_v2/net2big_v2.c
> @@ -18,8 +18,8 @@
>  #include <asm/arch/gpio.h>
>  
>  #include "net2big_v2.h"
> -#include "../common/common.h"
> -#include "../common/cpld-gpio-bus.h"
> +#include <board-common/common.h>
> +#include <board-common/cpld-gpio-bus.h>
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c
> index 17e629622ff7..4ea76d152e6b 100644
> --- a/board/LaCie/netspace_v2/netspace_v2.c
> +++ b/board/LaCie/netspace_v2/netspace_v2.c
> @@ -17,7 +17,7 @@
>  #include <asm/arch/gpio.h>
>  
>  #include "netspace_v2.h"
> -#include "../common/common.h"
> +#include <board-common/common.h>
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> -- 
> 2.6.2.402.g2635c2b
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151113/8f411315/attachment.sig>

  reply	other threads:[~2015-11-13 10:30 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13  5:43 [U-Boot] [PATCH V2 00/12] Series to move headers to a consistent include location Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 01/12] Makefile: Include vendor common library in include search path Nishanth Menon
2015-11-15 14:45   ` Igor Grinberg
2015-11-13  5:43 ` [U-Boot] [PATCH V2 02/12] board: BuR: Move common headers to board-common directory Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 03/12] board: compulab: " Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 05/12] board: gdsys: " Nishanth Menon
2015-11-16  8:01   ` Dirk Eibach
2015-11-16  8:04     ` Dirk Eibach
2015-11-13  5:43 ` [U-Boot] [PATCH V2 06/12] board: keymile: " Nishanth Menon
2015-11-18 13:58   ` Valentin Longchamp
2015-11-13  5:43 ` [U-Boot] [PATCH V2 07/12] board: LaCie: " Nishanth Menon
2015-11-13 10:30   ` Simon Guinot [this message]
2015-11-13 14:06     ` Tom Rini
2015-11-13 15:32       ` Simon Guinot
2015-11-13 23:57         ` Nishanth Menon
2015-11-14  2:05           ` Simon Glass
2015-11-16  1:53             ` Tom Rini
2015-11-14 23:56   ` Masahiro Yamada
2015-11-15  5:38     ` Nishanth Menon
2015-11-16  3:32       ` Masahiro Yamada
2015-11-16 15:34         ` Nishanth Menon
2015-11-17  0:45           ` Tom Rini
2015-11-13  5:43 ` [U-Boot] [PATCH V2 08/12] board: mpl: " Nishanth Menon
2015-11-13  8:19   ` David Müller (ELSOFT AG)
2015-11-13 14:02     ` Tom Rini
2015-11-13  5:43 ` [U-Boot] [PATCH V2 09/12] board: seco: " Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 10/12] board: siemens: " Nishanth Menon
2015-11-16  9:17   ` Egli, Samuel
2015-11-13  5:43 ` [U-Boot] [PATCH V2 11/12] board: varisys: " Nishanth Menon
2015-11-16  7:42   ` Andy Fleming
2015-11-13  5:43 ` [U-Boot] [PATCH V2 12/12] board: xes: " Nishanth Menon
2015-11-13  5:51 ` [U-Boot] [PATCH RESEND V2 04/12] board: freescale: " Nishanth Menon
2015-12-19 23:07 ` [U-Boot] [PATCH V2 00/12] Series to move headers to a consistent include location Simon Glass
2015-12-20  0:25   ` Nishanth Menon
2015-12-28  4:22     ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151113103043.GT4665@kw.sim.vm.gnt \
    --to=simon.guinot@sequanux.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox