Skip to content

Commit

Permalink
ASoC: rt1320: fix the range of patch code address
Browse files Browse the repository at this point in the history
>> sound/soc/codecs/rt1320-sdw.c:564:14:
warning: result of comparison of constant 4295491583 with expression of type 'unsigned int' is always false
[-Wtautological-constant-out-of-range-compare]
     564 |                                 if (addr > 0x10007ffff || addr < 0x10007000) {
         |                                     ~~~~ ^ ~~~~~~~~~~~
   1 warning generated.

Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Shuming Fan <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
shumingfan authored and bardliao committed Oct 3, 2024
1 parent ba7e92a commit e9bb41a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/rt1320-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ static void rt1320_load_mcu_patch(struct rt1320_sdw_priv *rt1320)
val = (ptr[i + 4] & 0xff) | (ptr[i + 5] & 0xff) << 8 |
(ptr[i + 6] & 0xff) << 16 | (ptr[i + 7] & 0xff) << 24;

if (addr > 0x10007ffff || addr < 0x10007000) {
if (addr > 0x10007fff || addr < 0x10007000) {
dev_err(&slave->dev, "%s: the address 0x%x is wrong", __func__, addr);
goto _exit_;
}
Expand Down

0 comments on commit e9bb41a

Please sign in to comment.