[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<CO6PR18MB409861918DAF0D8D9FE684EEB0D02@CO6PR18MB4098.namprd18.prod.outlook.com>
Date: Fri, 28 Jun 2024 13:48:00 +0000
From: Witold Sadowski <wsadowski@...vell.com>
To: Mark Brown <broonie@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"robh@...nel.org"
<robh@...nel.org>,
"krzysztof.kozlowski+dt@...aro.org"
<krzysztof.kozlowski+dt@...aro.org>,
"conor+dt@...nel.org"
<conor+dt@...nel.org>,
"pthombar@...ence.com" <pthombar@...ence.com>
Subject: RE: [EXTERNAL] Re: [PATCH v9 6/9] spi: cadence: Add Marvell xfer
operation support
Hi Mark
>
> > + while (t->len) {
> > +
> > + current_cycle_count = t->len > max_len ? max_len : t-
> >len;
>
> cycle_count seems like a weird name?
>
> In general please try to avoid overusing the ternery operator, it doesn't
> help legibility. Just write normal conditional statements, or in this
> case use max().
Will be addressed in next patchset.
>
> > + cdns_xspi->current_xfer_qword +=
> current_cycle_count /
> > +
> MRVL_XFER_QWORD_BYTECOUNT;
> > + if (current_cycle_count %
> MRVL_XFER_QWORD_BYTECOUNT)
> > + cdns_xspi->current_xfer_qword++;
> > +
> > + cdns_xspi->current_xfer_qword %=
> MRVL_XFER_QWORD_COUNT;
> > + }
> > + cs_change = t->cs_change;
> > + t->len -= current_cycle_count;
> > + }
> > + }
>
> This loop doesn't implement any of the delay stuff, ideally it either
> would or would reject transfers that request transfers.
I'm not sure about what kind of the delay You are referring to. Can You explain?
Regards
Witek
Powered by blists - more mailing lists