samples: mei: remove unused parameter

Message ID 20240119040012.2925013-1-alexs@kernel.org
State New
Headers
Series samples: mei: remove unused parameter |

Commit Message

alexs@kernel.org Jan. 19, 2024, 4 a.m. UTC
  From: Alex Shi <alexs@kernel.org>

The timeout parameter isn't used in func mei_send_msg(), better to
remove it.

Signed-off-by: Alex Shi <alexs@kernel.org>
To: linux-kernel@vger.kernel.org
To: Tomas Winkler <tomas.winkler@intel.com>
---
 samples/mei/mei-amt-version.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
  

Comments

kuiliang Shi Feb. 1, 2024, 11:58 a.m. UTC | #1
ping

On 1/19/24 12:00 PM, alexs@kernel.org wrote:
> From: Alex Shi <alexs@kernel.org>
> 
> The timeout parameter isn't used in func mei_send_msg(), better to
> remove it.
> 
> Signed-off-by: Alex Shi <alexs@kernel.org>
> To: linux-kernel@vger.kernel.org
> To: Tomas Winkler <tomas.winkler@intel.com>
> ---
>  samples/mei/mei-amt-version.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/samples/mei/mei-amt-version.c b/samples/mei/mei-amt-version.c
> index 867debd3b912..bf14d8a819b9 100644
> --- a/samples/mei/mei-amt-version.c
> +++ b/samples/mei/mei-amt-version.c
> @@ -195,8 +195,7 @@ static ssize_t mei_recv_msg(struct mei *me, unsigned char *buffer,
>  	return rc;
>  }
>  
> -static ssize_t mei_send_msg(struct mei *me, const unsigned char *buffer,
> -			ssize_t len, unsigned long timeout)
> +static ssize_t mei_send_msg(struct mei *me, const unsigned char *buffer, ssize_t len)
>  {
>  	ssize_t written;
>  	ssize_t rc;
> @@ -391,8 +390,7 @@ static uint32_t amt_host_if_call(struct amt_host_if *acmd,
>  	memset(*read_buf, 0, in_buf_sz);
>  	msg_hdr = (struct amt_host_if_resp_header *)*read_buf;
>  
> -	written = mei_send_msg(&acmd->mei_cl,
> -				command, command_sz, acmd->send_timeout);
> +	written = mei_send_msg(&acmd->mei_cl, command, command_sz);
>  	if (written != command_sz)
>  		return AMT_STATUS_INTERNAL_ERROR;
>
  

Patch

diff --git a/samples/mei/mei-amt-version.c b/samples/mei/mei-amt-version.c
index 867debd3b912..bf14d8a819b9 100644
--- a/samples/mei/mei-amt-version.c
+++ b/samples/mei/mei-amt-version.c
@@ -195,8 +195,7 @@  static ssize_t mei_recv_msg(struct mei *me, unsigned char *buffer,
 	return rc;
 }
 
-static ssize_t mei_send_msg(struct mei *me, const unsigned char *buffer,
-			ssize_t len, unsigned long timeout)
+static ssize_t mei_send_msg(struct mei *me, const unsigned char *buffer, ssize_t len)
 {
 	ssize_t written;
 	ssize_t rc;
@@ -391,8 +390,7 @@  static uint32_t amt_host_if_call(struct amt_host_if *acmd,
 	memset(*read_buf, 0, in_buf_sz);
 	msg_hdr = (struct amt_host_if_resp_header *)*read_buf;
 
-	written = mei_send_msg(&acmd->mei_cl,
-				command, command_sz, acmd->send_timeout);
+	written = mei_send_msg(&acmd->mei_cl, command, command_sz);
 	if (written != command_sz)
 		return AMT_STATUS_INTERNAL_ERROR;