[Intel-gfx] [PATCH v2 08/12] drm/edid: use a better variable name for EDID block read retries
Jani Nikula
jani.nikula at intel.com
Thu Mar 31 18:45:05 UTC 2022
Just i is a bit terse, clarify what it's about.
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/drm_edid.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 9e747145938b..a967e6e65ab5 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1973,25 +1973,25 @@ static struct edid *drm_do_get_edid_base_block(struct drm_connector *connector,
int *null_edid_counter = connector ? &connector->null_edid_counter : NULL;
bool *edid_corrupt = connector ? &connector->edid_corrupt : NULL;
void *edid;
- int i;
+ int try;
edid = kmalloc(EDID_LENGTH, GFP_KERNEL);
if (edid == NULL)
return NULL;
/* base block fetch */
- for (i = 0; i < 4; i++) {
+ for (try = 0; try < 4; try++) {
if (get_edid_block(data, edid, 0, EDID_LENGTH))
goto out;
if (drm_edid_block_valid(edid, 0, false, edid_corrupt))
break;
- if (i == 0 && edid_is_zero(edid, EDID_LENGTH)) {
+ if (try == 0 && edid_is_zero(edid, EDID_LENGTH)) {
if (null_edid_counter)
(*null_edid_counter)++;
goto carp;
}
}
- if (i == 4)
+ if (try == 4)
goto carp;
return edid;
@@ -2029,7 +2029,7 @@ struct edid *drm_do_get_edid(struct drm_connector *connector,
size_t len),
void *data)
{
- int i, j = 0, valid_extensions = 0;
+ int j, valid_extensions = 0;
struct edid *edid, *new, *override;
override = drm_get_override_edid(connector);
@@ -2052,20 +2052,22 @@ struct edid *drm_do_get_edid(struct drm_connector *connector,
for (j = 1; j <= edid->extensions; j++) {
void *block = edid + j;
+ int try;
- for (i = 0; i < 4; i++) {
+ for (try = 0; try < 4; try++) {
if (get_edid_block(data, block, j, EDID_LENGTH))
goto out;
if (drm_edid_block_valid(block, j, false, NULL))
break;
}
- if (i == 4)
+ if (try == 4)
valid_extensions--;
}
if (valid_extensions != edid->extensions) {
struct edid *dest_block;
+ int i;
connector_bad_edid(connector, (u8 *)edid, edid->extensions + 1);
--
2.30.2
More information about the Intel-gfx
mailing list