Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1433209ybt; Sun, 14 Jun 2020 23:20:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX/mR678XqzARUg98yx3jDprjYkDR4wqlxJhld/HlDkKDVlmNdaRtZek2KlIKMOo3gg4R0 X-Received: by 2002:a17:906:b1c3:: with SMTP id bv3mr24783113ejb.292.1592202029940; Sun, 14 Jun 2020 23:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592202029; cv=none; d=google.com; s=arc-20160816; b=bKuCltdxGiVIcTlRAeBW5V2ndK0uTOCdkdjz9cNITC2ywc/4WWCdJ7mycSVu6DjNi6 MUc0U22pK6x1Quoh6YtJzRp/8nVUPYtEl6qEjEv9nlQTLO1YQFKjNj/JkCqkz46xgvVA fFlFyYG/+bQLH0FETm9e4jzKXcjAXYsspT3FvKkDoWKYSFD98qGFrnYyYmArYy4oie0T /ySJyhXFgeYj4bgnVARPJeei2neDMK1cKuqzb0XL83Mv5xTVi7Q9HLbZR3U5tkCZsvzZ SJ8SG33crVdOVAdmQPL7rcNZJLe2vNDroonW3s1CEng7fHJWnIaX+9II2GwxtSTOdix3 F5Xg== 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=8E6iUgy1G5r0W+amwcAzOmYy/2hIRJmEje9glVMcWAE=; b=mLTALc5Sizklwg/MBIz8daDVPV9zwExiWU8BimiO/kGxmr6WtmY0iqCCthHrQA0gMA K7oYeZR5HDcafLZZqFJ4761eixlFeYlkBuUGGlG1VXlq+5om+gF5R/8JW3ROaD7cUF1H zm9+LB5JJhOgW1AoowgftXF/Q/QuUXSDk9+YmrF0oZwtpKlkkcbf2C5XGE5Ag4KDY6HP lv134haMieYvPkAFZp+eylVy8dJlsbX7LHsUkgGcYyip6TUO8M2bfsPnRApXnqrRqLbA CEKe37yoHXO4x9J/vMWDHXtE0EF3SSCilTSVd5QN7CwtMbajGDl5ShVO58jXAT0tu2jk waoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="b/X8KeEo"; 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 w18si8500918ejn.727.2020.06.14.23.20.07; Sun, 14 Jun 2020 23:20:29 -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="b/X8KeEo"; 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 S1728363AbgFOGRq (ORCPT + 99 others); Mon, 15 Jun 2020 02:17:46 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:50470 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728224AbgFOGRp (ORCPT ); Mon, 15 Jun 2020 02:17:45 -0400 X-UUID: 736ae04e7d144c80a912027f8a13581b-20200615 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=8E6iUgy1G5r0W+amwcAzOmYy/2hIRJmEje9glVMcWAE=; b=b/X8KeEoJ94QKzFOYASCMzMn/nguGtHkwdi9D7frlPbA/VSjC8rvGQuQflitKCFsvC8qLQltFeQWJwzHhHFMm2Iwka/GPAMP1dr1OflTS3hLmTGwSt08KHMJmX4sa9l4bV3B5PZH9d8Zi0fo/BWyJhPqS2NsYwfNz+87voD7qIo=; X-UUID: 736ae04e7d144c80a912027f8a13581b-20200615 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1518178391; Mon, 15 Jun 2020 14:17:39 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 15 Jun 2020 14:17:38 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 15 Jun 2020 14:17:36 +0800 From: Macpaul Lin To: Felipe Balbi , Greg Kroah-Hartman , Matthias Brugger , , , , , Jim Lin , Siqi Lin , Alan Stern CC: Mediatek WSD Upstream , Macpaul Lin , Macpaul Lin Subject: [PATCH v2] usb: replace hardcode maximum usb string length by definition Date: Mon, 15 Jun 2020 14:17:35 +0800 Message-ID: <1592201855-8218-1-git-send-email-macpaul.lin@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1591939967-29943-1-git-send-email-macpaul.lin@mediatek.com> References: <1591939967-29943-1-git-send-email-macpaul.lin@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: ADBF890E55533CA3D08784747C3C1882B436106C825BCC1A9AAF43AD4F3E88222000:8 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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