netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ansuel Smith <ansuelsmth@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [net-next PATCH RFC v6 12/16] net: dsa: qca8k: add support for mdio read/write in Ethernet packet
Date: Wed, 15 Dec 2021 17:56:43 +0100	[thread overview]
Message-ID: <61ba1e4e.1c69fb81.7ede4.493e@mx.google.com> (raw)
In-Reply-To: <20211215124758.4sxjusutfoab5gzt@skbuf>

On Wed, Dec 15, 2021 at 02:47:58PM +0200, Vladimir Oltean wrote:
> On Tue, Dec 14, 2021 at 11:44:05PM +0100, Ansuel Smith wrote:
> > +static int qca8k_connect_tag_protocol(struct dsa_switch *ds,
> > +				      enum dsa_tag_protocol proto)
> > +{
> > +	struct qca8k_priv *qca8k_priv = ds->priv;
> > +
> > +	switch (proto) {
> > +	case DSA_TAG_PROTO_QCA:
> > +		struct tag_qca_priv *priv;
> 
> Actually this fails to compile:
> 
> drivers/net/dsa/qca8k.c: In function ‘qca8k_connect_tag_protocol’:
> drivers/net/dsa/qca8k.c:2893:3: error: a label can only be part of a statement and a declaration is not a statement
>  2893 |   struct tag_qca_priv *priv;
>       |   ^~~~~~
> make[3]: *** [scripts/Makefile.build:287: drivers/net/dsa/qca8k.o] Error 1
> 
> This is what the {} brackets are for.
> 
> Also, while you're at this, please name "priv" "tagger_data".
>

I didn't have this error, sorry. Just to make sure I didn't make these kind of
error anymore what compile did you use and with what flags? 

> > +
> > +		priv = ds->tagger_data;
> > +
> > +		mutex_init(&qca8k_priv->mdio_hdr_data.mutex);
> > +		init_completion(&qca8k_priv->mdio_hdr_data.rw_done);
> > +
> > +		priv->rw_reg_ack_handler = qca8k_rw_reg_ack_handler;
> > +
> > +		break;
> > +	default:
> > +		return -EOPNOTSUPP;
> > +	}
> > +
> > +	return 0;
> >  }

-- 
	Ansuel

  reply	other threads:[~2021-12-15 16:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14 22:43 [net-next PATCH RFC v6 00/16] Add support for qca8k mdio rw in Ethernet packet Ansuel Smith
2021-12-14 22:43 ` [net-next PATCH RFC v6 01/16] net: dsa: provide switch operations for tracking the master state Ansuel Smith
2021-12-14 22:43 ` [net-next PATCH RFC v6 02/16] net: dsa: stop updating master MTU from master.c Ansuel Smith
2021-12-14 22:43 ` [net-next PATCH RFC v6 03/16] net: dsa: hold rtnl_mutex when calling dsa_master_{setup,teardown} Ansuel Smith
2021-12-14 22:43 ` [net-next PATCH RFC v6 04/16] net: dsa: replay master state events in dsa_tree_{setup,teardown}_master Ansuel Smith
2021-12-14 22:43 ` [net-next PATCH RFC v6 05/16] net: dsa: tag_qca: convert to FIELD macro Ansuel Smith
2021-12-14 22:43 ` [net-next PATCH RFC v6 06/16] net: dsa: tag_qca: move define to include linux/dsa Ansuel Smith
2021-12-14 22:44 ` [net-next PATCH RFC v6 07/16] net: dsa: tag_qca: enable promisc_on_master flag Ansuel Smith
2021-12-15  9:58   ` Vladimir Oltean
2021-12-14 22:44 ` [net-next PATCH RFC v6 08/16] net: dsa: tag_qca: add define for handling mdio Ethernet packet Ansuel Smith
2021-12-15  9:58   ` Vladimir Oltean
2021-12-14 22:44 ` [net-next PATCH RFC v6 09/16] net: dsa: tag_qca: add define for handling MIB packet Ansuel Smith
2021-12-14 22:44 ` [net-next PATCH RFC v6 10/16] net: dsa: tag_qca: add support for handling mdio Ethernet and " Ansuel Smith
2021-12-15  9:54   ` Vladimir Oltean
2021-12-14 22:44 ` [net-next PATCH RFC v6 11/16] net: dsa: qca8k: add tracking state of master port Ansuel Smith
2021-12-15  9:51   ` Vladimir Oltean
2021-12-16  0:00     ` Ansuel Smith
2021-12-14 22:44 ` [net-next PATCH RFC v6 12/16] net: dsa: qca8k: add support for mdio read/write in Ethernet packet Ansuel Smith
2021-12-15  9:49   ` Vladimir Oltean
2021-12-15 16:53     ` Ansuel Smith
2021-12-15 12:47   ` Vladimir Oltean
2021-12-15 16:56     ` Ansuel Smith [this message]
2021-12-14 22:44 ` [net-next PATCH RFC v6 13/16] net: dsa: qca8k: add support for mib autocast " Ansuel Smith
2021-12-14 22:44 ` [net-next PATCH RFC v6 14/16] net: dsa: qca8k: add support for phy read/write with mdio Ethernet Ansuel Smith
2021-12-14 22:44 ` [net-next PATCH RFC v6 15/16] net: dsa: qca8k: move page cache to driver priv Ansuel Smith
2021-12-14 22:44 ` [net-next PATCH RFC v6 16/16] net: dsa: qca8k: cache lo and hi for mdio write Ansuel Smith
2021-12-14 23:34 ` [net-next PATCH RFC v6 00/16] Add support for qca8k mdio rw in Ethernet packet Ansuel Smith
2021-12-15 10:26 ` Vladimir Oltean
2021-12-15 16:34   ` Ansuel Smith
2021-12-16 23:38     ` Vladimir Oltean
2022-01-06 20:56       ` Ansuel Smith
2022-01-07 17:17         ` Vladimir Oltean

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=61ba1e4e.1c69fb81.7ede4.493e@mx.google.com \
    --to=ansuelsmth@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.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).