Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp278211yba; Sat, 4 May 2019 02:08:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzG+O2xYqnFxl3z5rPEMG/B6OOyQ7h2VZG78Cu1iwGxs1/n6aQ+6VapUqAsXB/MuA8mLSN2 X-Received: by 2002:a62:4183:: with SMTP id g3mr18388969pfd.229.1556960883334; Sat, 04 May 2019 02:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556960883; cv=none; d=google.com; s=arc-20160816; b=T8zQF/5Zv6+pAcH91AcMvNVJ4dTGNnnjoDHQLHMDZT2KQEvBr3ywgO1qunWLl0zTAa BVHL2kPSKgBcL1SQx1IVuTO49DITI3FLnml61HhErCVWkAnIkE90h7jXi3n4ZoHzCxVC eqt+vTdxzGdyWmKDGj51+OwnuX4yVQnt81GPHdOp4siXUjCdYaw4LSSHIGR8xWzGNev4 i/K2UwJ93rzkgJMBrAPwJEennlnt93+tIBwrXPcw3ZBjxFFofPb8WlSstjYW7Q2F19QO c4hvIRtZCTg6DMdzZadzo5aiVQ+FHER5uP9rCj/V61zDdObfT5CPypIC4GUOa8I7DXIo +reA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6x7BgfwNmMZISxyyXcPEeCUvsRQVDt5HBlHCPDOEjwU=; b=s6FwLSE9em6NrsY3Gm9+h2S68Sa9Dm3lUL3Q0Zdu/vl7vQc0X3ngbjDUEQTgV1wRTD LunViGhlNcBUt5fHJuaIcEt+3lsNgIZsJWsMq8cxv4YHK4GCU9siZDESr+b11F5hglDM 7/meSIV5sFpSHFYpl1EAAaGNrUSs1AVfxMOGeTzr+AWsXuve2L+3OLGTVH2JUmP7ajKs CpppDedZZpfgEtunBkQc7KauDpfa75ZKlRqZ6w+8HavIHV1DCQycZxjpSXuZmlEUsTDw AJayMy6gE82+DTiAXC+QCS4HAgQmkxLThSnJqmiE5ZiwWCIBwqYVZwVF90BcyEj3jnw6 5vzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=puUuzFkk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si638293plt.280.2019.05.04.02.07.47; Sat, 04 May 2019 02:08:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=puUuzFkk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726702AbfEDJA3 (ORCPT + 99 others); Sat, 4 May 2019 05:00:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:44674 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbfEDJA3 (ORCPT ); Sat, 4 May 2019 05:00:29 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ADD44206BB; Sat, 4 May 2019 09:00:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556960428; bh=7HXqKzpxUiSs04dSG1RdKuXbafCjffLyeVJkF8NBEOg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=puUuzFkkzwwSmbdSjWHix07/cvUiyDGyk0+FIz9i4YcJ7oA6H7JhGuDTt7y30D2zN eCdZKfgo7WOKsnlgmcJ93LF816InzU+PNYuJpGhQOM+HiUwVpwCiZstZvYR2idVS9/ YWJc88yVVZkIVYsvxgD8/JipbwxoZNuKsOaMrxW0= Date: Sat, 4 May 2019 11:00:25 +0200 From: Greg KH To: Dragan Cvetic Cc: "arnd@arndb.de" , Michal Simek , "linux-arm-kernel@lists.infradead.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Derek Kiernan Subject: Re: [PATCH V3 07/12] misc: xilinx_sdfec: Add ability to configure LDPC Message-ID: <20190504090025.GB13840@kroah.com> References: <1556402706-176271-1-git-send-email-dragan.cvetic@xilinx.com> <1556402706-176271-8-git-send-email-dragan.cvetic@xilinx.com> <20190502172713.GD1874@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 03, 2019 at 04:49:19PM +0000, Dragan Cvetic wrote: > Hi Greg, > > Please find inline comments below. As they should be, no need to mention it :) > > -----Original Message----- > > From: Greg KH [mailto:gregkh@linuxfoundation.org] > > Sent: Thursday 2 May 2019 18:27 > > To: Dragan Cvetic > > Cc: arnd@arndb.de; Michal Simek ; linux-arm-kernel@lists.infradead.org; robh+dt@kernel.org; > > mark.rutland@arm.com; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Derek Kiernan > > 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 > > > > > > > > > +/** > > > + * 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? Not really, just have actual api functions in a uapi .h file, why would userspace care about this type of thing? thanks, greg k-h