lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d4545a76-934d-0bc3-91a2-eb3385d03ef8@collabora.com>
Date:   Mon, 3 Feb 2020 16:35:56 +0100
From:   Enric Balletbo i Serra <enric.balletbo@...labora.com>
To:     Prashant Malani <pmalani@...omium.org>,
        linux-kernel@...r.kernel.org
Cc:     Benson Leung <bleung@...omium.org>,
        Guenter Roeck <groeck@...omium.org>,
        Lee Jones <lee.jones@...aro.org>,
        Gwendal Grignou <gwendal@...omium.org>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Evan Green <evgreen@...omium.org>
Subject: Re: [PATCH 17/17] platform/chrome: Drop cros_ec_cmd_xfer_status()



On 30/1/20 21:31, Prashant Malani wrote:
> Remove cros_ec_cmd_xfer_status() since all usages of that function
> have been converted to cros_ec_send_cmd_msg().
> 
> Signed-off-by: Prashant Malani <pmalani@...omium.org>
> ---
>  drivers/platform/chrome/cros_ec_proto.c     | 42 +++++----------------
>  include/linux/platform_data/cros_ec_proto.h |  3 --
>  2 files changed, 9 insertions(+), 36 deletions(-)
> 
> diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c
> index efd1c0b6a830c8..8b97702ba97393 100644
> --- a/drivers/platform/chrome/cros_ec_proto.c
> +++ b/drivers/platform/chrome/cros_ec_proto.c
> @@ -542,35 +542,6 @@ int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev,
>  }
>  EXPORT_SYMBOL(cros_ec_cmd_xfer);
>  
> -/**
> - * cros_ec_cmd_xfer_status() - Send a command to the ChromeOS EC.
> - * @ec_dev: EC device.
> - * @msg: Message to write.
> - *
> - * This function is identical to cros_ec_cmd_xfer, except it returns success
> - * status only if both the command was transmitted successfully and the EC
> - * replied with success status. It's not necessary to check msg->result when
> - * using this function.
> - *
> - * Return: The number of bytes transferred on success or negative error code.
> - */
> -int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev,
> -			    struct cros_ec_command *msg)
> -{
> -	int ret;
> -
> -	ret = cros_ec_cmd_xfer(ec_dev, msg);
> -	if (ret < 0) {
> -		dev_err(ec_dev->dev, "Command xfer error (err:%d)\n", ret);
> -	} else if (msg->result != EC_RES_SUCCESS) {
> -		dev_dbg(ec_dev->dev, "Command result (err: %d)\n", msg->result);
> -		return -EPROTO;
> -	}
> -
> -	return ret;
> -}
> -EXPORT_SYMBOL(cros_ec_cmd_xfer_status);
> -
>  /**
>   * cros_ec_send_cmd_msg() - Utility function to send commands to ChromeOS EC.
>   * @ec: EC device struct.
> @@ -581,10 +552,15 @@ EXPORT_SYMBOL(cros_ec_cmd_xfer_status);
>   * @indata: Data to be received from the EC.
>   * @insize: Size of the &indata buffer.
>   *
> - * This function is a wrapper around &cros_ec_cmd_xfer_status, and performs
> - * some of the common work involved with sending a command to the EC. This
> - * includes allocating and filling up a &struct cros_ec_command message buffer,
> - * and copying the received data to another buffer.
> + * This function is similar to cros_ec_cmd_xfer(), except it returns success
> + * status only if both the command was transmitted successfully and the EC
> + * replied with success status. It's not necessary to check msg->result when
> + * using this function.
> + *
> + * It also performs some of the common work involved with sending a command to
> + * the EC. This includes allocating and filling up a
> + * &struct cros_ec_command message buffer, and copying the received data to
> + * another buffer.

As I said, explain at the first chance for what is this helper, so you don't
need to tweak the description here.

>   *
>   * Return: The number of bytes transferred on success or negative error code.
>   */
> diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/platform_data/cros_ec_proto.h
> index 166ce26bdd79eb..851bd9af582d94 100644
> --- a/include/linux/platform_data/cros_ec_proto.h
> +++ b/include/linux/platform_data/cros_ec_proto.h
> @@ -198,9 +198,6 @@ int cros_ec_check_result(struct cros_ec_device *ec_dev,
>  int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev,
>  		     struct cros_ec_command *msg);
>  
> -int cros_ec_cmd_xfer_status(struct cros_ec_device *ec_dev,
> -			    struct cros_ec_command *msg);
> -
>  int cros_ec_send_cmd_msg(struct cros_ec_device *ec_dev, unsigned int version,
>  			 unsigned int command, void *outdata,
>  			 unsigned int outsize, void *indata,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ