Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp634963pxt; Thu, 12 Aug 2021 06:25:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc5/fjpoe5fRmizu2GnYruzXIC0LL3fvkWoAzmqhyIi39Rnf/7eMowREA6NhO93lgFQvVi X-Received: by 2002:a17:906:388b:: with SMTP id q11mr3547905ejd.113.1628774748321; Thu, 12 Aug 2021 06:25:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628774748; cv=none; d=google.com; s=arc-20160816; b=WaZML/mRXDlRgdtOU9BeIXDx4BX4j7Kb40s1Lw6lma2e6YJblqTeN4dUQi2R6LTIkh Ber6Q0qbvVKzVaWNZWTGfmUYy9tEog2QydJxspmmaJBWSn8oLcPcoax5T3Lp4YViBmX3 WN6+6Me3SfDYtIlt7TgJNoYw2lOy/t/mgD0dds7OTKoDEuNWJb3ntwctWl6TaA1luAtQ vM/MoRmmA2b4tiLRUxB537y8p1KOmt3+5e2KDJ7cgz1YqCPQGZh7ww2CclgZyMfthTf1 YIu2hSbT7pJd9x9JevFXU3rawPZaV3e3/xuWcq5FUPTsvOuShCzDqzfOZdfJR5zSmsA9 nAPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=MQk5SZL2pmlhlcvThgXVe0/84DibgNU1yJn1OMMFAy0=; b=yVQNYAX7gcy+wOlowI2DAMduL7aMtSNXaLPY5tyt7OuYxoofVmVYiDTdrGNt5i4U6q wmhHxfx5sFOQxwUk8jj9yk6wDiOC+RqHdfEkU88hmZxbYhuQJaLVtEYI7YoDGPt+Mty8 volFqfmRLY88zrN9TnUdLai5FTr9BENmsMoucXX2PoPEcl9sNJtqD08D1psvYtr6Zfn8 HvtzpwSyG6yV4EZbjm/pm1l+Qo/QO4tJGxKIYRZpUDj3bZr8TBwgI2pfNOaqYT09LUtV bsSXZCdifOBrj0UbBtvCuJIJSeP+hF8hXhMurE2zdupMDkvxosbk23dsPEa5vxMqW1Ro hyhw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 hx27si2559160ejc.177.2021.08.12.06.25.22; Thu, 12 Aug 2021 06:25:48 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237861AbhHLNXP (ORCPT + 99 others); Thu, 12 Aug 2021 09:23:15 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:41762 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S237524AbhHLNTM (ORCPT ); Thu, 12 Aug 2021 09:19:12 -0400 X-UUID: 0b173581f66d46b9b09453b488510056-20210812 X-UUID: 0b173581f66d46b9b09453b488510056-20210812 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 2032732695; Thu, 12 Aug 2021 21:18:43 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 12 Aug 2021 21:18:42 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 12 Aug 2021 21:18:41 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Felipe Balbi CC: Pawel Laszczak , Al Cooper , Thierry Reding , Jonathan Hunter , Chunfeng Yun , Matthias Brugger , Christophe JAILLET , Yang Yingliang , Rikard Falkeborn , , , , , , , Eddie Hung Subject: [PATCH v2 6/7] usb: gadget: bdc: remove unnecessary AND operation when get ep maxp Date: Thu, 12 Aug 2021 21:18:02 +0800 Message-ID: <1628774283-475-6-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1628774283-475-1-git-send-email-chunfeng.yun@mediatek.com> References: <1628774283-475-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org usb_endpoint_maxp() already returns actual max packet size, no need AND 0x7ff. Acked-by: Felipe Balbi Signed-off-by: Chunfeng Yun --- v2: add acked-by felipe --- drivers/usb/gadget/udc/bdc/bdc_cmd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc_cmd.c b/drivers/usb/gadget/udc/bdc/bdc_cmd.c index 995f79c79f96..67887316a1a6 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_cmd.c +++ b/drivers/usb/gadget/udc/bdc/bdc_cmd.c @@ -153,7 +153,6 @@ int bdc_config_ep(struct bdc *bdc, struct bdc_ep *ep) si = clamp_val(si, 1, 16) - 1; mps = usb_endpoint_maxp(desc); - mps &= 0x7ff; param2 |= mps << MP_SHIFT; param2 |= usb_endpoint_type(desc) << EPT_SHIFT; -- 2.18.0