netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU
Date: Sun, 4 Dec 2016 23:40:54 +0100	[thread overview]
Message-ID: <20161204224054.GA24118@lunn.ch> (raw)
In-Reply-To: <87oa0r9wei.fsf@ketchup.i-did-not-set--mail-host-address--so-tickle-me>

> 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

  reply	other threads:[~2016-12-04 22:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-03  3:45 [PATCH v1 net-next 0/5] mv88e6390 batch 3 Andrew Lunn
2016-12-03  3:45 ` [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU Andrew Lunn
2016-12-04 20:03   ` Vivien Didelot
2016-12-04 20:22     ` Andrew Lunn
2016-12-04 22:12       ` Vivien Didelot
2016-12-04 22:40         ` Andrew Lunn [this message]
2016-12-05  0:23           ` Vivien Didelot
2016-12-05  8:26       ` Richard Cochran
2016-12-03  3:45 ` [PATCH v1 net-next 2/5] net: dsa: mv88e6xxx: Refactor setting of jumbo frames Andrew Lunn
2016-12-03  3:45 ` [PATCH v1 net-next 3/5] net: dsa: mv88e6xxx: Refactor egress rate limiting Andrew Lunn
2016-12-03  3:45 ` [PATCH v1 net-next 4/5] net: dsa: mv88e6xxx: Refactor pause configuration Andrew Lunn
2016-12-03  3:45 ` [PATCH v1 net-next 5/5] net: dsa: mv88e6xxx: Implement mv88e6390 pause control Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161204224054.GA24118@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).