Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1267273ybt; Thu, 18 Jun 2020 04:48:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuf1RkAqRQ4lahoNPOFzpWeLPBbOsyHFDZhECo5mRW1CxiYKF+IdCmh9LnRRWlk/nE1QWW X-Received: by 2002:a17:906:784c:: with SMTP id p12mr3489823ejm.123.1592480898741; Thu, 18 Jun 2020 04:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592480898; cv=none; d=google.com; s=arc-20160816; b=JY6W6G7W5muksTDBG7RJHjGNF+TzcheVaPU/AK/mfVHGZ8m/HDHNC14Tftasg1YEy1 1MUhFg31wxiaVg8qF0KsjnyA2pkj/gbH8iPGcXZMh0o4IlNM//FsfMUKPs1Dqvr41bhA m8TDs2FKXogTkIPRwir7FwRYL1JAT6AOUSoRag+3H6NTi/CFfXtfnV3/14fXJA7FVoc0 0VOfHqB9R03C40N/vU93DZvICG7qUdSVG1215h49oiE8uOfKlj+eoKZ3J11jSsTrwiC9 x2JE5tT+S8ZEgO8VvIsE9qX2E3lb8sJjQcA4d8fIyOf7ZLV2LQ0wUBE1iICj0GCn+SaI Trng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4XnqJ20IExga/K0IhPzstjZ7zg9Stdygd6pci2+yWAc=; b=z3Q5pHXlweFCgpk5Wt1PbtQrrrMLqhsrNXRCVjMLvlJhMPk4YqZjwDmJAi6jtb9g59 mfVN6FYlZQ1DJEPi+aAUeOtdFhinMUrca9kFMeXE8U2+aXNmcL9FvxDLDr8eqTEFBJnd 4G4C95MAteflwOvAN6xr72Mr7rkrBJVmQZMieHCJbFIJlUj1XfmL8meJ4Nqyq8g/nXVd ZxDmdKDLmZ4HMzcusdnXQdgoKNxgSyZqkTtLc7gxidn5A0BOTXOyNxUmGEWpG3CiB510 miFyK/d9ZOk2Uzihpp28E6LhcuE/EjSl1PRkpP9NYbx/xRrTLpyBuB/KVIDcOyAHa7Vt ON5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=CVo1LLaj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nr21si1559632ejb.230.2020.06.18.04.47.54; Thu, 18 Jun 2020 04:48:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=CVo1LLaj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729016AbgFRJOT (ORCPT + 99 others); Thu, 18 Jun 2020 05:14:19 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:60309 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727037AbgFRJOT (ORCPT ); Thu, 18 Jun 2020 05:14:19 -0400 X-UUID: a674bac57478429b9da3629ca5aeca07-20200618 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=4XnqJ20IExga/K0IhPzstjZ7zg9Stdygd6pci2+yWAc=; b=CVo1LLaj/bLv/34Qw0lYsCGE0OrALjDzYWCBKeZGuV+xQ3RmI6L5eX5nOpqEgjwIT60kNz8sSV28Blwn0dABSfY1j1Xd3CGF8R13DcZHX70JHXxH4cZQx9KDqjPb7Zst5NkAxNaojoqwBS2YA8JWMZCM6E+2OhnNNzZK+QZFAVQ=; X-UUID: a674bac57478429b9da3629ca5aeca07-20200618 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1166593568; Thu, 18 Jun 2020 17:14:13 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 18 Jun 2020 17:14:10 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 18 Jun 2020 17:14:09 +0800 From: Macpaul Lin To: Alan Stern , Felipe Balbi , Greg Kroah-Hartman , Matthias Brugger , , , , , Jim Lin , Siqi Lin , Mediatek WSD Upstream , Macpaul Lin CC: Macpaul Lin Subject: [PATCH v3] usb: replace hardcode maximum usb string length by definition Date: Thu, 18 Jun 2020 17:13:38 +0800 Message-ID: <1592471618-29428-1-git-send-email-macpaul.lin@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1592201855-8218-1-git-send-email-macpaul.lin@mediatek.com> References: <1592201855-8218-1-git-send-email-macpaul.lin@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org UmVwbGFjZSBoYXJkY29kZSBtYXhpbXVtIHVzYiBzdHJpbmcgbGVuZ3RoICgxMjYgYnl0ZXMpIGJ5 IGRlZmluaXRpb24NCiJNQVhfVVNCX1NUUklOR19MRU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