Skip to content

Commit a28187c

Browse files
ickledanvet
authored andcommitted
drm/edid: Use block local to refer to the block
Now that we have the name "block" free once more, we can use it to point to the start of a block within the edid. Signed-off-by: Chris Wilson <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f14f368 commit a28187c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

drivers/gpu/drm/drm_edid.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,15 +1313,13 @@ struct edid *drm_do_get_edid(struct drm_connector *connector,
13131313
edid = new;
13141314

13151315
for (j = 1; j <= edid[0x7e]; j++) {
1316+
u8 *block = edid + (valid_extensions + 1) * EDID_LENGTH;
1317+
13161318
for (i = 0; i < 4; i++) {
1317-
if (get_edid_block(data,
1318-
edid + (valid_extensions + 1) * EDID_LENGTH,
1319-
j, EDID_LENGTH))
1319+
if (get_edid_block(data, block, j, EDID_LENGTH))
13201320
goto out;
1321-
if (drm_edid_block_valid(edid + (valid_extensions + 1)
1322-
* EDID_LENGTH, j,
1323-
print_bad_edid,
1324-
NULL)) {
1321+
if (drm_edid_block_valid(block, j,
1322+
print_bad_edid, NULL)) {
13251323
valid_extensions++;
13261324
break;
13271325
}

0 commit comments

Comments
 (0)