lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200305070926.ztwgwsilejsqglet@lx-anielsen.microsemi.net>
Date:   Thu, 5 Mar 2020 08:09:26 +0100
From:   "Allan W. Nielsen" <allan.nielsen@...rochip.com>
To:     Vladimir Oltean <olteanv@...il.com>
CC:     <davem@...emloft.net>, <horatiu.vultur@...rochip.com>,
        <alexandre.belloni@...tlin.com>, <andrew@...n.ch>,
        <f.fainelli@...il.com>, <vivien.didelot@...il.com>,
        <joergen.andreasen@...rochip.com>, <claudiu.manoil@....com>,
        <netdev@...r.kernel.org>, <UNGLinuxDriver@...rochip.com>,
        <alexandru.marginean@....com>, <xiaoliang.yang_1@....com>,
        <yangbo.lu@....com>, <po.liu@....com>, <jiri@...lanox.com>,
        <idosch@...sch.org>, <kuba@...nel.org>
Subject: Re: [PATCH v2 net-next 05/10] net: mscc: ocelot: spell out full
 "ocelot" name instead of "oc"

On 29.02.2020 16:31, Vladimir Oltean wrote:
>EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
>From: Vladimir Oltean <vladimir.oltean@....com>
>
>This is a cosmetic patch that makes the name of the driver private
>variable be used uniformly in ocelot_ace.c as in the rest of the driver.
>
>Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
>---
>Changes in v2:
>Patch is new.
>
> drivers/net/ethernet/mscc/ocelot_ace.c | 45 ++++++++++++++------------
> 1 file changed, 24 insertions(+), 21 deletions(-)
>
>diff --git a/drivers/net/ethernet/mscc/ocelot_ace.c b/drivers/net/ethernet/mscc/ocelot_ace.c
>index 375c7c6aa7d5..ec86d29d8be4 100644
>--- a/drivers/net/ethernet/mscc/ocelot_ace.c
>+++ b/drivers/net/ethernet/mscc/ocelot_ace.c
>@@ -93,12 +93,12 @@ struct vcap_data {
>        u32 tg_mask; /* Current type-group mask */
> };
>
>-static u32 vcap_s2_read_update_ctrl(struct ocelot *oc)
>+static u32 vcap_s2_read_update_ctrl(struct ocelot *ocelot)
> {
>-       return ocelot_read(oc, S2_CORE_UPDATE_CTRL);
>+       return ocelot_read(ocelot, S2_CORE_UPDATE_CTRL);
> }
>
>-static void vcap_cmd(struct ocelot *oc, u16 ix, int cmd, int sel)
>+static void vcap_cmd(struct ocelot *ocelot, u16 ix, int cmd, int sel)
> {
>        u32 value = (S2_CORE_UPDATE_CTRL_UPDATE_CMD(cmd) |
>                     S2_CORE_UPDATE_CTRL_UPDATE_ADDR(ix) |
>@@ -116,42 +116,42 @@ static void vcap_cmd(struct ocelot *oc, u16 ix, int cmd, int sel)
>        if (!(sel & VCAP_SEL_COUNTER))
>                value |= S2_CORE_UPDATE_CTRL_UPDATE_CNT_DIS;
>
>-       ocelot_write(oc, value, S2_CORE_UPDATE_CTRL);
>-       readx_poll_timeout(vcap_s2_read_update_ctrl, oc, value,
>+       ocelot_write(ocelot, value, S2_CORE_UPDATE_CTRL);
>+       readx_poll_timeout(vcap_s2_read_update_ctrl, ocelot, value,
>                                (value & S2_CORE_UPDATE_CTRL_UPDATE_SHOT) == 0,
>                                10, 100000);
> }
>
> /* Convert from 0-based row to VCAP entry row and run command */
>-static void vcap_row_cmd(struct ocelot *oc, u32 row, int cmd, int sel)
>+static void vcap_row_cmd(struct ocelot *ocelot, u32 row, int cmd, int sel)
> {
>-       vcap_cmd(oc, vcap_is2.entry_count - row - 1, cmd, sel);
>+       vcap_cmd(ocelot, vcap_is2.entry_count - row - 1, cmd, sel);
> }
>
>-static void vcap_entry2cache(struct ocelot *oc, struct vcap_data *data)
>+static void vcap_entry2cache(struct ocelot *ocelot, struct vcap_data *data)
> {
>        u32 i;
>
>        for (i = 0; i < vcap_is2.entry_words; i++) {
>-               ocelot_write_rix(oc, data->entry[i], S2_CACHE_ENTRY_DAT, i);
>-               ocelot_write_rix(oc, ~data->mask[i], S2_CACHE_MASK_DAT, i);
>+               ocelot_write_rix(ocelot, data->entry[i], S2_CACHE_ENTRY_DAT, i);
>+               ocelot_write_rix(ocelot, ~data->mask[i], S2_CACHE_MASK_DAT, i);
>        }
>-       ocelot_write(oc, data->tg, S2_CACHE_TG_DAT);
>+       ocelot_write(ocelot, data->tg, S2_CACHE_TG_DAT);
> }
>
>-static void vcap_cache2entry(struct ocelot *oc, struct vcap_data *data)
>+static void vcap_cache2entry(struct ocelot *ocelot, struct vcap_data *data)
> {
>        u32 i;
>
>        for (i = 0; i < vcap_is2.entry_words; i++) {
>-               data->entry[i] = ocelot_read_rix(oc, S2_CACHE_ENTRY_DAT, i);
>+               data->entry[i] = ocelot_read_rix(ocelot, S2_CACHE_ENTRY_DAT, i);
>                // Invert mask
>-               data->mask[i] = ~ocelot_read_rix(oc, S2_CACHE_MASK_DAT, i);
>+               data->mask[i] = ~ocelot_read_rix(ocelot, S2_CACHE_MASK_DAT, i);
>        }
>-       data->tg = ocelot_read(oc, S2_CACHE_TG_DAT);
>+       data->tg = ocelot_read(ocelot, S2_CACHE_TG_DAT);
> }
>
>-static void vcap_action2cache(struct ocelot *oc, struct vcap_data *data)
>+static void vcap_action2cache(struct ocelot *ocelot, struct vcap_data *data)
> {
>        u32 i, width, mask;
>
>@@ -163,21 +163,24 @@ static void vcap_action2cache(struct ocelot *oc, struct vcap_data *data)
>        }
>
>        for (i = 0; i < vcap_is2.action_words; i++)
>-               ocelot_write_rix(oc, data->action[i], S2_CACHE_ACTION_DAT, i);
>+               ocelot_write_rix(ocelot, data->action[i],
>+                                S2_CACHE_ACTION_DAT, i);
>
>        for (i = 0; i < vcap_is2.counter_words; i++)
>-               ocelot_write_rix(oc, data->counter[i], S2_CACHE_CNT_DAT, i);
>+               ocelot_write_rix(ocelot, data->counter[i],
>+                                S2_CACHE_CNT_DAT, i);
> }
>
>-static void vcap_cache2action(struct ocelot *oc, struct vcap_data *data)
>+static void vcap_cache2action(struct ocelot *ocelot, struct vcap_data *data)
> {
>        u32 i, width;
>
>        for (i = 0; i < vcap_is2.action_words; i++)
>-               data->action[i] = ocelot_read_rix(oc, S2_CACHE_ACTION_DAT, i);
>+               data->action[i] = ocelot_read_rix(ocelot, S2_CACHE_ACTION_DAT,
>+                                                 i);
>
>        for (i = 0; i < vcap_is2.counter_words; i++)
>-               data->counter[i] = ocelot_read_rix(oc, S2_CACHE_CNT_DAT, i);
>+               data->counter[i] = ocelot_read_rix(ocelot, S2_CACHE_CNT_DAT, i);
>
>        /* Extract action type */
>        width = vcap_is2.action_type_width;
>--
>2.17.1


Reviewed-by: Allan W. Nielsen <allan.nielsen@...rochip.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ