Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3119549imm; Mon, 10 Sep 2018 11:20:55 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYEc173cjjO0UB4V8SpdyjqBl70vaY2BxQZmig5lHQVHn5EZMv8wlXX+pMezFHAuRHH+uQk X-Received: by 2002:a63:dc17:: with SMTP id s23-v6mr24232650pgg.40.1536603655060; Mon, 10 Sep 2018 11:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536603655; cv=none; d=google.com; s=arc-20160816; b=q/TiZBhgUROLvog6QVo07/hhIXoKNy9kray+Cq7yRWUTLO6AmK0+wp+TjvNSkZa19G DHhZv2OLiyG40RGquYk+G7vOlauSf5bN1uEldAWHkjOTCvyTwS8eq0NqSVDcYz/QARBH XxSyVlVDKH2esV4puf1nJKxke16whzcRYEfcOEZviO+gy8W6KAnsfuUclIc8P2GIlRxb It8XQUaEOx9DbQP2WiHLIiOHmUk4Gf2ym8EjTP2ND03/Ec2A1hmyQVD1yp0ycjrBepwa P9aNuErgulGJWNdXYB5OJ5ljt3/osVDjf6FV5y1j2Jc769zVq8RpyHplYgnxkOPKCq58 sr/w== 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; bh=qjvGU2JhnaXM/gZ8Xbq3tKtnUI4EEDosWVX81aRTshU=; b=Rcuiqq2lY3HpDKwgyUn5i07cfIFZFa0QAMKvbmQeBIAph1Wm99Toio0gmmZCpGqKVW 9JvZTP9zbJNuLQXeDFSHSQD3XQ99dW69/sOTfWMOLtT5fwubDFBH/qTnxsQ6kzf0bpAD agIFM0/EoFboQlkMYjVCzKVNw+mtYKqfJakU17Mt6STgqFQGARvy9tQotfEVdkXfdZzQ oIWQ/RQy0cAOOOpKIjaWRT5Y6majLHW1B2OzK087F1s6grxekJ6pkfv9jxSDYN/jynAR 6ZTxN6vZ3PYrTnoEtF6G3UBMs6/puEyuFBC5Vqh7xZKBhLvcpIbihR3LVlR3gIubcp0I Ir5A== ARC-Authentication-Results: i=1; mx.google.com; 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 t80-v6si19113000pfk.228.2018.09.10.11.20.37; Mon, 10 Sep 2018 11:20:55 -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; 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 S1728400AbeIJXOU (ORCPT + 99 others); Mon, 10 Sep 2018 19:14:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43778 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726657AbeIJXOT (ORCPT ); Mon, 10 Sep 2018 19:14:19 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 37C66C93; Mon, 10 Sep 2018 18:18:59 +0000 (UTC) Date: Mon, 10 Sep 2018 20:18:56 +0200 From: Greg Kroah-Hartman To: Pawel Laszczak Cc: linux-usb@vger.kernel.org, Felipe Balbi , linux-kernel@vger.kernel.org, ltyrala@cadence.com, adouglas@cadence.com Subject: Re: [PATCH 02/31] usb: usbssp: Added some decoding functions. Message-ID: <20180910181856.GB6019@kroah.com> References: <1532023084-28083-1-git-send-email-pawell@cadence.com> <1532023084-28083-3-git-send-email-pawell@cadence.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1532023084-28083-3-git-send-email-pawell@cadence.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 19, 2018 at 06:57:35PM +0100, Pawel Laszczak wrote: > This patch add additional functions that converts some fields to string. > > For example function usbssp_trb_comp_code_string take completion > code value and return string describing completion code. > > Signed-off-by: Pawel Laszczak > --- > drivers/usb/usbssp/gadget.h | 580 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 580 insertions(+) > > diff --git a/drivers/usb/usbssp/gadget.h b/drivers/usb/usbssp/gadget.h > index 49e7271187cc..b5c17603af78 100644 > --- a/drivers/usb/usbssp/gadget.h > +++ b/drivers/usb/usbssp/gadget.h > @@ -930,6 +930,73 @@ struct usbssp_transfer_event { > #define COMP_UNDEFINED_ERROR 33 > #define COMP_INVALID_STREAM_ID_ERROR 34 > > +static inline const char *usbssp_trb_comp_code_string(u8 status) You have _giant_ inline functions here, why? Please just put this all in a .c file and let the linker properly handle things. You do not want to duplicate all of these crazy strings all over the place where ever you call these functions. And I am guessing this is only for some sort of "debugging" mode? If so, shouldn't there be a way to not even build this in? Some systems are very space constrained... thanks, greg k-h