
(autoreview)
Hi Ben,
I make some changes to the patch, but I will post after your review. See my annotation, that will be present into the next patch release.
best regards.
Il mercoledì 23 settembre 2009 15:10:54 Luigi 'Comio' Mantellini ha scritto:
From: Luigi 'Comio' Mantellini luigi.mantellini@idf-hit.com
Signed-off-by: Luigi 'Comio' Mantellini luigi.mantellini@idf-hit.com
drivers/net/phy/miiphybb.c | 324 +++++++++++++++++++++++++++++++------------- include/miiphy.h | 22 +++ 2 files changed, 250 insertions(+), 96 deletions(-)
diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c index b77c917..1ed27f1 100644 --- a/drivers/net/phy/miiphybb.c +++ b/drivers/net/phy/miiphybb.c
...
+struct bbmiibus bbmiibusses[] = {
[COMIO] s/busses/buses - Sorry for the typo.
...
+void bb_miiphy_init(void) +{
- int i;
- for (i = 0; i < sizeof(bbmiibusses)/sizeof(bbmiibusses[0]); i++) {
[COMIO] Add bbmiibuses_num external variable. The board specific code need to instance it as:
int bbmiibuses_num = sizeof(bbmiibuses)/sizeof(bbmiibuses[0])
I need this because I cannot know the array size at compile time. The other solution may be to use a dummy value at the array end... What do you suggest?
...
+static inline struct bbmiibus *bb_miiphy_getbus(char *devname) +{ +#ifdef CONFIG_BITBANGMII_MULTI
- /* Search the correct bus */
- for (j = 0; j < sizeof(bbmiibusses)/sizeof(bbmmis[0]); j++) {
[COMIO] Changed j to i and add i declaration.
diff --git a/include/miiphy.h b/include/miiphy.h index fa33ec7..478c050 100644 --- a/include/miiphy.h +++ b/include/miiphy.h @@ -19,6 +19,8 @@
+extern struct bbmiibus bbmiibusses[];
[COMIO] Change bbmiibusses to bbmiibuses and add the following declaration:
extern int bbmiibuses_num
Any comment is welcome
best regards,
luigi