mei: pxp: Keep a const qualifier when calling mei_cldev_send()

Message ID 23c078181575e65ff660f993bc6eb38753b3d5e7.1689971167.git.christophe.jaillet@wanadoo.fr
State New
Headers
Series mei: pxp: Keep a const qualifier when calling mei_cldev_send() |

Commit Message

Christophe JAILLET July 21, 2023, 8:26 p.m. UTC
  The API has been fixed in commit 0912ef4855e8 ("mei: constify passed
buffers and structures"), so there is no more need to drop the const
qualifier and the comment can be removed as-well.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/misc/mei/pxp/mei_pxp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Tomas Winkler July 22, 2023, 11:36 a.m. UTC | #1
> The API has been fixed in commit 0912ef4855e8 ("mei: constify passed
> buffers and structures"), so there is no more need to drop the const qualifier
> and the comment can be removed as-well.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by Tomas Winkler <tomas.winkler@intel.com>

> ---
>  drivers/misc/mei/pxp/mei_pxp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/misc/mei/pxp/mei_pxp.c
> b/drivers/misc/mei/pxp/mei_pxp.c index 3bf560bbdee0..2dcb9169e404
> 100644
> --- a/drivers/misc/mei/pxp/mei_pxp.c
> +++ b/drivers/misc/mei/pxp/mei_pxp.c
> @@ -40,8 +40,7 @@ mei_pxp_send_message(struct device *dev, const void
> *message, size_t size)
> 
>  	cldev = to_mei_cl_device(dev);
> 
> -	/* temporary drop const qualifier till the API is fixed */
> -	byte = mei_cldev_send(cldev, (u8 *)message, size);
> +	byte = mei_cldev_send(cldev, message, size);
>  	if (byte < 0) {
>  		dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte);
>  		return byte;
> --
> 2.34.1
  

Patch

diff --git a/drivers/misc/mei/pxp/mei_pxp.c b/drivers/misc/mei/pxp/mei_pxp.c
index 3bf560bbdee0..2dcb9169e404 100644
--- a/drivers/misc/mei/pxp/mei_pxp.c
+++ b/drivers/misc/mei/pxp/mei_pxp.c
@@ -40,8 +40,7 @@  mei_pxp_send_message(struct device *dev, const void *message, size_t size)
 
 	cldev = to_mei_cl_device(dev);
 
-	/* temporary drop const qualifier till the API is fixed */
-	byte = mei_cldev_send(cldev, (u8 *)message, size);
+	byte = mei_cldev_send(cldev, message, size);
 	if (byte < 0) {
 		dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte);
 		return byte;