[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BL0PR02MB5681D386363988CB2CA4D040CB350@BL0PR02MB5681.namprd02.prod.outlook.com>
Date: Fri, 3 May 2019 16:49:19 +0000
From: Dragan Cvetic <draganc@...inx.com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: "arnd@...db.de" <arnd@...db.de>, Michal Simek <michals@...inx.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"mark.rutland@....com" <mark.rutland@....com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Derek Kiernan <dkiernan@...inx.com>
Subject: RE: [PATCH V3 07/12] misc: xilinx_sdfec: Add ability to configure
LDPC
Hi Greg,
Please find inline comments below.
Regards
Dragan
> -----Original Message-----
> From: Greg KH [mailto:gregkh@...uxfoundation.org]
> Sent: Thursday 2 May 2019 18:27
> To: Dragan Cvetic <draganc@...inx.com>
> Cc: arnd@...db.de; Michal Simek <michals@...inx.com>; linux-arm-kernel@...ts.infradead.org; robh+dt@...nel.org;
> mark.rutland@....com; devicetree@...r.kernel.org; linux-kernel@...r.kernel.org; Derek Kiernan <dkiernan@...inx.com>
> Subject: Re: [PATCH V3 07/12] misc: xilinx_sdfec: Add ability to configure LDPC
>
> On Sat, Apr 27, 2019 at 11:05:01PM +0100, Dragan Cvetic wrote:
> > --- a/include/uapi/misc/xilinx_sdfec.h
> > +++ b/include/uapi/misc/xilinx_sdfec.h
>
> <snip>
>
> > +/**
> > + * xsdfec_calculate_shared_ldpc_table_entry_size - Calculates shared code
> > + * table sizes.
> > + * @ldpc: Pointer to the LPDC Code Parameters
> > + * @table_sizes: Pointer to structure containing the calculated table sizes
> > + *
> > + * Calculates the size of shared LDPC code tables used for a specified LPDC code
> > + * parameters.
> > + */
> > +inline void
> > +xsdfec_calculate_shared_ldpc_table_entry_size(struct xsdfec_ldpc_params *ldpc,
> > + struct xsdfec_ldpc_param_table_sizes *table_sizes)
> > +{
> > + /* Calculate the sc_size in 32 bit words */
> > + table_sizes->sc_size = (ldpc->nlayers + 3) >> 2;
> > + /* Calculate the la_size in 256 bit words */
> > + table_sizes->la_size = ((ldpc->nlayers << 2) + 15) >> 4;
> > + /* Calculate the qc_size in 256 bit words */
> > + table_sizes->qc_size = ((ldpc->nqc << 2) + 15) >> 4;
> > +}
>
> Why do you have an inline function in a user api .h file? That's really
> not a good idea.
This is just a Helper function for users aligning the calculations.
Please advise, is this acceptable?
>
> thanks,
>
> greg k-h
Powered by blists - more mailing lists