Re: [U-Boot] [PATCH v4 05/10] moveconfig: Cleanup headers in arch and board

2015-05-19 Thread Joe Hershberger
On Mon, May 18, 2015 at 8:41 PM, Masahiro Yamada
yamada.masah...@socionext.com wrote:
 Hi Joe,


 2015-05-16 6:40 GMT+09:00 Joe Hershberger joe.hershber...@ni.com:
 Some config.h files live in arch and board directories. They will need
 to be cleaned up as well, so run the same filters there.

 Signed-off-by: Joe Hershberger joe.hershber...@ni.com

 ---

 Changes in v4:
 -New for version 4

 Changes in v3: None
 Changes in v2: None

  tools/moveconfig.py | 10 ++
  1 file changed, 10 insertions(+)

 diff --git a/tools/moveconfig.py b/tools/moveconfig.py
 index b6db058..25cee21 100755
 --- a/tools/moveconfig.py
 +++ b/tools/moveconfig.py
 @@ -352,6 +352,16 @@ def cleanup_headers(config_attrs, dry_run):
  if not fnmatch.fnmatch(filename, '*~'):
  cleanup_one_header(os.path.join(dirpath, filename), 
 patterns,
 dry_run)
 +for (dirpath, dirnames, filenames) in os.walk('arch'):
 +for filename in filenames:
 +if not fnmatch.fnmatch(filename, '*~'):
 +cleanup_one_header(os.path.join(dirpath, filename), 
 patterns,
 +   dry_run)
 +for (dirpath, dirnames, filenames) in os.walk('board'):
 +for filename in filenames:
 +if not fnmatch.fnmatch(filename, '*~'):
 +cleanup_one_header(os.path.join(dirpath, filename), 
 patterns,
 +   dry_run)


 To reduce code duplication, can we write like this or something?

 for dir in 'include', 'arch', 'board':
 for (dirpath, dirnames, filenames) in os.walk(dir):
 for filename in filenames:
 if not fnmatch.fnmatch(filename, '*~'):
 cleanup_one_header(os.path.join(dirpath, filename),
patterns, dry_run)

OK.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 05/10] moveconfig: Cleanup headers in arch and board

2015-05-18 Thread Masahiro Yamada
Hi Joe,


2015-05-16 6:40 GMT+09:00 Joe Hershberger joe.hershber...@ni.com:
 Some config.h files live in arch and board directories. They will need
 to be cleaned up as well, so run the same filters there.

 Signed-off-by: Joe Hershberger joe.hershber...@ni.com

 ---

 Changes in v4:
 -New for version 4

 Changes in v3: None
 Changes in v2: None

  tools/moveconfig.py | 10 ++
  1 file changed, 10 insertions(+)

 diff --git a/tools/moveconfig.py b/tools/moveconfig.py
 index b6db058..25cee21 100755
 --- a/tools/moveconfig.py
 +++ b/tools/moveconfig.py
 @@ -352,6 +352,16 @@ def cleanup_headers(config_attrs, dry_run):
  if not fnmatch.fnmatch(filename, '*~'):
  cleanup_one_header(os.path.join(dirpath, filename), patterns,
 dry_run)
 +for (dirpath, dirnames, filenames) in os.walk('arch'):
 +for filename in filenames:
 +if not fnmatch.fnmatch(filename, '*~'):
 +cleanup_one_header(os.path.join(dirpath, filename), patterns,
 +   dry_run)
 +for (dirpath, dirnames, filenames) in os.walk('board'):
 +for filename in filenames:
 +if not fnmatch.fnmatch(filename, '*~'):
 +cleanup_one_header(os.path.join(dirpath, filename), patterns,
 +   dry_run)


To reduce code duplication, can we write like this or something?

for dir in 'include', 'arch', 'board':
for (dirpath, dirnames, filenames) in os.walk(dir):
for filename in filenames:
if not fnmatch.fnmatch(filename, '*~'):
cleanup_one_header(os.path.join(dirpath, filename),
   patterns, dry_run)



-- 
Best Regards
Masahiro Yamada
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 05/10] moveconfig: Cleanup headers in arch and board

2015-05-15 Thread Joe Hershberger
Some config.h files live in arch and board directories. They will need
to be cleaned up as well, so run the same filters there.

Signed-off-by: Joe Hershberger joe.hershber...@ni.com

---

Changes in v4:
-New for version 4

Changes in v3: None
Changes in v2: None

 tools/moveconfig.py | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index b6db058..25cee21 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -352,6 +352,16 @@ def cleanup_headers(config_attrs, dry_run):
 if not fnmatch.fnmatch(filename, '*~'):
 cleanup_one_header(os.path.join(dirpath, filename), patterns,
dry_run)
+for (dirpath, dirnames, filenames) in os.walk('arch'):
+for filename in filenames:
+if not fnmatch.fnmatch(filename, '*~'):
+cleanup_one_header(os.path.join(dirpath, filename), patterns,
+   dry_run)
+for (dirpath, dirnames, filenames) in os.walk('board'):
+for filename in filenames:
+if not fnmatch.fnmatch(filename, '*~'):
+cleanup_one_header(os.path.join(dirpath, filename), patterns,
+   dry_run)
 
 ### classes ###
 class KconfigParser:
-- 
1.7.11.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot