linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: cros-ec-typec: Cleanup use of check_features
@ 2021-09-23 20:03 Prashant Malani
  2021-09-24  0:25 ` Guenter Roeck
  2021-09-30  6:45 ` Enric Balletbo i Serra
  0 siblings, 2 replies; 3+ messages in thread
From: Prashant Malani @ 2021-09-23 20:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Prashant Malani, Benson Leung, Enric Balletbo i Serra, Guenter Roeck

cros_ec_check_features() now returns a boolean. Remove the double NOT
operator since it's not required anymore.

No functional changes are expected with this patch.

Signed-off-by: Prashant Malani <pmalani@chromium.org>
---
 drivers/platform/chrome/cros_ec_typec.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
index 262a891eded3..7b3afb6cda5d 100644
--- a/drivers/platform/chrome/cros_ec_typec.c
+++ b/drivers/platform/chrome/cros_ec_typec.c
@@ -1116,9 +1116,8 @@ static int cros_typec_probe(struct platform_device *pdev)
 	}
 
 	ec_dev = dev_get_drvdata(&typec->ec->ec->dev);
-	typec->typec_cmd_supported = !!cros_ec_check_features(ec_dev, EC_FEATURE_TYPEC_CMD);
-	typec->needs_mux_ack = !!cros_ec_check_features(ec_dev,
-							EC_FEATURE_TYPEC_MUX_REQUIRE_AP_ACK);
+	typec->typec_cmd_supported = cros_ec_check_features(ec_dev, EC_FEATURE_TYPEC_CMD);
+	typec->needs_mux_ack = cros_ec_check_features(ec_dev, EC_FEATURE_TYPEC_MUX_REQUIRE_AP_ACK);
 
 	ret = cros_typec_ec_command(typec, 0, EC_CMD_USB_PD_PORTS, NULL, 0,
 				    &resp, sizeof(resp));
-- 
2.33.0.685.g46640cef36-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/chrome: cros-ec-typec: Cleanup use of check_features
  2021-09-23 20:03 [PATCH] platform/chrome: cros-ec-typec: Cleanup use of check_features Prashant Malani
@ 2021-09-24  0:25 ` Guenter Roeck
  2021-09-30  6:45 ` Enric Balletbo i Serra
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2021-09-24  0:25 UTC (permalink / raw)
  To: Prashant Malani
  Cc: linux-kernel, Benson Leung, Enric Balletbo i Serra, Guenter Roeck

On Thu, Sep 23, 2021 at 1:03 PM Prashant Malani <pmalani@chromium.org> wrote:
>
> cros_ec_check_features() now returns a boolean. Remove the double NOT
> operator since it's not required anymore.
>
> No functional changes are expected with this patch.
>
> Signed-off-by: Prashant Malani <pmalani@chromium.org>

Reviewed-by: Guenter Roeck <groeck@chromium.org>

> ---
>  drivers/platform/chrome/cros_ec_typec.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
> index 262a891eded3..7b3afb6cda5d 100644
> --- a/drivers/platform/chrome/cros_ec_typec.c
> +++ b/drivers/platform/chrome/cros_ec_typec.c
> @@ -1116,9 +1116,8 @@ static int cros_typec_probe(struct platform_device *pdev)
>         }
>
>         ec_dev = dev_get_drvdata(&typec->ec->ec->dev);
> -       typec->typec_cmd_supported = !!cros_ec_check_features(ec_dev, EC_FEATURE_TYPEC_CMD);
> -       typec->needs_mux_ack = !!cros_ec_check_features(ec_dev,
> -                                                       EC_FEATURE_TYPEC_MUX_REQUIRE_AP_ACK);
> +       typec->typec_cmd_supported = cros_ec_check_features(ec_dev, EC_FEATURE_TYPEC_CMD);
> +       typec->needs_mux_ack = cros_ec_check_features(ec_dev, EC_FEATURE_TYPEC_MUX_REQUIRE_AP_ACK);
>
>         ret = cros_typec_ec_command(typec, 0, EC_CMD_USB_PD_PORTS, NULL, 0,
>                                     &resp, sizeof(resp));
> --
> 2.33.0.685.g46640cef36-goog
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/chrome: cros-ec-typec: Cleanup use of check_features
  2021-09-23 20:03 [PATCH] platform/chrome: cros-ec-typec: Cleanup use of check_features Prashant Malani
  2021-09-24  0:25 ` Guenter Roeck
@ 2021-09-30  6:45 ` Enric Balletbo i Serra
  1 sibling, 0 replies; 3+ messages in thread
From: Enric Balletbo i Serra @ 2021-09-30  6:45 UTC (permalink / raw)
  To: Prashant Malani, linux-kernel; +Cc: Benson Leung, Guenter Roeck

On Thu, 23 Sep 2021 13:03:21 -0700, Prashant Malani wrote:
> cros_ec_check_features() now returns a boolean. Remove the double NOT
> operator since it's not required anymore.
> 
> No functional changes are expected with this patch.

Applied, thanks!

[1/1] platform/chrome: cros-ec-typec: Cleanup use of check_features
      commit: 73eff8602ad10cb55cdb614241b18f3d842abbe1

Best regards,
-- 
Enric Balletbo i Serra <enric.balletbo@collabora.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-30  6:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 20:03 [PATCH] platform/chrome: cros-ec-typec: Cleanup use of check_features Prashant Malani
2021-09-24  0:25 ` Guenter Roeck
2021-09-30  6:45 ` Enric Balletbo i Serra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).