Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: usb: sr9700: fix byte numbering in comments

The comments describing the RX/TX headers and status response use
a combination of 0- and 1-based indexing, leading to confusion. Correct
the numbering and make it consistent. Also fix a typo "pm" for "pn".

This issue also existed in dm9601 and was fixed in commit 61189c78bda8
("dm9601: trivial comment fixes").

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Acked-by: Peter Korsgaard <peter@korsgaard.com>
Link: https://patch.msgid.link/20260113075327.85435-1-enelsonmoore@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Ethan Nelson-Moore and committed by
Jakub Kicinski
acbe4a14 2c297957

+21 -21
+21 -21
drivers/net/usb/sr9700.c
··· 391 391 int len; 392 392 393 393 /* skb content (packets) format : 394 - * p0 p1 p2 ...... pm 394 + * p1 p2 p3 ...... pn 395 395 * / \ 396 396 * / \ 397 397 * / \ 398 398 * / \ 399 - * p0b0 p0b1 p0b2 p0b3 ...... p0b(n-4) p0b(n-3)...p0bn 399 + * p1b1 p1b2 p1b3 p1b4 ...... p1b(n-4) p1b(n-3)...p1bn 400 400 * 401 - * p0 : packet 0 402 - * p0b0 : packet 0 byte 0 401 + * p1 : packet 1 402 + * p1b1 : packet 1 byte 1 403 403 * 404 - * b0: rx status 405 - * b1: packet length (incl crc) low 406 - * b2: packet length (incl crc) high 407 - * b3..n-4: packet data 404 + * b1: rx status 405 + * b2: packet length (incl crc) low 406 + * b3: packet length (incl crc) high 407 + * b4..n-4: packet data 408 408 * bn-3..bn: ethernet packet crc 409 409 */ 410 410 if (unlikely(skb->len < SR_RX_OVERHEAD)) { ··· 452 452 453 453 /* SR9700 can only send out one ethernet packet at once. 454 454 * 455 - * b0 b1 b2 b3 ...... b(n-4) b(n-3)...bn 455 + * b1 b2 b3 b4 ...... b(n-4) b(n-3)...bn 456 456 * 457 - * b0: rx status 458 - * b1: packet length (incl crc) low 459 - * b2: packet length (incl crc) high 460 - * b3..n-4: packet data 457 + * b1: rx status 458 + * b2: packet length (incl crc) low 459 + * b3: packet length (incl crc) high 460 + * b4..n-4: packet data 461 461 * bn-3..bn: ethernet packet crc 462 462 */ 463 463 ··· 488 488 u8 *buf; 489 489 490 490 /* format: 491 - b0: net status 492 - b1: tx status 1 493 - b2: tx status 2 494 - b3: rx status 495 - b4: rx overflow 496 - b5: rx count 497 - b6: tx count 498 - b7: gpr 491 + b1: net status 492 + b2: tx status 1 493 + b3: tx status 2 494 + b4: rx status 495 + b5: rx overflow 496 + b6: rx count 497 + b7: tx count 498 + b8: gpr 499 499 */ 500 500 501 501 if (urb->actual_length < 8)