diff mbox series

[linux-next] rpmsg: char: Remove the unneeded result variable

Message ID 20220826071954.252485-1-ye.xingchen@zte.com.cn (mailing list archive)
State Accepted
Headers show
Series [linux-next] rpmsg: char: Remove the unneeded result variable | expand

Commit Message

CGEL Aug. 26, 2022, 7:19 a.m. UTC
From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value rpmsg_chrdev_eptdev_add() directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/rpmsg/rpmsg_char.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Mukesh Ojha Aug. 26, 2022, 7:40 a.m. UTC | #1
On 8/26/2022 12:49 PM, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value rpmsg_chrdev_eptdev_add() directly instead of storing it
> in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
>   drivers/rpmsg/rpmsg_char.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c
> index 4f2189111494..0850ae34fb88 100644
> --- a/drivers/rpmsg/rpmsg_char.c
> +++ b/drivers/rpmsg/rpmsg_char.c
> @@ -424,15 +424,12 @@ int rpmsg_chrdev_eptdev_create(struct rpmsg_device *rpdev, struct device *parent
>   			       struct rpmsg_channel_info chinfo)
>   {
>   	struct rpmsg_eptdev *eptdev;
> -	int ret;
>   
>   	eptdev = rpmsg_chrdev_eptdev_alloc(rpdev, parent);
>   	if (IS_ERR(eptdev))
>   		return PTR_ERR(eptdev);
>   
> -	ret = rpmsg_chrdev_eptdev_add(eptdev, chinfo);
> -
> -	return ret;
> +	return rpmsg_chrdev_eptdev_add(eptdev, chinfo);
>   }

LGTM.

Reviewed-by:Mukesh Ojha <quic_mojha@quicinc.com>

-Mukesh



>   EXPORT_SYMBOL(rpmsg_chrdev_eptdev_create);
>
Mathieu Poirier Aug. 31, 2022, 4:46 p.m. UTC | #2
Hi,

I am fine with the patch but I need to understand who is "cgel.zte" - are we
talking about a person or an automated bot.  In case of the former than an SoB
from that person needs to be on this patch.  If an automated bot, than that
needs to be changed to someone accountable for the code that can put an SoB on
the patch.

Thanks,
Mathieu

On Fri, Aug 26, 2022 at 07:19:54AM +0000, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value rpmsg_chrdev_eptdev_add() directly instead of storing it
> in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
>  drivers/rpmsg/rpmsg_char.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c
> index 4f2189111494..0850ae34fb88 100644
> --- a/drivers/rpmsg/rpmsg_char.c
> +++ b/drivers/rpmsg/rpmsg_char.c
> @@ -424,15 +424,12 @@ int rpmsg_chrdev_eptdev_create(struct rpmsg_device *rpdev, struct device *parent
>  			       struct rpmsg_channel_info chinfo)
>  {
>  	struct rpmsg_eptdev *eptdev;
> -	int ret;
>  
>  	eptdev = rpmsg_chrdev_eptdev_alloc(rpdev, parent);
>  	if (IS_ERR(eptdev))
>  		return PTR_ERR(eptdev);
>  
> -	ret = rpmsg_chrdev_eptdev_add(eptdev, chinfo);
> -
> -	return ret;
> +	return rpmsg_chrdev_eptdev_add(eptdev, chinfo);
>  }
>  EXPORT_SYMBOL(rpmsg_chrdev_eptdev_create);
>  
> -- 
> 2.25.1
CGEL Sept. 1, 2022, 5:32 a.m. UTC | #3
Thank you for your reply.

In fact,‘cgel.zte@gmail.com’ is our company's public mail address, and ‘ye.xingchen@zte.com.cn’is my personal mail address in the company.‘ZTE’ is the name of company, and ‘CGEL’the name of our project team in company.

For some reason, the patchs needs to be reviewed by the company before it is sent out, and we have to use public mailboxes to send mails, because personal mailboxes are not allowed to send mails.

Because it is the patch I submitted, the mail about the patch will be sent to my personal mailbox through the public mailbox.

 
Thanks,
YE XINGCHEN
Mathieu Poirier Sept. 2, 2022, 7:32 p.m. UTC | #4
On Thu, Sep 01, 2022 at 05:32:31AM +0000, cgel.zte@gmail.com wrote:
> Thank you for your reply.
> 
> In fact,‘cgel.zte@gmail.com’ is our company's public mail address, and ‘ye.xingchen@zte.com.cn’is my personal mail address in the company.‘ZTE’ is the name of company, and ‘CGEL’the name of our project team in company.
> 
> For some reason, the patchs needs to be reviewed by the company before it is sent out, and we have to use public mailboxes to send mails, because personal mailboxes are not allowed to send mails.
> 
> Because it is the patch I submitted, the mail about the patch will be sent to my personal mailbox through the public mailbox.

Thank you for the clarification - I have applied your patch.

> 
>  
> Thanks,
> YE XINGCHEN
diff mbox series

Patch

diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c
index 4f2189111494..0850ae34fb88 100644
--- a/drivers/rpmsg/rpmsg_char.c
+++ b/drivers/rpmsg/rpmsg_char.c
@@ -424,15 +424,12 @@  int rpmsg_chrdev_eptdev_create(struct rpmsg_device *rpdev, struct device *parent
 			       struct rpmsg_channel_info chinfo)
 {
 	struct rpmsg_eptdev *eptdev;
-	int ret;
 
 	eptdev = rpmsg_chrdev_eptdev_alloc(rpdev, parent);
 	if (IS_ERR(eptdev))
 		return PTR_ERR(eptdev);
 
-	ret = rpmsg_chrdev_eptdev_add(eptdev, chinfo);
-
-	return ret;
+	return rpmsg_chrdev_eptdev_add(eptdev, chinfo);
 }
 EXPORT_SYMBOL(rpmsg_chrdev_eptdev_create);