diff options
| author | Li RongQing <lirongqing@baidu.com> | 2026-05-14 21:02:02 -0400 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-06-09 16:00:10 +0200 |
| commit | 5dbe5b65df0b0c0ec77492427c274b7b5011890e (patch) | |
| tree | d87cf5403f648a454c7364aed1ad77d54f8c5597 /scripts/Makefile.thinlto | |
| parent | b15d708995c01bbffe7dcd634a31959f6805bed3 (diff) | |
fbdev: sm712: Fix operator precedence in big_swap macro
The big_swap(p) macro was intended to swap bytes within 16-bit halves
of a 32-bit value. However, because the bitwise shift operators (<<, >>)
have higher precedence than the bitwise AND operator (&), the original
code failed to perform any shifting on the masked bits.
For example, 'p & 0xff00ff00 >> 8' was evaluated as 'p &
(0xff00ff00 >> 8)', effectively neutralizing the intended swap.
Fix this by adding parentheses to ensure the bitwise AND is performed
before the shift, correctly implementing the byte swap logic.
Fixes: 1461d66728648 ("staging: sm7xxfb: merge sm712fb with fbdev")
Cc: stable@vger.kernel.org
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
