Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3749794imm; Tue, 11 Sep 2018 01:12:57 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZOQD7Qg5ED4TT+Q+zucKPeo8Nwh5CFSr6Iql9I1JreZGkGmwvO/S7dAN8CjcS+5SHtr2UP X-Received: by 2002:a63:2acc:: with SMTP id q195-v6mr26548979pgq.291.1536653577704; Tue, 11 Sep 2018 01:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536653577; cv=none; d=google.com; s=arc-20160816; b=zvTjMTRSF56v+EOYcOHk5BQkp53FEMP62ijRcnH7AEt+uhMQDbmMJ7CvyZmpHZltFT PecEp96rVqH6TNr7M9i1a4dccxQnMOVrTSYOjjWOSKUJlJMWDEix21wye+yP88i9s5aU I350Bz46AQo16E1hd2bzzW62m7N/+Ml1agpsIEXfiS7zpTwmIisT5dO7kgk3iBtTc+uz 7b9Umdti1DCiwQ4D1mQSSdDJHVhCRkZ5nspAdODtxiWmbg6x/kUlbu5/KW6WJ2J3x0yA 8rntO3pHOEJNBFLsi+zMrVy1/KR0tWU1iTXwY/u11LCJToYz2Ct6sUXsvlOMpkjGIRHM LC/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=MZprmgIqPPnIkCy7mWee40fZQO30BTFm/nHXY9q25IA=; b=lpQ3So0LEFOgqw+N3+ud7MAI/vkCQqOkcEsel2AOP3Si3vIsei96k0YGimd4cIV1Jz ZBYxtCRrgTN2cqhURXoGKsuY/fxC8PSRQW4eRB1VwMhXH+1Hpra6QOT3Xe6IQM8obW5Y 4TcZOH8w171hWS4oYv5cv3aWCMzOLVcqyXWh7ZceJ7RASqnS8wX0D8xuq0rKdJW5oTzr nQf00RFnH0nD90klngQ1+2fHbJXkWOAy8+QRDRHLE07lxyTk0+kwDnsFU1OIfMPo14+S ODFayg6eKV6c+VIl0Oxbwnt6LEhrnBGv55YVaXcoWAkSfdRbKBhk8I45NKYd1bs81z+v Sd4g== 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 w1-v6si20137950pgt.629.2018.09.11.01.12.41; Tue, 11 Sep 2018 01:12:57 -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 S1726647AbeIKNKj (ORCPT + 99 others); Tue, 11 Sep 2018 09:10:39 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36826 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbeIKNKj (ORCPT ); Tue, 11 Sep 2018 09:10:39 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B202CCF5; Tue, 11 Sep 2018 08:12:29 +0000 (UTC) Date: Tue, 11 Sep 2018 10:12:27 +0200 From: Greg Kroah-Hartman To: Felipe Balbi Cc: Pawel Laszczak , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, ltyrala@cadence.com, adouglas@cadence.com Subject: Re: [PATCH 02/31] usb: usbssp: Added some decoding functions. Message-ID: <20180911081227.GB8963@kroah.com> References: <1532023084-28083-1-git-send-email-pawell@cadence.com> <1532023084-28083-3-git-send-email-pawell@cadence.com> <20180910181856.GB6019@kroah.com> <87in3c1t50.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87in3c1t50.fsf@linux.intel.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 Tue, Sep 11, 2018 at 08:48:43AM +0300, Felipe Balbi wrote: > > Hi, > > Greg Kroah-Hartman writes: > > 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... > > many of them seem to be a straight copy from xhci. Which doesn't mean it's a great model to copy :) Let's learn from our past mistakes, having had to try to slim down a kernel for a limited memory system is a chore that no one should have to manually hack up the source tree just to accomplish it. thanks, greg k-h