Skip to contentSkip to conversation

make MODEM SUPPORT generic instead of duplicate it

PATCH Superseded Jean-Christophe PLAGNIOL-VILLARD 2 participants 7 messages Mar 7, 2009 – Jun 3, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make MODEM SUPPORT generic instead of duplicate it

---
 common/Makefile |    1 +
 common/modem.c  |  123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib_arm/board.c |   99 --------------------------------------------
 lib_ppc/board.c |   97 -------------------------------------------
 4 files changed, 124 insertions(+), 196 deletions(-)
 create mode 100644 common/modem.c
common/Makefile +1 -0
index f13cd11..3038e46 100644
@@ -147,6 +147,7 @@ COBJS-y += flash.o
 COBJS-$(CONFIG_CMD_KGDB) += kgdb.o
 COBJS-$(CONFIG_LCD) += lcd.o
 COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o
+COBJS-$(CONFIG_MODEM_SUPPORT) += modem.o
 COBJS-$(CONFIG_UPDATE_TFTP) += update.o
 COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
 
common/modem.c new file +123 -0

123 lines not on this page · raw message

lib_arm/board.c +0 -99

102 lines not on this page · raw message

lib_ppc/board.c +0 -97

103 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 make MODEM SUPPORT generic instead of duplicate it

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 8 lines · In message <[email protected]> you wrote:
---
 common/Makefile |    1 +
 common/modem.c  |  123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib_arm/board.c |   99 --------------------------------------------
 lib_ppc/board.c |   97 -------------------------------------------
 4 files changed, 124 insertions(+), 196 deletions(-)
 create mode 100644 common/modem.c

...

Quoted 5 lines
common/modem.c new file +0 -0
new file mode 100644
index 0000000..27e164a

...

common/modem.c line 32

Quoted 3 lines
common/modem.c new file +3 -0
+/* called from main loop (common/main.c) */
+/* 'inline' - We have to do it fast */
+static inline void mdm_readline(char *buf, int bufsiz)

How is this supposed to work? You cannot call a static function from another source file.

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
"Don't worry about people stealing your ideas. If your ideas are  any
good, you'll have to ram them down people's throats."  - Howard Aiken
#2 lore raw

PATCH 1/1 make MODEM SUPPORT generic instead of duplicate it

Quoted 18 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 8 lines · In message <[email protected]> you wrote:
---
 common/Makefile |    1 +
 common/modem.c  |  123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib_arm/board.c |   99 --------------------------------------------
 lib_ppc/board.c |   97 -------------------------------------------
 4 files changed, 124 insertions(+), 196 deletions(-)
 create mode 100644 common/modem.c

...

Quoted 5 lines
common/modem.c new file +0 -0
new file mode 100644
index 0000000..27e164a

...

Quoted 6 lines

common/modem.c line 32

Quoted 3 lines
common/modem.c new file +3 -0
+/* called from main loop (common/main.c) */
+/* 'inline' - We have to do it fast */
+static inline void mdm_readline(char *buf, int bufsiz)

How is this supposed to work? You cannot call a static function from another source file.

this function is only use in this file

actualy the code is lib_arm/board.c and lib_ppc/board.c is identical

I just move it to modem.c

the only function use outiside of this file is mdm_init

Best Regards,
J.

#3 lore raw

PATCH 1/1 make MODEM SUPPORT generic instead of duplicate it

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 13 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Quoted 6 lines
common/modem.c new file +0 -0
new file mode 100644
index 0000000..27e164a

...

Quoted 6 lines

common/modem.c line 32

Quoted 3 lines
common/modem.c new file +3 -0
+/* called from main loop (common/main.c) */
+/* 'inline' - We have to do it fast */
+static inline void mdm_readline(char *buf, int bufsiz)

How is this supposed to work? You cannot call a static function from another source file.

Quoted 7 lines

this function is only use in this file

actualy the code is lib_arm/board.c and lib_ppc/board.c is identical

I just move it to modem.c

the only function use outiside of this file is mdm_init

Then please fix the comment - it says: "called from main loop (common/main.c)"

Best regards,

Wolfgang Denk

Signature · 7 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
Winners never talk about glorious victories. That's  because  they're
the  ones  who  see  what the battlefield looks like afterwards. It's
only the losers who have glorious victories.
                                      - Terry Pratchett, _Small Gods_
#4 lore raw

PATCH v2 1/1 make MODEM SUPPORT generic instead of duplicate it

and fix comment

---
v2:
Fix comment

Best Regards,
J.

 common/Makefile |    1 +
 common/modem.c  |  122 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib_arm/board.c |   99 --------------------------------------------
 lib_ppc/board.c |   97 -------------------------------------------
 4 files changed, 123 insertions(+), 196 deletions(-)
 create mode 100644 common/modem.c
common/Makefile +1 -0
index b9f4ca7..2ca1026 100644
@@ -155,6 +155,7 @@ COBJS-y += flash.o
 COBJS-$(CONFIG_CMD_KGDB) += kgdb.o
 COBJS-$(CONFIG_LCD) += lcd.o
 COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o
+COBJS-$(CONFIG_MODEM_SUPPORT) += modem.o
 COBJS-$(CONFIG_UPDATE_TFTP) += update.o
 COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
 
common/modem.c new file +122 -0

122 lines not on this page · raw message

lib_arm/board.c +0 -99

102 lines not on this page · raw message

lib_ppc/board.c +0 -97

103 lines not on this page · raw message

Signature · 1 line
1.6.2.1
#6 lore raw

PATCH v2 1/1 make MODEM SUPPORT generic instead of duplicate it

In reply to Jean-Christophe PLAGNIOL-VILLARD

Dear Jean-Christophe PLAGNIOL-VILLARD,

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

and fix comment

---
v2:
Fix comment

Quoted 8 lines

Best Regards,
J.

 common/Makefile |    1 +
 common/modem.c  |  122 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib_arm/board.c |   99 --------------------------------------------
 lib_ppc/board.c |   97 -------------------------------------------
 4 files changed, 123 insertions(+), 196 deletions(-)
 create mode 100644 common/modem.c

Applied, after modifying the file header:

Quoted 6 lines
common/modem.c new file +0 -0
new file mode 100644
index 0000000..44567b2

common/modem.c line 10

Quoted 10 lines
common/modem.c new file +10 -0
@@ -0,0 +1,122 @@
+/*
+ * (C) Copyright 2002-2006
+ * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+ *
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
+ * Marius Groeger <[email protected]>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.

I deleted the Sysgo Copyright entry here, as I am sure that no part of this code was written by Sysgo.

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
An Ada exception is when a routine gets in trouble and says
'Beam me up, Scotty'.