[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <31a09423-276a-415b-a7b8-4aab04021a82@lunn.ch>
Date: Thu, 7 Mar 2024 14:24:36 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Parthiban.Veerasooran@...rochip.com
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, horms@...nel.org, saeedm@...dia.com,
anthony.l.nguyen@...el.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, corbet@....net,
linux-doc@...r.kernel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
devicetree@...r.kernel.org, Horatiu.Vultur@...rochip.com,
ruanjinjie@...wei.com, Steen.Hegelund@...rochip.com,
vladimir.oltean@....com, UNGLinuxDriver@...rochip.com,
Thorsten.Kummermehr@...rochip.com, Pier.Beruto@...emi.com,
Selvamani.Rajagopal@...emi.com, Nicolas.Ferre@...rochip.com,
benjamin.bigler@...nformulastudent.ch
Subject: Re: [PATCH net-next v3 04/12] net: ethernet: oa_tc6: implement
software reset
> >> +static int oa_tc6_read_sw_reset_status(struct oa_tc6 *tc6)
> >> +{
> >> + u32 regval;
> >> + int ret;
> >> +
> >> + ret = oa_tc6_read_register(tc6, OA_TC6_REG_STATUS0, ®val);
> >> + if (ret)
> >> + return 0;
> >> +
> >> + return regval;
> >
> > The function name does not really fit what the function does. The
> > function returns OA_TC6_REG_STATUS0. I assume it has more bits in it
> > than just STATUS0_RESETC. So either this function should be called
> > oa_tc6_read_status0, or you should mask regval with STATUS0_RESETC, so
> > that it does actually return the sw reset status.
> Ok, as we do the masking in the calling function readx_poll_timeout, as
> you suggested I will change the function name as oa_tc6_read_status0 in
> the next version.
O.K. And i think some of the later patches can them make use of this
generic function.
Andrew
Powered by blists - more mailing lists