outreachy.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: add comment for mutex
@ 2024-03-13 18:21 Ayush Tiwari
  2024-03-14  2:32 ` Alison Schofield
  2024-03-14  7:48 ` Johan Hovold
  0 siblings, 2 replies; 5+ messages in thread
From: Ayush Tiwari @ 2024-03-13 18:21 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh, linux-kernel, linux-staging
  Cc: outreachy

This patch adds descriptive comment to mutex within the struct
gbaudio_codec_info to clarify its intended use and to address
checkpatch checks.

Signed-off-by: Ayush Tiwari <ayushtiw0110@gmail.com>
---
 drivers/staging/greybus/audio_codec.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
index f3f7a7ec6be4..1f97d4fb16cd 100644
--- a/drivers/staging/greybus/audio_codec.h
+++ b/drivers/staging/greybus/audio_codec.h
@@ -71,6 +71,7 @@ struct gbaudio_codec_info {
 	/* to maintain runtime stream params for each DAI */
 	struct list_head dai_list;
 	struct mutex lock;
+	/* Lock to protect register access */
 	struct mutex register_mutex;
 };
 
-- 
2.40.1


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

* Re: [PATCH] staging: greybus: add comment for mutex
  2024-03-13 18:21 [PATCH] staging: greybus: add comment for mutex Ayush Tiwari
@ 2024-03-14  2:32 ` Alison Schofield
  2024-03-14  7:37   ` Dan Carpenter
  2024-03-14  7:48 ` Johan Hovold
  1 sibling, 1 reply; 5+ messages in thread
From: Alison Schofield @ 2024-03-14  2:32 UTC (permalink / raw)
  To: Ayush Tiwari
  Cc: Larry.Finger, florian.c.schilhabel, gregkh, linux-kernel,
	linux-staging, outreachy

On Wed, Mar 13, 2024 at 11:51:22PM +0530, Ayush Tiwari wrote:
> This patch adds descriptive comment to mutex within the struct
> gbaudio_codec_info to clarify its intended use and to address
> checkpatch checks.

Hi Ayush-

You may be right, but you need to convince your patch reviewers
why your comment accurately describes this mutex.

That's always the ask with this kind of patch.

BTW - Don't start your commit log with 'This patch...'.

Alison

> 
> Signed-off-by: Ayush Tiwari <ayushtiw0110@gmail.com>
> ---
>  drivers/staging/greybus/audio_codec.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
> index f3f7a7ec6be4..1f97d4fb16cd 100644
> --- a/drivers/staging/greybus/audio_codec.h
> +++ b/drivers/staging/greybus/audio_codec.h
> @@ -71,6 +71,7 @@ struct gbaudio_codec_info {
>  	/* to maintain runtime stream params for each DAI */
>  	struct list_head dai_list;
>  	struct mutex lock;
> +	/* Lock to protect register access */
>  	struct mutex register_mutex;
>  };
>  
> -- 
> 2.40.1
> 
> 

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

* Re: [PATCH] staging: greybus: add comment for mutex
  2024-03-14  2:32 ` Alison Schofield
@ 2024-03-14  7:37   ` Dan Carpenter
  2024-03-14 14:57     ` Alison Schofield
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2024-03-14  7:37 UTC (permalink / raw)
  To: Alison Schofield
  Cc: Ayush Tiwari, Larry.Finger, florian.c.schilhabel, gregkh,
	linux-kernel, linux-staging, outreachy

On Wed, Mar 13, 2024 at 07:32:20PM -0700, Alison Schofield wrote:
> On Wed, Mar 13, 2024 at 11:51:22PM +0530, Ayush Tiwari wrote:
> > This patch adds descriptive comment to mutex within the struct
> > gbaudio_codec_info to clarify its intended use and to address
> > checkpatch checks.
> 
> Hi Ayush-
> 
> You may be right, but you need to convince your patch reviewers
> why your comment accurately describes this mutex.
> 
> That's always the ask with this kind of patch.

Heh.  Yeah.  The comment wasn't right in this case.  The lock has
nothing to do with registers or register access.

> 
> BTW - Don't start your commit log with 'This patch...'.
> 

Outreachy folk are a more particular about some of this stuff than I am.
Which is fine.  Could you do me a favor though?  Could you ack patches
once you're happy with them?

regards,
dan carpenter


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

* Re: [PATCH] staging: greybus: add comment for mutex
  2024-03-13 18:21 [PATCH] staging: greybus: add comment for mutex Ayush Tiwari
  2024-03-14  2:32 ` Alison Schofield
@ 2024-03-14  7:48 ` Johan Hovold
  1 sibling, 0 replies; 5+ messages in thread
From: Johan Hovold @ 2024-03-14  7:48 UTC (permalink / raw)
  To: Ayush Tiwari
  Cc: Larry.Finger, florian.c.schilhabel, gregkh, linux-kernel,
	linux-staging, outreachy

On Wed, Mar 13, 2024 at 11:51:22PM +0530, Ayush Tiwari wrote:
> This patch adds descriptive comment to mutex within the struct
> gbaudio_codec_info to clarify its intended use and to address
> checkpatch checks.
> 
> Signed-off-by: Ayush Tiwari <ayushtiw0110@gmail.com>
> ---
>  drivers/staging/greybus/audio_codec.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
> index f3f7a7ec6be4..1f97d4fb16cd 100644
> --- a/drivers/staging/greybus/audio_codec.h
> +++ b/drivers/staging/greybus/audio_codec.h
> @@ -71,6 +71,7 @@ struct gbaudio_codec_info {
>  	/* to maintain runtime stream params for each DAI */
>  	struct list_head dai_list;
>  	struct mutex lock;
> +	/* Lock to protect register access */
>	struct mutex register_mutex;

No, please, don't send these kind of patches.

It's one thing thing to learn how to create and send a patch upstream by
removing or adding some white space here and there to drivers in
staging, but the above is not the kind of changes that people unfamiliar
with the code in question should be adding (and the comment in this case
adds no value at all).

Johan

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

* Re: [PATCH] staging: greybus: add comment for mutex
  2024-03-14  7:37   ` Dan Carpenter
@ 2024-03-14 14:57     ` Alison Schofield
  0 siblings, 0 replies; 5+ messages in thread
From: Alison Schofield @ 2024-03-14 14:57 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Ayush Tiwari, Larry.Finger, florian.c.schilhabel, gregkh,
	linux-kernel, linux-staging, outreachy

On Thu, Mar 14, 2024 at 10:37:29AM +0300, Dan Carpenter wrote:
> On Wed, Mar 13, 2024 at 07:32:20PM -0700, Alison Schofield wrote:
> > On Wed, Mar 13, 2024 at 11:51:22PM +0530, Ayush Tiwari wrote:
> > > This patch adds descriptive comment to mutex within the struct
> > > gbaudio_codec_info to clarify its intended use and to address
> > > checkpatch checks.
> > 
> > Hi Ayush-
> > 
> > You may be right, but you need to convince your patch reviewers
> > why your comment accurately describes this mutex.
> > 
> > That's always the ask with this kind of patch.
> 
> Heh.  Yeah.  The comment wasn't right in this case.  The lock has
> nothing to do with registers or register access.
> 
> > 
> > BTW - Don't start your commit log with 'This patch...'.
> > 
> 
> Outreachy folk are a more particular about some of this stuff than I am.
> Which is fine.  Could you do me a favor though?  Could you ack patches
> once you're happy with them?

Dan -
Sure. In practice, the patches are often 'Reviewed-by' someone else
by the time I get back around to it (thanks to the different time
zones and plentiful reviewers) But I understand, I'll make it a 
habit of at Ack'ing after I've asked for something to change.
Alison


> 
> regards,
> dan carpenter
> 

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

end of thread, other threads:[~2024-03-14 14:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-13 18:21 [PATCH] staging: greybus: add comment for mutex Ayush Tiwari
2024-03-14  2:32 ` Alison Schofield
2024-03-14  7:37   ` Dan Carpenter
2024-03-14 14:57     ` Alison Schofield
2024-03-14  7:48 ` Johan Hovold

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).