Skip to contentSkip to conversation

rename CFG_ macros to CONFIG_SYS

PATCH New Jean-Christophe PLAGNIOL-VILLARD 3 participants 8 messages Oct 16, 2008 – Oct 21, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 rename CFG_ macros to CONFIG_SYS

---
 Makefile                                           |   52 +-
 README                                             |  334 ++++----
 README.nios_CONFIG_SYS_NIOS_CPU                    |  140 ++++
 api/api_storage.c                                  |    8 +-
 board/AtmarkTechno/suzaku/flash.c                  |    2 +-
 board/BuS/EB+MCF-EV123/EB+MCF-EV123.c              |   30 +-
 board/BuS/EB+MCF-EV123/VCxK.c                      |    2 +-
 board/BuS/EB+MCF-EV123/cfm_flash.c                 |   16 +-
 board/BuS/EB+MCF-EV123/cfm_flash.h                 |    2 +-
 board/BuS/EB+MCF-EV123/flash.c                     |   20 +-
 board/BuS/EB+MCF-EV123/mii.c                       |   12 +-
 board/LEOX/elpt860/elpt860.c                       |   52 +-
 board/LEOX/elpt860/flash.c                         |   30 +-
 board/MAI/AmigaOneG3SE/cmd_boota.c                 |    2 +-
 board/MAI/AmigaOneG3SE/flash.c                     |    4 +-
 board/MAI/AmigaOneG3SE/flash_new.c                 |   30 +-
 board/MAI/AmigaOneG3SE/i8259.h                     |   28 +-
 board/MAI/AmigaOneG3SE/interrupts.c                |    4 +-
 board/MAI/AmigaOneG3SE/ps2kbd.c                    |   10 +-
 board/MAI/AmigaOneG3SE/serial.c                    |    6 +-
 board/MAI/AmigaOneG3SE/usb_uhci.c                  |    2 +-
 board/Marvell/common/flash.c                       |   22 +-
 board/Marvell/common/i2c.c                         |    8 +-
 board/Marvell/common/intel_flash.c                 |    4 +-
 board/Marvell/common/intel_flash.h                 |    2 +-
 board/Marvell/common/misc.S                        |   18 +-
 board/Marvell/common/ns16550.c                     |    6 +-
 board/Marvell/common/ns16550.h                     |    2 +-
 board/Marvell/common/serial.c                      |   22 +-
 board/Marvell/db64360/db64360.c                    |  140 ++--
 board/Marvell/db64360/mpsc.c                       |    6 +-
 board/Marvell/db64360/pci.c                        |   20 +-
 board/Marvell/db64360/sdram_init.c                 |   28 +-
 board/Marvell/db64460/db64460.c                    |  140 ++--
 board/Marvell/db64460/mpsc.c                       |    6 +-
 board/Marvell/db64460/pci.c                        |   20 +-
 board/Marvell/db64460/sdram_init.c                 |   28 +-
 board/MigoR/migo_r.c                               |    6 +-
 board/RPXClassic/RPXClassic.c                      |   16 +-
 board/RPXClassic/eccx.c                            |    2 +-
 board/RPXClassic/flash.c                           |   18 +-
 board/RPXlite/RPXlite.c                            |   14 +-
 board/RPXlite/flash.c                              |   24 +-
 board/RPXlite_dw/RPXlite_dw.c                      |   16 +-
 board/RPXlite_dw/flash.c                           |   18 +-
 board/RRvision/RRvision.c                          |   26 +-
 board/RRvision/flash.c                             |   24 +-
 board/a3000/a3000.c                                |    2 +-
 board/a3000/flash.c                                |   30 +-

.....

all board are touched

due to ML limitation patch available here
http://git.denx.de/?p=u-boot/u-boot-arm.git;a=commit;h=c52cc1840cf8fe7136a83926ce175228901a8e38

Best Regards,
J.

#1 lore raw

PATCH 2/2 add tool to check patch and file for CFG_ presence

add same check on all board at MAKEALL start
it can be disable by CHECK=no as

$ CHECK=no ./MAKEALL
---
 MAKEALL                  |    5 +++
 Makefile                 |    4 ++
 tools/find_config_errors |   87 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+), 0 deletions(-)
 create mode 100755 tools/find_config_errors
MAKEALL +5 -0
index 9ccb9ac..a4ce135 100755
@@ -22,6 +22,11 @@ fi
 
 LIST=""
 
+if [ "${CHECK}" != "no" ] ; then
+#find config errors as incorrectly used old variable names
+make find_config_errors
+fi
+
 #########################################################################
 ## MPC5xx Systems
 #########################################################################
Makefile +4 -0
index c711df6..e91cb18 100644
@@ -3236,4 +3236,8 @@ backup:
 	F=`basename $(TOPDIR)` ; cd .. ; \
 	gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
 
+find_config_errors:
+	@echo "Search for config errors"
+	@git-grep CFG_ | cut -d: -f1 | sort -u | xargs -I {} tools/find_config_errors -f {}
+
 #########################################################################
tools/find_config_errors new file +87 -0

87 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#2 lore raw

PATCH 2/2 add tool to check patch and file for CFG_ presence

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 3 lines · In message <[email protected]> you wrote:

add same check on all board at MAKEALL start
it can be disable by CHECK=no as

$ CHECK=no ./MAKEALL

NAK.

As discussed before, please remove the CHECK stuff from MAKEALL.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Anyone who isn't confused here doesn't really know what's going on.
#3 lore raw

PATCH 1/1 add tool to check patch and file for CFG_ presence

run make find_config_errors to performed it.

---
 Makefile                 |    4 ++
 tools/find_config_errors |   87 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+), 0 deletions(-)
 create mode 100755 tools/find_config_errors
Makefile +4 -0
index c711df6..e91cb18 100644
@@ -3236,4 +3236,8 @@ backup:
 	F=`basename $(TOPDIR)` ; cd .. ; \
 	gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
 
+find_config_errors:
+	@echo "Search for config errors"
+	@git-grep CFG_ | cut -d: -f1 | sort -u | xargs -I {} tools/find_config_errors -f {}
+
 #########################################################################
tools/find_config_errors new file +87 -0

87 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#4 lore raw

PATCH 1/1 add tool to check patch and file for CFG_ presence

Dear Jean-Christophe PLAGNIOL-VILLARD,

Makefile backup: · line 3242

Quoted 5 lines · In message <[email protected]> you wrote:
Makefile +4 -0
+find_config_errors:
+	@echo "Search for config errors"
+	@git-grep CFG_ | cut -d: -f1 | sort -u | xargs -I {} tools/find_config_errors -f {}
+

Hm... should we not just use "grep -r *" so this will also work when we don't have a full git repository?

And instead of running another process with "cut", a "-l" argument to grep (or even git-grep) would do the same? [Also note that "git-grep" is deprecated, "git grep" should be used instead.]

I think we should change this into:

grep -l -r * | xargs tools/find_config_errors -f

What do you think?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There are three ways to get something  done:  do  it  yourself,  hire
someone, or forbid your kids to do it.
#5 lore raw

PATCH 1/1 add tool to check patch and file for CFG_ presence

Quoted 12 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Makefile backup: · line 3242

Quoted 5 lines · In message <[email protected]> you wrote:
Makefile +4 -0
+find_config_errors:
+	@echo "Search for config errors"
+	@git-grep CFG_ | cut -d: -f1 | sort -u | xargs -I {} tools/find_config_errors -f {}
+

Hm... should we not just use "grep -r *" so this will also work when we don't have a full git repository?

Quoted 7 lines

And instead of running another process with "cut", a "-l" argument to grep (or even git-grep) would do the same? [Also note that "git-grep" is deprecated, "git grep" should be used instead.]

I think we should change this into:

grep -l -r * | xargs tools/find_config_errors -f

It will not work with symlinks

when you do not have a git repository you will check compile code, non use file patch maybe etc... and not ignoring files specified in the differents gitignore.

I'll prefer to only activate it when we have a git reprository otherwise the user will use find_config_errors to check it's patch before send it as done with checkpatch.pl.

so I'll propose instead
find_config_errors:
@echo "Search for config errors"
@# Check for git and a git repo.
@if head=git rev-parse --verify HEAD 2>/dev/null; then \
git grep -l CFG_ | sort -u | xargs -I {} tools/find_config_errors -f {} ;\
fi

Best Regards,
J.

#6 lore raw

PATCH 1/1 add tool to check patch and file for CFG_ presence

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 4 lines

I think we should change this into:

grep -l -r * | xargs tools/find_config_errors -f

It will not work with symlinks

You don't want to run this in a dirty tree, do you?

Quoted 3 lines

when you do not have a git repository you will check compile code, non use file patch maybe etc... and not ignoring files specified in the differents gitignore.

Hm... why should I run this in a drity tree?

Quoted 1 line

I'll prefer to only activate it when we have a git reprository

I don't. There are quite a lot of people out there not using git for their work. Unless really necessary we should not cut them off. And here it seems not really necessary.

Quoted 10 lines

otherwise the user will use find_config_errors to check it's patch before send it as done with checkpatch.pl.

so I'll propose instead
find_config_errors:
@echo "Search for config errors"
@# Check for git and a git repo.
@if head=git rev-parse --verify HEAD 2>/dev/null; then \
git grep -l CFG_ | sort -u | xargs -I {} tools/find_config_errors -f {} ;\
fi

Comments - if we do this only when git is available, then:

- we must issue an error message and set an error return code if git is missing
- I don't see much use for the "| sort -u" part of the pipe ?
- I don't see much sense for the "-I {}" and "{}" parts in the xargs command ?

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
8 Catfish                                               = 1 Octo-puss
#7 lore raw

PATCH 1/1 add tool to check patch and file for CFG_ presence

In reply to Jean-Christophe PLAGNIOL-VILLARD

Makefile backup:

Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
Makefile +3 -0
+find_config_errors:
+	@echo "Search for config errors"
+	@git-grep CFG_ | cut -d: -f1 | sort -u | xargs -I {} tools/find_config_errors -f {} +

git grep, not git-grep
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20081021/491b7914/attachment.pgp