LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Felipe Balbi <balbi@kernel.org>
Cc: Pawel Laszczak <pawell@cadence.com>,
	Al Cooper <alcooperx@gmail.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Yang Yingliang <yangyingliang@huawei.com>,
	Rikard Falkeborn <rikard.falkeborn@gmail.com>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<bcm-kernel-feedback-list@broadcom.com>,
	<linux-tegra@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	Eddie Hung <eddie.hung@mediatek.com>
Subject: [PATCH 6/6] usb: gadget: remove unnecessary AND operation when get ep maxp
Date: Thu, 12 Aug 2021 11:33:02 +0800	[thread overview]
Message-ID: <1628739182-30089-6-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1628739182-30089-1-git-send-email-chunfeng.yun@mediatek.com>

usb_endpoint_maxp() already returns actual max packet size, no need
AND 0x7ff.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 include/linux/usb/gadget.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 75c7538e350a..f181c84310b6 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -491,7 +491,7 @@ extern char *usb_get_gadget_udc_name(void);
  */
 static inline size_t usb_ep_align(struct usb_ep *ep, size_t len)
 {
-	int max_packet_size = (size_t)usb_endpoint_maxp(ep->desc) & 0x7ff;
+	int max_packet_size = (size_t)usb_endpoint_maxp(ep->desc);
 
 	return round_up(len, max_packet_size);
 }
-- 
2.25.1


  parent reply	other threads:[~2021-08-12  3:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12  3:32 [PATCH 1/6] usb: mtu3: restore HS function when set SS/SSP Chunfeng Yun
2021-08-12  3:32 ` [PATCH 2/6] usb: mtu3: fix the wrong HS mult value Chunfeng Yun
2021-08-12  6:49   ` Felipe Balbi
2021-08-12 11:51     ` Chunfeng Yun (云春峰)
2021-08-12  3:32 ` [PATCH 3/6] usb: cdnsp: fix the wrong mult value for HS isoc or intr Chunfeng Yun
2021-08-12  6:51   ` Felipe Balbi
2021-08-12 11:53     ` Chunfeng Yun (云春峰)
2021-08-17  5:05     ` Pawel Laszczak
2021-08-17  7:10       ` Chunfeng Yun (云春峰)
2021-08-12  3:33 ` [PATCH 4/6] usb: gadget: tegra-xudc: " Chunfeng Yun
2021-08-12  6:51   ` Felipe Balbi
2021-08-12 11:54     ` Chunfeng Yun (云春峰)
2021-08-12  3:33 ` [PATCH 5/6] usb: gadget: bdc: remove unnecessary AND operation when get ep maxp Chunfeng Yun
2021-08-12  6:52   ` Felipe Balbi
2021-08-12  3:33 ` Chunfeng Yun [this message]
2021-08-12  6:52   ` [PATCH 6/6] usb: gadget: " Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1628739182-30089-6-git-send-email-chunfeng.yun@mediatek.com \
    --to=chunfeng.yun@mediatek.com \
    --cc=alcooperx@gmail.com \
    --cc=balbi@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=eddie.hung@mediatek.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=pawell@cadence.com \
    --cc=rikard.falkeborn@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=yangyingliang@huawei.com \
    --subject='Re: [PATCH 6/6] usb: gadget: remove unnecessary AND operation when get ep maxp' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).