Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a28187cc authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter
Browse files

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161017083514.21772-2-chris@chris-wilson.co.uk
parent f14f3686
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -1313,15 +1313,13 @@ struct edid *drm_do_get_edid(struct drm_connector *connector,
	edid = new;
	edid = new;


	for (j = 1; j <= edid[0x7e]; j++) {
	for (j = 1; j <= edid[0x7e]; j++) {
		u8 *block = edid + (valid_extensions + 1) * EDID_LENGTH;

		for (i = 0; i < 4; i++) {
		for (i = 0; i < 4; i++) {
			if (get_edid_block(data,
			if (get_edid_block(data, block, j, EDID_LENGTH))
				  edid + (valid_extensions + 1) * EDID_LENGTH,
				  j, EDID_LENGTH))
				goto out;
				goto out;
			if (drm_edid_block_valid(edid + (valid_extensions + 1)
			if (drm_edid_block_valid(block, j,
						 * EDID_LENGTH, j,
						 print_bad_edid, NULL)) {
						 print_bad_edid,
						 NULL)) {
				valid_extensions++;
				valid_extensions++;
				break;
				break;
			}
			}