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

ptp: idt82p33: remove unnecessary comparison

The type of loaddr is u8 which is always '<=' 0xff, so the
loaddr <= 0xff is always true, we can remove this comparison.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Yang Yingliang and committed by
David S. Miller
6033cebd 5d7163a1

+1 -1
+1 -1
drivers/ptp/ptp_idt82p33.c
··· 881 881 882 882 /* Page size 128, last 4 bytes of page skipped */ 883 883 if (((loaddr > 0x7b) && (loaddr <= 0x7f)) 884 - || ((loaddr > 0xfb) && (loaddr <= 0xff))) 884 + || loaddr > 0xfb) 885 885 continue; 886 886 887 887 err = idt82p33_write(idt82p33, _ADDR(page, loaddr),