Thread (13 messages) 13 messages, 4 authors, 2015-08-10

RE: [patch] fbdev: off by one test (harmless)

From: David Ung <hidden>
Date: 2014-12-29 21:51:23
Also in: kernel-janitors

quoted
test is really a no-op.  But it's still off by one and upsets the
static checkers so we may as well correct it.
'idx' should be 0~63, because cea_modes array is defined as
'cea_modes[64]'.
According to CEA/EIA-861E, there are 64 defined modes, but idx is valid for 1-64, 0 is reserved hence the check for 

        If (!idx || idx > 63) {

Think idx check really should be !idx || idx > 64 if following CEA/EIA-861E

CEA/EIA-861F add additional entries and idx is valid from 1-107

David
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help