All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] staging: greybus: fix warnings reported by checkpatch
@ 2022-04-13  4:38 Jaehee Park
  2022-04-13  4:38 ` [PATCH v3 1/2] staging: greybus: correct typo in comment Jaehee Park
  2022-04-13  4:38 ` [PATCH v3 2/2] staging: greybus: remove empty callback function Jaehee Park
  0 siblings, 2 replies; 7+ messages in thread
From: Jaehee Park @ 2022-04-13  4:38 UTC (permalink / raw)
  To: johan
  Cc: elder, gregkh, greybus-dev, linux-staging, linux-kernel,
	outreachy, jhpark1013

The first patch corrects a typo in a comment. The second patch removes
an empty callback function.

Changes in version 3:
Edited the second patch in the patchset to remove the entire empty
function with a void return type instead of removing just the return 
statement within the function.

Jaehee Park (2):
  staging: greybus: correct typo in comment
  staging: greybus: remove empty callback function

 drivers/staging/greybus/arche-apb-ctrl.c | 2 +-
 drivers/staging/greybus/audio_codec.c    | 8 --------
 2 files changed, 1 insertion(+), 9 deletions(-)

-- 
2.25.1


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

* [PATCH v3 1/2] staging: greybus: correct typo in comment
  2022-04-13  4:38 [PATCH v3 0/2] staging: greybus: fix warnings reported by checkpatch Jaehee Park
@ 2022-04-13  4:38 ` Jaehee Park
  2022-04-13  4:38 ` [PATCH v3 2/2] staging: greybus: remove empty callback function Jaehee Park
  1 sibling, 0 replies; 7+ messages in thread
From: Jaehee Park @ 2022-04-13  4:38 UTC (permalink / raw)
  To: johan
  Cc: elder, gregkh, greybus-dev, linux-staging, linux-kernel,
	outreachy, jhpark1013, Alex Elder

Correct a spelling typo from 'Atleast' to 'At least' in comment.
Issue found by checkpatch.

Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
---
 drivers/staging/greybus/arche-apb-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index bbf3ba744fc4..45afa208d004 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -445,7 +445,7 @@ static int __maybe_unused arche_apb_ctrl_suspend(struct device *dev)
 static int __maybe_unused arche_apb_ctrl_resume(struct device *dev)
 {
 	/*
-	 * Atleast for ES2 we have to meet the delay requirement between
+	 * At least for ES2 we have to meet the delay requirement between
 	 * unipro switch and AP bridge init, depending on whether bridge is in
 	 * OFF state or standby state.
 	 *
-- 
2.25.1


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

* [PATCH v3 2/2] staging: greybus: remove empty callback function
  2022-04-13  4:38 [PATCH v3 0/2] staging: greybus: fix warnings reported by checkpatch Jaehee Park
  2022-04-13  4:38 ` [PATCH v3 1/2] staging: greybus: correct typo in comment Jaehee Park
@ 2022-04-13  4:38 ` Jaehee Park
  2022-04-13  5:44   ` Dan Carpenter
  2022-04-13 12:48   ` Alex Elder
  1 sibling, 2 replies; 7+ messages in thread
From: Jaehee Park @ 2022-04-13  4:38 UTC (permalink / raw)
  To: johan
  Cc: elder, gregkh, greybus-dev, linux-staging, linux-kernel,
	outreachy, jhpark1013, Dan Carpenter

Remove the optional remove callback for the soc_codec_dev_gbaudio
structure. The only place it is referenced is
snd_soc_component_remove() which is only called if the sound_component
pointer is non-null. The null function pointers here can be optionally
ommitted. When a sound component is registered this way, the remove
callback is optional. We can safely remove the whole gbcodec_remove
function, which used to be an empty function with a void return type.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
---
 drivers/staging/greybus/audio_codec.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index 0f50d1e51e2c..dc030caa64ba 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -1029,12 +1029,6 @@ static int gbcodec_probe(struct snd_soc_component *comp)
 	return 0;
 }
 
-static void gbcodec_remove(struct snd_soc_component *comp)
-{
-	/* Empty function for now */
-	return;
-}
-
 static int gbcodec_write(struct snd_soc_component *comp, unsigned int reg,
 			 unsigned int value)
 {
@@ -1049,8 +1043,6 @@ static unsigned int gbcodec_read(struct snd_soc_component *comp,
 
 static const struct snd_soc_component_driver soc_codec_dev_gbaudio = {
 	.probe	= gbcodec_probe,
-	.remove	= gbcodec_remove,
-
 	.read = gbcodec_read,
 	.write = gbcodec_write,
 };
-- 
2.25.1


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

* Re: [PATCH v3 2/2] staging: greybus: remove empty callback function
  2022-04-13  4:38 ` [PATCH v3 2/2] staging: greybus: remove empty callback function Jaehee Park
@ 2022-04-13  5:44   ` Dan Carpenter
  2022-04-13 12:48   ` Alex Elder
  1 sibling, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2022-04-13  5:44 UTC (permalink / raw)
  To: Jaehee Park
  Cc: johan, elder, gregkh, greybus-dev, linux-staging, linux-kernel,
	outreachy

On Wed, Apr 13, 2022 at 12:38:52AM -0400, Jaehee Park wrote:
> Remove the optional remove callback for the soc_codec_dev_gbaudio
> structure. The only place it is referenced is
> snd_soc_component_remove() which is only called if the sound_component
> pointer is non-null. The null function pointers here can be optionally
> ommitted. When a sound component is registered this way, the remove
> callback is optional. We can safely remove the whole gbcodec_remove
> function, which used to be an empty function with a void return type.
> 
> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Jaehee Park <jhpark1013@gmail.com>

Thanks!

regards,
dan carpenter


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

* Re: [PATCH v3 2/2] staging: greybus: remove empty callback function
  2022-04-13  4:38 ` [PATCH v3 2/2] staging: greybus: remove empty callback function Jaehee Park
  2022-04-13  5:44   ` Dan Carpenter
@ 2022-04-13 12:48   ` Alex Elder
  2022-04-14 20:09     ` Jaehee Park
  1 sibling, 1 reply; 7+ messages in thread
From: Alex Elder @ 2022-04-13 12:48 UTC (permalink / raw)
  To: Jaehee Park, johan
  Cc: elder, gregkh, greybus-dev, linux-staging, linux-kernel,
	outreachy, Dan Carpenter

On 4/12/22 11:38 PM, Jaehee Park wrote:
> Remove the optional remove callback for the soc_codec_dev_gbaudio
> structure. The only place it is referenced is
> snd_soc_component_remove() which is only called if the sound_component
> pointer is non-null. The null function pointers here can be optionally
> ommitted. When a sound component is registered this way, the remove
> callback is optional. We can safely remove the whole gbcodec_remove
> function, which used to be an empty function with a void return type.

Now I think your description is a little long...  But that's OK.

This looks good to me.  Thank you for responding to all our
feedback.

Reviewed-by: Alex Elder <elder@linaro.org>
> 
> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
> ---
>   drivers/staging/greybus/audio_codec.c | 8 --------
>   1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
> index 0f50d1e51e2c..dc030caa64ba 100644
> --- a/drivers/staging/greybus/audio_codec.c
> +++ b/drivers/staging/greybus/audio_codec.c
> @@ -1029,12 +1029,6 @@ static int gbcodec_probe(struct snd_soc_component *comp)
>   	return 0;
>   }
>   
> -static void gbcodec_remove(struct snd_soc_component *comp)
> -{
> -	/* Empty function for now */
> -	return;
> -}
> -
>   static int gbcodec_write(struct snd_soc_component *comp, unsigned int reg,
>   			 unsigned int value)
>   {
> @@ -1049,8 +1043,6 @@ static unsigned int gbcodec_read(struct snd_soc_component *comp,
>   
>   static const struct snd_soc_component_driver soc_codec_dev_gbaudio = {
>   	.probe	= gbcodec_probe,
> -	.remove	= gbcodec_remove,
> -
>   	.read = gbcodec_read,
>   	.write = gbcodec_write,
>   };


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

* Re: [PATCH v3 2/2] staging: greybus: remove empty callback function
  2022-04-13 12:48   ` Alex Elder
@ 2022-04-14 20:09     ` Jaehee Park
  2022-04-20 15:15       ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Jaehee Park @ 2022-04-14 20:09 UTC (permalink / raw)
  To: Alex Elder
  Cc: johan, elder, gregkh, greybus-dev, linux-staging, linux-kernel,
	outreachy, Dan Carpenter

On Wed, Apr 13, 2022 at 07:48:03AM -0500, Alex Elder wrote:
> On 4/12/22 11:38 PM, Jaehee Park wrote:
> > Remove the optional remove callback for the soc_codec_dev_gbaudio
> > structure. The only place it is referenced is
> > snd_soc_component_remove() which is only called if the sound_component
> > pointer is non-null. The null function pointers here can be optionally
> > ommitted. When a sound component is registered this way, the remove
> > callback is optional. We can safely remove the whole gbcodec_remove
> > function, which used to be an empty function with a void return type.
> 
> Now I think your description is a little long...  But that's OK.
> 
> This looks good to me.  Thank you for responding to all our
> feedback.
> 
> Reviewed-by: Alex Elder <elder@linaro.org>

hi Greg, I saw that this was past on to staging-next already. Is it too 
late to add Alex to the reviewed by? 

> > 
> > Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
> > Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
> > ---
> >   drivers/staging/greybus/audio_codec.c | 8 --------
> >   1 file changed, 8 deletions(-)
> > 
> > diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
> > index 0f50d1e51e2c..dc030caa64ba 100644
> > --- a/drivers/staging/greybus/audio_codec.c
> > +++ b/drivers/staging/greybus/audio_codec.c
> > @@ -1029,12 +1029,6 @@ static int gbcodec_probe(struct snd_soc_component *comp)
> >   	return 0;
> >   }
> > -static void gbcodec_remove(struct snd_soc_component *comp)
> > -{
> > -	/* Empty function for now */
> > -	return;
> > -}
> > -
> >   static int gbcodec_write(struct snd_soc_component *comp, unsigned int reg,
> >   			 unsigned int value)
> >   {
> > @@ -1049,8 +1043,6 @@ static unsigned int gbcodec_read(struct snd_soc_component *comp,
> >   static const struct snd_soc_component_driver soc_codec_dev_gbaudio = {
> >   	.probe	= gbcodec_probe,
> > -	.remove	= gbcodec_remove,
> > -
> >   	.read = gbcodec_read,
> >   	.write = gbcodec_write,
> >   };
> 

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

* Re: [PATCH v3 2/2] staging: greybus: remove empty callback function
  2022-04-14 20:09     ` Jaehee Park
@ 2022-04-20 15:15       ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2022-04-20 15:15 UTC (permalink / raw)
  To: Jaehee Park
  Cc: Alex Elder, johan, elder, greybus-dev, linux-staging,
	linux-kernel, outreachy, Dan Carpenter

On Thu, Apr 14, 2022 at 04:09:32PM -0400, Jaehee Park wrote:
> On Wed, Apr 13, 2022 at 07:48:03AM -0500, Alex Elder wrote:
> > On 4/12/22 11:38 PM, Jaehee Park wrote:
> > > Remove the optional remove callback for the soc_codec_dev_gbaudio
> > > structure. The only place it is referenced is
> > > snd_soc_component_remove() which is only called if the sound_component
> > > pointer is non-null. The null function pointers here can be optionally
> > > ommitted. When a sound component is registered this way, the remove
> > > callback is optional. We can safely remove the whole gbcodec_remove
> > > function, which used to be an empty function with a void return type.
> > 
> > Now I think your description is a little long...  But that's OK.
> > 
> > This looks good to me.  Thank you for responding to all our
> > feedback.
> > 
> > Reviewed-by: Alex Elder <elder@linaro.org>
> 
> hi Greg, I saw that this was past on to staging-next already. Is it too 
> late to add Alex to the reviewed by? 

Yes, sorry.

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

end of thread, other threads:[~2022-04-20 15:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13  4:38 [PATCH v3 0/2] staging: greybus: fix warnings reported by checkpatch Jaehee Park
2022-04-13  4:38 ` [PATCH v3 1/2] staging: greybus: correct typo in comment Jaehee Park
2022-04-13  4:38 ` [PATCH v3 2/2] staging: greybus: remove empty callback function Jaehee Park
2022-04-13  5:44   ` Dan Carpenter
2022-04-13 12:48   ` Alex Elder
2022-04-14 20:09     ` Jaehee Park
2022-04-20 15:15       ` Greg KH

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.