This is a note to let you know that I've just added the patch titled usb: gadget: configfs: use to_config_usb_cfg() in os_desc_link() to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-gadget-configfs-use-to_config_usb_cfg-in-os_desc.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 4d48453cd6bd6fb8de9aef383dabc4ce4956919b Author: Linyu Yuan <quic_linyyuan@xxxxxxxxxxx> Date: Thu Nov 18 12:53:32 2021 +0800 usb: gadget: configfs: use to_config_usb_cfg() in os_desc_link() [ Upstream commit 5d143ec451429891385a21617b292f2ceaa684ea ] replace open-coded container_of() with to_config_usb_cfg() helper. Reviewed-by: Jack Pham <quic_jackp@xxxxxxxxxxx> Signed-off-by: Linyu Yuan <quic_linyyuan@xxxxxxxxxxx> Link: https://lore.kernel.org/r/1637211213-16400-4-git-send-email-quic_linyyuan@xxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Stable-dep-of: 89e7252d6c7e ("usb: gadget: configfs: Restrict symlink creation is UDC already binded") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 5ade844db4046..7d3b93dc154fe 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -890,9 +890,7 @@ static int os_desc_link(struct config_item *os_desc_ci, struct gadget_info *gi = container_of(to_config_group(os_desc_ci), struct gadget_info, os_desc_group); struct usb_composite_dev *cdev = &gi->cdev; - struct config_usb_cfg *c_target = - container_of(to_config_group(usb_cfg_ci), - struct config_usb_cfg, group); + struct config_usb_cfg *c_target = to_config_usb_cfg(usb_cfg_ci); struct usb_configuration *c; int ret;