netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Marek Vasut <marex@denx.de>
Cc: netdev@vger.kernel.org, f.fainelli@gmail.com,
	vivien.didelot@savoirfairelinux.com, Woojung.Huh@microchip.com,
	UNGLinuxDriver@microchip.com,
	Tristram Ha <Tristram.Ha@microchip.com>,
	"David S . Miller" <davem@davemloft.net>
Subject: Re: [PATCH 5/5] net: dsa: ksz: Add Microchip KSZ8795 DSA driver
Date: Sat, 8 Dec 2018 12:52:32 +0100	[thread overview]
Message-ID: <20181208115232.GE16502@lunn.ch> (raw)
In-Reply-To: <20181207181845.21702-5-marex@denx.de>

> +static int ksz8795_valid_dyn_entry(struct ksz_device *dev, u8 *data)
> +{
> +	int timeout = 100;
> +
> +	do {
> +		ksz_read8(dev, REG_IND_DATA_CHECK, data);
> +		timeout--;
> +	} while ((*data & DYNAMIC_MAC_TABLE_NOT_READY) && timeout);

readx_poll_timeout()?

> +static inline void ksz8795_from_vlan(u16 vlan, u8 *fid, u8 *member, u8 *valid)

Please don't use inline in C code, just in headers. Leave the compile
to decide if it should be inlined.

> +static void ksz8795_r_vlan_table(struct ksz_device *dev, u16 vid, u16 *vlan)
> +{
> +	u64 buf;
> +	u16 *data = (u16 *)&buf;
> +	u16 addr;
> +	int index;

The networking code uses reverse christmas tree. So you need to change
the order of these declarations, and do the assignment in the body of
the function. Please review all the functions.

> +static const u8 stp_multicast_addr[] = {
> +	0x01, 0x80, 0xC2, 0x00, 0x00, 0x00
> +};

include/linux/etherdevice.h defines eth_stp_addr.

	    Andrew

  reply	other threads:[~2018-12-08 11:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07 18:18 [PATCH 1/5] net: dsa: ksz: Add MIB counter reading support Marek Vasut
2018-12-07 18:18 ` [PATCH 2/5] net: dsa: ksz: Rename NET_DSA_TAG_KSZ to _KSZ9477 Marek Vasut
2018-12-07 18:18 ` [PATCH 3/5] net: dsa: ksz: Factor out common tag code Marek Vasut
2018-12-08 11:34   ` Andrew Lunn
2018-12-10 20:32     ` Tristram.Ha
2018-12-10 21:58       ` Marek Vasut
2018-12-11  7:40       ` Andrew Lunn
2018-12-13  3:42     ` Marek Vasut
2018-12-07 18:18 ` [PATCH 4/5] net: dsa: ksz: Add KSZ8795 " Marek Vasut
2018-12-07 18:18 ` [PATCH 5/5] net: dsa: ksz: Add Microchip KSZ8795 DSA driver Marek Vasut
2018-12-08 11:52   ` Andrew Lunn [this message]
2018-12-07 20:56 ` [PATCH 1/5] net: dsa: ksz: Add MIB counter reading support David Miller
2018-12-08 11:16 ` Andrew Lunn
2018-12-10 13:27   ` Marek Vasut

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=20181208115232.GE16502@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Tristram.Ha@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=Woojung.Huh@microchip.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=marex@denx.de \
    --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).