Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3637586imm; Mon, 10 Sep 2018 22:49:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ+iTl7OwHV9TpaG2ghJ6K4Ua+FSoXw7oxY9gY0tA0EyxmnkGEtf4RjzbMSdbsWPDZenxdj X-Received: by 2002:a63:170b:: with SMTP id x11-v6mr25510430pgl.364.1536644979197; Mon, 10 Sep 2018 22:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536644979; cv=none; d=google.com; s=arc-20160816; b=MLyWzeh60bYV4LExXIK3Tn0Ixu4mPi4cyq5QefgMx/CtZlrndXlG6bgjoMon5sDW6L SIc9RU5t5emOJiIBM+5m2Dj8HrxP8qlyiZyzEPh4VvJBusRUNoyCT7hlAu1rlAF0AaeS v5RhzG8+9Y2kdTV4kLaTxOSSAsvXCz1tDO6bZYDcsO1IaXW3f7n+uTfF0GDQCGUCd73f UHcNT1SqET/RBkVEd4ghdKfjXe2NPnu2MDUl7DXWHVqCezAseOoaa5hy3OlKQsYTmgDe O8HrQE1rTjxrvR+Lfa/dIEE+gJMJamccefrh6Y6zkCSqMD/zpmQ8IZVx46jq6A3Fm/i6 tHww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=vdOg8MTb6H6C7NbbDmoBRkBrK6AV+R8+yzDE6alTom8=; b=irPdYg7vW1ou6Dai5W6EvB/n7crCuxRA//5iNk4y+Elo4afJg0GrF42lvD41X3sjwN ep2ii8PVtQ2ucNpMRugZahehgT7aA/ObLkZirMTVnFRV7wUmfE/sHswFz1aaDDrnRD3Q 5tZ3M74erKbc2xZY5Fjwj/UKjMwyOyOeQoGtlq4EBVmwwesRc+I3fEkU+wE2I617Ymvh vtX+N8gjvx3cg2iO9ozYU7729iYD6243dZGsRPpxJ6YbTERAuva+g3Ig/D6RXX8A11SO Sv3T87knd3GmJOcdnsaxePqHzJJWrzJ2FZ47B1wuMkadf93CpCpkCcq9451Mhu7oizAO iylA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 136-v6si20489193pfc.187.2018.09.10.22.49.21; Mon, 10 Sep 2018 22:49:39 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726485AbeIKKqx (ORCPT + 99 others); Tue, 11 Sep 2018 06:46:53 -0400 Received: from mga18.intel.com ([134.134.136.126]:57939 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726301AbeIKKqx (ORCPT ); Tue, 11 Sep 2018 06:46:53 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2018 22:49:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,359,1531810800"; d="scan'208";a="88930395" Received: from pipin.fi.intel.com (HELO localhost) ([10.237.72.128]) by fmsmga001.fm.intel.com with ESMTP; 10 Sep 2018 22:48:44 -0700 From: Felipe Balbi To: Greg Kroah-Hartman , Pawel Laszczak Cc: 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. In-Reply-To: <20180910181856.GB6019@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> Date: Tue, 11 Sep 2018 08:48:43 +0300 Message-ID: <87in3c1t50.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- balbi