Skip to contentSkip to conversation

usb: dwc3: remove unused sg struct member

PATCH Superseded Luis Felipe Hernandez 3 participants 4 messages Nov 19, 2024 – Nov 20, 2024

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 usb: dwc3: remove unused sg struct member

The sg member of the dwc3_request struct is no longer used and should be removed. This patch drops the unused member, cleaning up the struct.

Previously, this patch addressed a documentation warning caused by the missing description for the sg member. However, upon review, it was determined that the member itself is deprecated and can be removed entirely.

This change improves code clarity and avoids maintaining unnecessary members in the structure.

---
v2: remove unused sg struct member as per review[1] v3:
- Add reported-by tag as per review [2]
- Carry over reviewed-by tag from v2 [3]
- Update commit subject to reflect maintainers
- Update commit message to reflect actual change gathered from Thinh Nguyen's feedback

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/2024111922-pantyhose-panorama-6f16@gregkh/
[3] https://lore.kernel.org/all/5l65sdskdzbehxamff5ax4ptiqhaxh7ewi4umtpp6ynen45nj6@nebuxjg4c4rx/

---
 drivers/usb/dwc3/core.h | 1 -
 1 file changed, 1 deletion(-)
drivers/usb/dwc3/core.h +0 -1
index ee73789326bc..3be069c4520e 100644
@@ -956,7 +956,6 @@ struct dwc3_request {
 	struct usb_request	request;
 	struct list_head	list;
 	struct dwc3_ep		*dep;
-	struct scatterlist	*sg;
 	struct scatterlist	*start_sg;
 
 	unsigned int		num_pending_sgs;
Signature · 1 line
2.47.0
maintainer
#1 lore raw
Quoted 4 lines · Luis Felipe Hernandez

The sg member of the dwc3_request struct is no longer used and should be removed. This patch drops the unused member, cleaning up the struct.

Previously, this patch addressed a documentation warning caused by the

Remove this paragraph. This context only makes sense in this thread where the previous patch version is visible.

Quoted 9 lines

missing description for the sg member. However, upon review, it was determined that the member itself is deprecated and can be removed entirely.

This change improves code clarity and avoids maintaining unnecessary members in the structure.

I'm not the one who should be attributed to by the Reported-by tag.

I think Greg was alluding to this report by Stephen Rothwell:
https://lore.kernel.org/all/[email protected]/

It wasn't Cc to the linux-usb list, so I'm not sure if you've seen it. If your change was base on the report above, then you can update the Reported-by tag accordingly.

Quoted 32 lines

---
v2: remove unused sg struct member as per review[1] v3:
- Add reported-by tag as per review [2]
- Carry over reviewed-by tag from v2 [3]
- Update commit subject to reflect maintainers
- Update commit message to reflect actual change gathered from Thinh Nguyen's feedback

[1] https://urldefense.com/v3/__https://lore.kernel.org/all/[email protected]/__;!!A4F2R9G_pg!cbEnDmWN9_VzHUAotB8hMCEm9jnK0F1SwtvDH-Ts4uicWlPUif59FPkZWzCzRBcFH05bhdanwXhAPrydadc9ItOJWTpTSrs$
[2] https://urldefense.com/v3/__https://lore.kernel.org/all/2024111922-pantyhose-panorama-6f16@gregkh/__;!!A4F2R9G_pg!cbEnDmWN9_VzHUAotB8hMCEm9jnK0F1SwtvDH-Ts4uicWlPUif59FPkZWzCzRBcFH05bhdanwXhAPrydadc9ItOJGBu8ksU$
[3] https://urldefense.com/v3/__https://lore.kernel.org/all/5l65sdskdzbehxamff5ax4ptiqhaxh7ewi4umtpp6ynen45nj6@nebuxjg4c4rx/__;!!A4F2R9G_pg!cbEnDmWN9_VzHUAotB8hMCEm9jnK0F1SwtvDH-Ts4uicWlPUif59FPkZWzCzRBcFH05bhdanwXhAPrydadc9ItOJ5nkwD-I$

---
 drivers/usb/dwc3/core.h | 1 -
 1 file changed, 1 deletion(-)
drivers/usb/dwc3/core.h +0 -1
index ee73789326bc..3be069c4520e 100644
@@ -956,7 +956,6 @@ struct dwc3_request {
 	struct usb_request	request;
 	struct list_head	list;
 	struct dwc3_ep		*dep;
-	struct scatterlist	*sg;
 	struct scatterlist	*start_sg;
 
 	unsigned int		num_pending_sgs;
Signature · 1 line
2.47.0

The rest looks good.

Thanks,
Thinh

#2 lore raw

Thanks, Thinh and Greg, for the feedback!

Quoted 5 lines · Thinh Nguyen
Quoted 1 line

Previously, this patch addressed a documentation warning caused by the

Remove this paragraph. This context only makes sense in this thread where the previous patch version is visible.

I’ll update the commit message and remove the unnecessary paragraph as suggested.

Quoted 11 lines
Quoted 1 line

I'm not the one who should be attributed to by the Reported-by tag.

I think Greg was alluding to this report by Stephen Rothwell:
https://lore.kernel.org/all/[email protected]/

It wasn't Cc to the linux-usb list, so I'm not sure if you've seen it. If your change was base on the report above, then you can update the Reported-by tag accordingly.

Regarding the report by Stephen Rothwell, I wasn’t aware of it before. I found the warning independently while trying to compile the Documentation subsystem, looking for bugs to address.

That said, now that I’m aware of Stephen’s thread, I wouldn’t mind updating the commit message to include a reference to it if you think it would help link the two discussions. Let me know your thoughts on this.

Thanks again for the clarification and the reviews!

Best,

Felipe

#3 lore raw
Quoted 18 lines · Luis Felipe Hernandez

Thanks, Thinh and Greg, for the feedback!

Quoted 5 lines · Thinh Nguyen
Quoted 1 line

Previously, this patch addressed a documentation warning caused by the

Remove this paragraph. This context only makes sense in this thread where the previous patch version is visible.

I’ll update the commit message and remove the unnecessary paragraph as suggested.

Quoted 7 lines
Quoted 1 line

I'm not the one who should be attributed to by the Reported-by tag.

I think Greg was alluding to this report by Stephen Rothwell:
https://lore.kernel.org/all/[email protected]/

Quoted 8 lines
Quoted 4 lines

It wasn't Cc to the linux-usb list, so I'm not sure if you've seen it. If your change was base on the report above, then you can update the Reported-by tag accordingly.

Regarding the report by Stephen Rothwell, I wasn’t aware of it before. I found the warning independently while trying to compile the Documentation subsystem, looking for bugs to address.

That said, now that I’m aware of Stephen’s thread, I wouldn’t mind updating the commit message to include a reference to it if you think it would help link the two discussions. Let me know your thoughts on this.

Sure, it can not hurt, as it was reported by them, and fixed by you, everyone gets credit!

thanks,

greg k-h