mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
USB: xhci: Remove buggy assignment in next_trb()
The code to increment the TRB pointer has a slight ambiguity that could lead to a bug on different compilers. The ANSI C specification does not specify the precedence of the assignment operator over the postfix operator. gcc 4.4 produced the correct code (increment the pointer and assign the value), but a MIPS compiler that one of John's clients used assigned the old (unincremented) value. Remove the unnecessary assignment to make all compilers produce the correct assembly. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
666cc076d2
commit
a1669b2c64
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ static void next_trb(struct xhci_hcd *xhci,
|
||||||
*seg = (*seg)->next;
|
*seg = (*seg)->next;
|
||||||
*trb = ((*seg)->trbs);
|
*trb = ((*seg)->trbs);
|
||||||
} else {
|
} else {
|
||||||
*trb = (*trb)++;
|
(*trb)++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue