All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] greybus/operation: Drop reference when message has been set
@ 2021-03-10  9:10 Lv Yunlong
  2021-03-10  9:32 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Lv Yunlong @ 2021-03-10  9:10 UTC (permalink / raw)
  To: johan, elder, gregkh; +Cc: greybus-dev, linux-kernel, Lv Yunlong

In gb_operation_response_send, get an extra reference
before gb_message_send() with this comment "/* Reference will
be dropped when message has been sent. */". Therefore, we
should drop the got reference not only in the error branch,
but also in the complete branch.

Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
---
 drivers/greybus/operation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/greybus/operation.c b/drivers/greybus/operation.c
index 296f0b93d171..500b3fe53a04 100644
--- a/drivers/greybus/operation.c
+++ b/drivers/greybus/operation.c
@@ -855,7 +855,7 @@ static int gb_operation_response_send(struct gb_operation *operation,
 	if (ret)
 		goto err_put_active;
 
-	/*Drop reference after message send successfully. */
+	/*Drop reference after message send completes. */
 	gb_operation_put_active(operation);
 	gb_operation_put(operation);
 
-- 
2.25.1



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

* Re: [PATCH] greybus/operation: Drop reference when message has been set
  2021-03-10  9:10 [PATCH] greybus/operation: Drop reference when message has been set Lv Yunlong
@ 2021-03-10  9:32 ` Greg KH
  2021-03-10 14:07   ` lyl2019
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2021-03-10  9:32 UTC (permalink / raw)
  To: Lv Yunlong; +Cc: johan, elder, greybus-dev, linux-kernel

On Wed, Mar 10, 2021 at 01:10:14AM -0800, Lv Yunlong wrote:
> In gb_operation_response_send, get an extra reference
> before gb_message_send() with this comment "/* Reference will
> be dropped when message has been sent. */". Therefore, we
> should drop the got reference not only in the error branch,
> but also in the complete branch.

That's not what your patch does at all :(


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

* Re: Re: [PATCH] greybus/operation: Drop reference when message has been set
  2021-03-10  9:32 ` Greg KH
@ 2021-03-10 14:07   ` lyl2019
  0 siblings, 0 replies; 3+ messages in thread
From: lyl2019 @ 2021-03-10 14:07 UTC (permalink / raw)
  To: Greg KH; +Cc: johan, elder, greybus-dev, linux-kernel

Sorry, i mistakenly divided the patch into two commits. What i have sent
is the latest commit which corrected my grammar in the patch.

I will send the full patch soon.


> -----原始邮件-----
> 发件人: "Greg KH" <gregkh@linuxfoundation.org>
> 发送时间: 2021-03-10 17:32:40 (星期三)
> 收件人: "Lv Yunlong" <lyl2019@mail.ustc.edu.cn>
> 抄送: johan@kernel.org, elder@kernel.org, greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org
> 主题: Re: [PATCH] greybus/operation: Drop reference when message has been set
> 
> On Wed, Mar 10, 2021 at 01:10:14AM -0800, Lv Yunlong wrote:
> > In gb_operation_response_send, get an extra reference
> > before gb_message_send() with this comment "/* Reference will
> > be dropped when message has been sent. */". Therefore, we
> > should drop the got reference not only in the error branch,
> > but also in the complete branch.
> 
> That's not what your patch does at all :(
> 

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

end of thread, other threads:[~2021-03-10 14:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10  9:10 [PATCH] greybus/operation: Drop reference when message has been set Lv Yunlong
2021-03-10  9:32 ` Greg KH
2021-03-10 14:07   ` lyl2019

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.