From: xupanda <[email protected]>
Return the value regmap_update_bits() directly instead of
storing it in another redundant variable.
Reported-by: Zeal Robot <[email protected]>
Signed-off-by: xupanda <[email protected]>
---
chang for v3
- re-align continuation line alignment
---
drivers/usb/typec/tcpm/tcpci.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
index b2bfcebe218f..cd243530264b 100644
--- a/drivers/usb/typec/tcpm/tcpci.c
+++ b/drivers/usb/typec/tcpm/tcpci.c
@@ -328,11 +328,9 @@ static int tcpci_set_vconn(struct tcpc_dev *tcpc, bool enable)
static int tcpci_enable_auto_vbus_discharge(struct tcpc_dev *dev, bool enable)
{
struct tcpci *tcpci = tcpc_to_tcpci(dev);
- int ret;
- ret = regmap_update_bits(tcpci->regmap, TCPC_POWER_CTRL, TCPC_POWER_CTRL_AUTO_DISCHARGE,
- enable ? TCPC_POWER_CTRL_AUTO_DISCHARGE : 0);
- return ret;
+ return regmap_update_bits(tcpci->regmap, TCPC_POWER_CTRL, TCPC_POWER_CTRL_AUTO_DISCHARGE,
+ enable ? TCPC_POWER_CTRL_AUTO_DISCHARGE : 0);
}
static int tcpci_set_auto_vbus_discharge_threshold(struct tcpc_dev *dev, enum typec_pwr_opmode mode,
--
2.25.1
Hi,
On Mon, Aug 29, 2022 at 03:04:43AM +0000, [email protected] wrote:
> From: xupanda <[email protected]>
I think that's a pseudonym. Is the name "Xu Panda" (so not
"xupanda")? Please use full real names.
> Return the value regmap_update_bits() directly instead of
> storing it in another redundant variable.
>
> Reported-by: Zeal Robot <[email protected]>
> Signed-off-by: xupanda <[email protected]>
I just realised that this is version 3, and this is the third time you
are being asked to check that. You really have to use full real names
here.
Please read this section completely and fix those lines:
https://docs.kernel.org/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
thanks,
> ---
> chang for v3
> - re-align continuation line alignment
> ---
> drivers/usb/typec/tcpm/tcpci.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> index b2bfcebe218f..cd243530264b 100644
> --- a/drivers/usb/typec/tcpm/tcpci.c
> +++ b/drivers/usb/typec/tcpm/tcpci.c
> @@ -328,11 +328,9 @@ static int tcpci_set_vconn(struct tcpc_dev *tcpc, bool enable)
> static int tcpci_enable_auto_vbus_discharge(struct tcpc_dev *dev, bool enable)
> {
> struct tcpci *tcpci = tcpc_to_tcpci(dev);
> - int ret;
>
> - ret = regmap_update_bits(tcpci->regmap, TCPC_POWER_CTRL, TCPC_POWER_CTRL_AUTO_DISCHARGE,
> - enable ? TCPC_POWER_CTRL_AUTO_DISCHARGE : 0);
> - return ret;
> + return regmap_update_bits(tcpci->regmap, TCPC_POWER_CTRL, TCPC_POWER_CTRL_AUTO_DISCHARGE,
> + enable ? TCPC_POWER_CTRL_AUTO_DISCHARGE : 0);
> }
>
> static int tcpci_set_auto_vbus_discharge_threshold(struct tcpc_dev *dev, enum typec_pwr_opmode mode,
> --
> 2.25.1
--
heikki
On Mon, Aug 29, 2022 at 03:04:43AM +0000, [email protected] wrote:
> From: xupanda <[email protected]>
>
> Return the value regmap_update_bits() directly instead of
> storing it in another redundant variable.
>
> Reported-by: Zeal Robot <[email protected]>
I am now just going to drop all patches like this, given that no one
seems to be following the proper documentation for how to handle
research tools like this :(
greg k-h