diff mbox series

[20/36] usb: gadget: f_tcm: Limit number of sessions

Message ID d344403eb32d950eafacf616ccc19ce742a6b3b6.1657149962.git.Thinh.Nguyen@synopsys.com
State Superseded
Headers show
Series usb: gadget: f_tcm: Enhance UASP driver | expand

Commit Message

Thinh Nguyen July 6, 2022, 11:36 p.m. UTC
Only allocate up to USBG_NUM_CMDS number of sessions.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
---
 drivers/usb/gadget/function/tcm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg Kroah-Hartman July 7, 2022, 6:57 a.m. UTC | #1
On Wed, Jul 06, 2022 at 04:36:28PM -0700, Thinh Nguyen wrote:
> Only allocate up to USBG_NUM_CMDS number of sessions.

Why?  This says what you do, but not why you are doing it.  You describe
the "why" quite well in earlier patches in this series, so please follow
that style here too :)

thanks,

greg k-h
Thinh Nguyen July 7, 2022, 10:31 a.m. UTC | #2
On 7/6/2022, Greg Kroah-Hartman wrote:
> On Wed, Jul 06, 2022 at 04:36:28PM -0700, Thinh Nguyen wrote:
>> Only allocate up to USBG_NUM_CMDS number of sessions.
> Why?  This says what you do, but not why you are doing it.  You describe
> the "why" quite well in earlier patches in this series, so please follow
> that style here too :)

Oops... will update.

Thanks,
Thinh
diff mbox series

Patch

diff --git a/drivers/usb/gadget/function/tcm.h b/drivers/usb/gadget/function/tcm.h
index bcbe35bb5015..df768559fb60 100644
--- a/drivers/usb/gadget/function/tcm.h
+++ b/drivers/usb/gadget/function/tcm.h
@@ -26,7 +26,7 @@  enum {
 #define USB_G_ALT_INT_BBB       0
 #define USB_G_ALT_INT_UAS       1
 
-#define USB_G_DEFAULT_SESSION_TAGS	128
+#define USB_G_DEFAULT_SESSION_TAGS	USBG_NUM_CMDS
 
 struct tcm_usbg_nexus {
 	struct se_session *tvn_se_sess;