[2/5] drm/i915/dp: avoid shadowing variables
diff mbox series

Message ID 20190820134019.13229-2-jani.nikula@intel.com
State New
Headers show
Series
  • [1/5] drm/i915/dp: stylistic cleanup around hdcp2_msg_data
Related show

Commit Message

Jani Nikula Aug. 20, 2019, 1:40 p.m. UTC
Everything seems to be all right, but shadowing is to be avoided.

Cc: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Ramalingam C Aug. 20, 2019, 2:08 p.m. UTC | #1
On 2019-08-20 at 16:40:16 +0300, Jani Nikula wrote:
> Everything seems to be all right, but shadowing is to be avoided.
> 
> Cc: Ramalingam C <ramalingam.c@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>

-Ram
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 001d520660a9..0d8a8c47296b 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5820,7 +5820,7 @@ struct hdcp2_dp_msg_data {
>  	u32 timeout2; /* Added for non_paired situation */
>  };
>  
> -static struct hdcp2_dp_msg_data hdcp2_msg_data[] = {
> +static struct hdcp2_dp_msg_data hdcp2_dp_msg_data[] = {
>  	{ HDCP_2_2_AKE_INIT, DP_HDCP_2_2_AKE_INIT_OFFSET, false, 0, 0 },
>  	{ HDCP_2_2_AKE_SEND_CERT, DP_HDCP_2_2_AKE_SEND_CERT_OFFSET,
>  	  false, HDCP_2_2_CERT_TIMEOUT_MS, 0 },
> @@ -5951,9 +5951,9 @@ static struct hdcp2_dp_msg_data *get_hdcp2_dp_msg_data(u8 msg_id)
>  {
>  	int i;
>  
> -	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_data); i++)
> -		if (hdcp2_msg_data[i].msg_id == msg_id)
> -			return &hdcp2_msg_data[i];
> +	for (i = 0; i < ARRAY_SIZE(hdcp2_dp_msg_data); i++)
> +		if (hdcp2_dp_msg_data[i].msg_id == msg_id)
> +			return &hdcp2_dp_msg_data[i];
>  
>  	return NULL;
>  }
> -- 
> 2.20.1
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 001d520660a9..0d8a8c47296b 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5820,7 +5820,7 @@  struct hdcp2_dp_msg_data {
 	u32 timeout2; /* Added for non_paired situation */
 };
 
-static struct hdcp2_dp_msg_data hdcp2_msg_data[] = {
+static struct hdcp2_dp_msg_data hdcp2_dp_msg_data[] = {
 	{ HDCP_2_2_AKE_INIT, DP_HDCP_2_2_AKE_INIT_OFFSET, false, 0, 0 },
 	{ HDCP_2_2_AKE_SEND_CERT, DP_HDCP_2_2_AKE_SEND_CERT_OFFSET,
 	  false, HDCP_2_2_CERT_TIMEOUT_MS, 0 },
@@ -5951,9 +5951,9 @@  static struct hdcp2_dp_msg_data *get_hdcp2_dp_msg_data(u8 msg_id)
 {
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_data); i++)
-		if (hdcp2_msg_data[i].msg_id == msg_id)
-			return &hdcp2_msg_data[i];
+	for (i = 0; i < ARRAY_SIZE(hdcp2_dp_msg_data); i++)
+		if (hdcp2_dp_msg_data[i].msg_id == msg_id)
+			return &hdcp2_dp_msg_data[i];
 
 	return NULL;
 }