Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2871729ybi; Sun, 9 Jun 2019 23:30:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSgiSkYlg77ygxOW2e1GJTj5IipVz6tElJQ77x90GwEcH0cNesPWmgMAYY78+uOEHpCdXT X-Received: by 2002:aa7:97bb:: with SMTP id d27mr5533616pfq.93.1560148242924; Sun, 09 Jun 2019 23:30:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560148242; cv=none; d=google.com; s=arc-20160816; b=Xyq6JtGycy8OBMW3mJUqxWG8ewrBq+tGX7QzNUtWkPjFt6QSpAdUwSvmY97MUjQGcu t5j0HXyd3omJ1HK0W04iIa3YSgPHpob1M0mz/BboeEcJM8FKo7aYquPWBBlhQOJ3MOCr MLAyQeLLN5XlK9baDw4Snzp7gfQzonzDk767NyIabmSKoXhU/nl4N3VlFqf1y6EAy+4C gEjXJKExZtlhM2a7MvbZqzbXtchNcB4HA/UvCJ26K+aZpUV9v9vLHwlZhaHA9OjnnZpd ziCOd8oW5Ru982OXPM6YT2ylp2yPn4iiLEZg4YvwqjkTGkm8DXYW9AtXnD/Eh+kO4U6l +vrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=P0vnocFvZxBwfdYhEL9DulKQijsgEH2BMGtmsMJz/is=; b=tQ/JoDw2dbT8IVs4i5v62+3D3briWHSTBm04QhGKnv6khX94siXufEIr3nOsql1Fpx xqPLmnsMX5h47gO0b/Z2kt/Or7C1/EfPYqH24HdeTdowqJp95PVtUX2fschKJqKnm+Y5 0F+uwkdBH1sw6hTM/9SHIXjt6KshY7G9i1hJiGDVSRM5i1usPBRpyUSxWF4h62K/6ojl M+6DX/KhhxzDt2vnJCsgU4Lr/QlTXhhsG5+q7CrI1ID62MI1yAWccTeMG4O4tBKWE6r1 LfpH+QCyzhHXD0EmgE1ADbHVNFsQhewxJoHo6TWlUgK9JDEKp1/oGA3WV0CDzBttEcwW KjDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cadence.com header.s=proofpoint header.b=tLkuf9ro; dkim=pass header.i=@cadence.com header.s=selector1 header.b=lgTqaKEC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=cadence.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j14si9325373pfi.276.2019.06.09.23.30.28; Sun, 09 Jun 2019 23:30:42 -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=@cadence.com header.s=proofpoint header.b=tLkuf9ro; dkim=pass header.i=@cadence.com header.s=selector1 header.b=lgTqaKEC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=cadence.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387733AbfFJGaB (ORCPT + 99 others); Mon, 10 Jun 2019 02:30:01 -0400 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193]:53732 "EHLO mx0a-0014ca01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387464AbfFJGaA (ORCPT ); Mon, 10 Jun 2019 02:30:00 -0400 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5A6ShFR011487; Sun, 9 Jun 2019 23:29:29 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=proofpoint; bh=P0vnocFvZxBwfdYhEL9DulKQijsgEH2BMGtmsMJz/is=; b=tLkuf9ro45s7PISzjl1fgIsCZowTkfovCZi7JKMlk3f1Ru5xkAkA7ucPHHaA+F/Jb721 AnvphOmix09JmS4g7vdqg8o9DZUupVep5q/qM0S3kfxVaNa8/L6XVUdRdWKZBZqixLcs dtMmYDWSCsPT7v9d4NXS+btZyh1UaqaEvqLo0dZFVtrp1lTlRn0rf1Lgw9gY+1TfvVkA 7/NNfxLoe75b06P5PvWwHNjBv/uBwH4dkSVReuUHWSeIBG3ogfUkDrBqWj4QK0Qjs4BM 0rGVH9kAeBdrwWCZg6dXYmAxX3W49sbyaSOsHCpRo2zANMJFNe8VAOkDoprNCtW7E9gI 3Q== Authentication-Results: cadence.com; spf=pass smtp.mailfrom=pawell@cadence.com Received: from nam05-by2-obe.outbound.protection.outlook.com (mail-by2nam05lp2057.outbound.protection.outlook.com [104.47.50.57]) by mx0b-0014ca01.pphosted.com with ESMTP id 2t08kxd887-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 09 Jun 2019 23:29:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P0vnocFvZxBwfdYhEL9DulKQijsgEH2BMGtmsMJz/is=; b=lgTqaKECIAYEUtTdeYuWnxKAwwXdyYPgM1+cvaIjInhTBrvJ30YZRGAM/bU2biPKfm+/K8U2hQJUj8htsMPue6/6LArsSp5xe7MzYgiPzwQZZsIgT+1TXOrnsFEBh70kqBrKJvWlEy50zvVzNOl+gaMGm9ecsrbLtqf6EbLwTIg= Received: from BYAPR07MB4709.namprd07.prod.outlook.com (52.135.204.159) by BYAPR07MB5063.namprd07.prod.outlook.com (52.135.239.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.14; Mon, 10 Jun 2019 06:29:24 +0000 Received: from BYAPR07MB4709.namprd07.prod.outlook.com ([fe80::594a:4a73:3ead:457d]) by BYAPR07MB4709.namprd07.prod.outlook.com ([fe80::594a:4a73:3ead:457d%3]) with mapi id 15.20.1965.017; Mon, 10 Jun 2019 06:29:24 +0000 From: Pawel Laszczak To: Greg KH CC: "devicetree@vger.kernel.org" , "felipe.balbi@linux.intel.com" , "linux-usb@vger.kernel.org" , "hdegoede@redhat.com" , "heikki.krogerus@linux.intel.com" , "robh+dt@kernel.org" , "rogerq@ti.com" , "linux-kernel@vger.kernel.org" , "jbergsagel@ti.com" , "nsekhar@ti.com" , "nm@ti.com" , Suresh Punnoose , "peter.chen@nxp.com" , Jayshri Dajiram Pawar , Rahul Kumar Subject: RE: [PATCH v7 2/6] usb:common Separated decoding functions from dwc3 driver. Thread-Topic: [PATCH v7 2/6] usb:common Separated decoding functions from dwc3 driver. Thread-Index: AQHVG4YSgPl5e1M+1Ue5XKtVVDFb6qaRyFMAgAKop2A= Date: Mon, 10 Jun 2019 06:29:24 +0000 Message-ID: References: <1559729030-16390-1-git-send-email-pawell@cadence.com> <1559729030-16390-3-git-send-email-pawell@cadence.com> <20190608134008.GB11489@kroah.com> In-Reply-To: <20190608134008.GB11489@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNccGF3ZWxsXGFwcGRhdGFccm9hbWluZ1wwOWQ4NDliNi0zMmQzLTRhNDAtODVlZS02Yjg0YmEyOWUzNWJcbXNnc1xtc2ctMTUxYWJmZDctOGI0OS0xMWU5LTg3NDEtMWM0ZDcwMWRmYmE0XGFtZS10ZXN0XDE1MWFiZmQ4LThiNDktMTFlOS04NzQxLTFjNGQ3MDFkZmJhNGJvZHkudHh0IiBzej0iMzU1OSIgdD0iMTMyMDQ2MjE3NjI0ODQ3Nzg4IiBoPSI0V2VkLzJvNHh0MDRkd1Z2NVZVdGc5ZnJxQjA9IiBpZD0iIiBibD0iMCIgYm89IjEiLz48L21ldGE+ x-dg-rorf: x-originating-ip: [185.217.253.59] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6218fb84-de09-4a52-9241-08d6ed6cfb21 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:BYAPR07MB5063; x-ms-traffictypediagnostic: BYAPR07MB5063: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1923; x-forefront-prvs: 0064B3273C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(376002)(39860400002)(396003)(136003)(366004)(199004)(189003)(36092001)(3846002)(6116002)(52536014)(478600001)(2906002)(186003)(229853002)(7736002)(305945005)(102836004)(7416002)(6436002)(107886003)(6246003)(11346002)(25786009)(4326008)(74316002)(53936002)(66556008)(54906003)(486006)(86362001)(6306002)(66476007)(81166006)(64756008)(66446008)(9686003)(99286004)(33656002)(55016002)(8936002)(5660300002)(81156014)(6506007)(76116006)(7696005)(8676002)(966005)(76176011)(66066001)(14454004)(316002)(73956011)(71200400001)(6916009)(26005)(446003)(71190400001)(66946007)(476003)(256004)(68736007);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR07MB5063;H:BYAPR07MB4709.namprd07.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: cadence.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 1Qps1QiRtDoCEStSFCHAbmFBGSAHncSmufABqHi18un+JCeomLvZZmNyDQt5IyY8oiCYjWtvPTZxu8J0u87294qRn+GTDnzFElvV/osGlYDK6ygVtTLe36bUZRid/eL2/DEtbDonLPdrzZSmO/q8Uh20bZce78v7s+dD+VHVnRRpVyjqMU+esTdo+JaDthgkP9flszk3H6mQbvmQ8V8xSivOA9RELb+3IcxteX/gs8e+l5tDZabeo2NBt1ZqB1VJrWaTfpuFsauBXZYq4Oq2sVf6YUezUcBHyil4zAfQ6qo3gvBf5TZKvrHeX2JBy7ROSzVGAeEbAP+XrR9wxLtBvI59xf4Q6k/5DxEo7NKoztfc0+OGCi+Isxb3WGTmO/C0uCxjrF3YQIWMkpSJhr78QqiZQokFQPN6bt34u5QIlSQ= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6218fb84-de09-4a52-9241-08d6ed6cfb21 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jun 2019 06:29:24.3007 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: pawell@global.cadence.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB5063 X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:spf.smktg.jp include:_spf.salesforce.com include:mktomail.com include:spf-0014ca01.pphosted.com include:spf.protection.outlook.com include:auth.msgapp.com include:spf.mandrillapp.com ~all X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-10_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906100045 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >On Wed, Jun 05, 2019 at 11:03:46AM +0100, Pawel Laszczak wrote: > >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver > >> to driver/usb/common/debug.c file. These moved functions include: > >> dwc3_decode_get_status > >> dwc3_decode_set_clear_feature > >> dwc3_decode_set_address > >> dwc3_decode_get_set_descriptor > >> dwc3_decode_get_configuration > >> dwc3_decode_set_configuration > >> dwc3_decode_get_intf > >> dwc3_decode_set_intf > >> dwc3_decode_synch_frame > >> dwc3_decode_set_sel > >> dwc3_decode_set_isoch_delay > >> dwc3_decode_ctrl > >> > >> These functions are used also in inroduced cdns3 driver. > >> > >> All functions prefixes were changed from dwc3 to usb. > >> Also, function's parameters has been extended according to the name > >> of fields in standard SETUP packet. > >> Additionally, patch adds usb_decode_ctrl function to > >> include/linux/usb/ch9.h file.i > >> > >> Signed-off-by: Pawel Laszczak > >> --- > >> drivers/usb/common/Makefile | 2 +- > >> drivers/usb/common/debug.c | 273 ++++++++++++++++++++++++++++++++++++ > >> drivers/usb/dwc3/debug.h | 252 --------------------------------- > >> drivers/usb/dwc3/trace.h | 2 +- > >> include/linux/usb/ch9.h | 25 ++++ > >> 5 files changed, 300 insertions(+), 254 deletions(-) > >> create mode 100644 drivers/usb/common/debug.c > >> > >> diff --git a/drivers/usb/common/Makefile b/drivers/usb/common/Makefile > >> index 0a7c45e85481..02eb01666289 100644 > >> --- a/drivers/usb/common/Makefile > >> +++ b/drivers/usb/common/Makefile > >> @@ -4,7 +4,7 @@ > >> # > >> > >> obj-$(CONFIG_USB_COMMON) +=3D usb-common.o > >> -usb-common-y +=3D common.o > >> +usb-common-y +=3D common.o debug.o > >> usb-common-$(CONFIG_USB_LED_TRIG) +=3D led.o > >> > >> obj-$(CONFIG_USB_OTG_FSM) +=3D usb-otg-fsm.o > >> diff --git a/drivers/usb/common/debug.c b/drivers/usb/common/debug.c > >> new file mode 100644 > >> index 000000000000..f7218d794aa6 > >> --- /dev/null > >> +++ b/drivers/usb/common/debug.c > >> @@ -0,0 +1,273 @@ > >> +// SPDX-License-Identifier: GPL-2.0 > >> +/** > >> + * Common USB debugging functions > >> + * > >> + * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://url= defense.proofpoint.com/v2/url?u=3Dhttp- >3A__www.ti.com&d=3DDwIBAg&c=3DaUq983L2pue2FqKFoP6PGHMJQyoJ7kl3s3GZ-_haXqY&= r=3De1OgxfvkL0qo9XO6fX1gscva- >w03uSYC1nIyxl89-rI&m=3DhCAftKt20FnC6KiCwNbVrg7WoY-WnCtUjVuast3iJSw&s=3DQ4q= hFXl4s1P2u0s65WgkulIRgV4KZtGphj7Xjr4t6yA&e=3D > >> + * > >> + * Authors: Felipe Balbi , > >> + * Sebastian Andrzej Siewior > >> + */ > >> + > >> +#ifndef __LINUX_USB_COMMON_DEBUG > >> +#define __LINUX_USB_COMMON_DEBUG > > > >Why are you doing thsi in a .c file? > Good question, I don't know :).=20 Was removed=20 Also I remember that you complained about placing it in=20 drivers/usb/common.=20 Currently this file is used only by two drivers dwc3 and cdns3. Both are USB controller drivers. Maybe it could be better to move it to: drivers/gadget/udc/debug.c drivers/gadget/debug.c=20 drivers/gadget/common/debug.c or drivers/gadget/debug/debug.c=20 What do you think Roger?=20 Felipe it's also question for you.=20 =20 Thanks, Pawel > > >thanks, > > > >greg k-h