[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878tdfdncl.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>
Date: Wed, 03 Jan 2018 09:32:42 -0500
From: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To: Andrew Lunn <andrew@...n.ch>, David Miller <davem@...emloft.net>
Cc: Florian Fainelli <f.fainelli@...il.com>,
netdev <netdev@...r.kernel.org>,
Russell King <rmk+kernel@....linux.org.uk>,
Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net-next 2/5] net: dsa: mv88e6xxx: Hold mutex while doing stats operations
Hi Andrew,
Andrew Lunn <andrew@...n.ch> writes:
> -static int mv88e6xxx_get_sset_count(struct dsa_switch *ds, int port)
> +static int _mv88e6xxx_get_sset_count(struct dsa_switch *ds, int port)
> {
> struct mv88e6xxx_chip *chip = ds->priv;
>
> @@ -702,6 +706,19 @@ static int mv88e6xxx_get_sset_count(struct dsa_switch *ds, int port)
> return 0;
> }
We worked to remove the old underscore prefix convention. Please don't
add it back... Simply rework the return statements of
mv88e6xxx_get_sset_count to lock/unlock there.
>
> +static int mv88e6xxx_get_sset_count(struct dsa_switch *ds, int port)
> +{
> + struct mv88e6xxx_chip *chip = ds->priv;
> + int ret;
> +
> + mutex_lock(&chip->reg_lock);
> + ret = _mv88e6xxx_get_sset_count(ds, port);
> + mutex_unlock(&chip->reg_lock);
> +
> + return ret;
> +}
> +
> +
Extra newline.
> static void mv88e6xxx_stats_get_stats(struct mv88e6xxx_chip *chip, int port,
> uint64_t *data, int types,
> u16 bank1_select, u16 histogram)
Thanks,
Vivien
Powered by blists - more mailing lists