[2/5] drm/i915: s/hdcp2_hdmi_msg_data/hdcp2_hdmi_msg_timeout/
diff mbox series

Message ID 20191010145127.7487-2-ville.syrjala@linux.intel.com
State New
Headers show
Series
  • [1/5] drm/i915: Shrink eDRAM ways/sets arrays
Related show

Commit Message

Ville Syrjälä Oct. 10, 2019, 2:51 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The array is there only for timeout, "data" doesn't mean anything
so let's rename the thing to be more descriptive.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Ramalingam C Oct. 17, 2019, 6:55 a.m. UTC | #1
On 2019-10-10 at 17:51:24 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The array is there only for timeout, "data" doesn't mean anything
> so let's rename the thing to be more descriptive.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Looks good to me.

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 0a6846c5ba95..13c588ae88a4 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -1527,13 +1527,13 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
>  	return true;
>  }
>  
> -struct hdcp2_hdmi_msg_data {
> +struct hdcp2_hdmi_msg_timeout {
>  	u8 msg_id;
>  	u32 timeout;
>  	u32 timeout2;
>  };
>  
> -static const struct hdcp2_hdmi_msg_data hdcp2_msg_data[] = {
> +static const struct hdcp2_hdmi_msg_timeout hdcp2_msg_timeout[] = {
>  	{ HDCP_2_2_AKE_INIT, 0, 0 },
>  	{ HDCP_2_2_AKE_SEND_CERT, HDCP_2_2_CERT_TIMEOUT_MS, 0 },
>  	{ HDCP_2_2_AKE_NO_STORED_KM, 0, 0 },
> @@ -1564,12 +1564,12 @@ static int get_hdcp2_msg_timeout(u8 msg_id, bool is_paired)
>  {
>  	int i;
>  
> -	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_data); i++)
> -		if (hdcp2_msg_data[i].msg_id == msg_id &&
> +	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_timeout); i++)
> +		if (hdcp2_msg_timeout[i].msg_id == msg_id &&
>  		    (msg_id != HDCP_2_2_AKE_SEND_HPRIME || is_paired))
> -			return hdcp2_msg_data[i].timeout;
> -		else if (hdcp2_msg_data[i].msg_id == msg_id)
> -			return hdcp2_msg_data[i].timeout2;
> +			return hdcp2_msg_timeout[i].timeout;
> +		else if (hdcp2_msg_timeout[i].msg_id == msg_id)
> +			return hdcp2_msg_timeout[i].timeout2;
>  
>  	return -EINVAL;
>  }
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 0a6846c5ba95..13c588ae88a4 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1527,13 +1527,13 @@  bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
 	return true;
 }
 
-struct hdcp2_hdmi_msg_data {
+struct hdcp2_hdmi_msg_timeout {
 	u8 msg_id;
 	u32 timeout;
 	u32 timeout2;
 };
 
-static const struct hdcp2_hdmi_msg_data hdcp2_msg_data[] = {
+static const struct hdcp2_hdmi_msg_timeout hdcp2_msg_timeout[] = {
 	{ HDCP_2_2_AKE_INIT, 0, 0 },
 	{ HDCP_2_2_AKE_SEND_CERT, HDCP_2_2_CERT_TIMEOUT_MS, 0 },
 	{ HDCP_2_2_AKE_NO_STORED_KM, 0, 0 },
@@ -1564,12 +1564,12 @@  static int get_hdcp2_msg_timeout(u8 msg_id, bool is_paired)
 {
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_data); i++)
-		if (hdcp2_msg_data[i].msg_id == msg_id &&
+	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_timeout); i++)
+		if (hdcp2_msg_timeout[i].msg_id == msg_id &&
 		    (msg_id != HDCP_2_2_AKE_SEND_HPRIME || is_paired))
-			return hdcp2_msg_data[i].timeout;
-		else if (hdcp2_msg_data[i].msg_id == msg_id)
-			return hdcp2_msg_data[i].timeout2;
+			return hdcp2_msg_timeout[i].timeout;
+		else if (hdcp2_msg_timeout[i].msg_id == msg_id)
+			return hdcp2_msg_timeout[i].timeout2;
 
 	return -EINVAL;
 }