projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c61eef7
)
drm: use memchr_inv()
author
Akinobu Mita
<
[email protected]
>
Fri, 9 Nov 2012 12:10:42 +0000
(12:10 +0000)
committer
Dave Airlie
<
[email protected]
>
Tue, 20 Nov 2012 06:06:17 +0000
(16:06 +1000)
Use memchr_inv() to check the specified memory region is filled with zero.
Signed-off-by: Akinobu Mita <
[email protected]
>
Cc: David Airlie <
[email protected]
>
Cc:
[email protected]
Signed-off-by: Dave Airlie <
[email protected]
>
drivers/gpu/drm/drm_edid.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_edid.c
b/drivers/gpu/drm/drm_edid.c
index 856dcd91b3d4ba0ed040cdaa25f24d5cd45e5d66..164820003546d02f627692190de57fa18c7adcdd 100644
(file)
--- a/
drivers/gpu/drm/drm_edid.c
+++ b/
drivers/gpu/drm/drm_edid.c
@@
-307,12
+307,9
@@
drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,
static bool drm_edid_is_zero(u8 *in_edid, int length)
{
- i
nt i;
-
u32 *raw_edid = (u32 *)in_edid
;
+ i
f (memchr_inv(in_edid, 0, length))
+
return false
;
- for (i = 0; i < length / 4; i++)
- if (*(raw_edid + i) != 0)
- return false;
return true;
}