[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161204224054.GA24118@lunn.ch>
Date: Sun, 4 Dec 2016 23:40:54 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc: David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management
frames to CPU
> You can have several implementations in the same file (e.g. global1.c),
> so again the only value is the function name, not the struct member.
The structure member have g1_ has a lot of value.
if (chip->info->ops->set_cpu_port) {
err = chip->info->ops->set_cpu_port(chip, upstream_port);
if (err)
return err;
}
Where to i need to go look for set_cpu_port? I have no idea.
if (chip->info->ops->g1_set_cpu_port) {
err = chip->info->ops->g1_set_cpu_port(chip, upstream_port);
if (err)
return err;
}
Humm, the hint tells me it is in global1.c. And i also know that all
of them are in global1.c.
These ops do make the code simpler. But the downside is it makes it
harder to find the actual code, now that it is spread over multiple
files. And these hits help negate the downside a little.
Andrew
Powered by blists - more mailing lists