2022-04-13 06:41:58

by Jaehee Park

[permalink] [raw]
Subject: [PATCH v3 0/2] staging: greybus: fix warnings reported by checkpatch

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


2022-04-13 07:58:04

by Jaehee Park

[permalink] [raw]
Subject: [PATCH v3 1/2] staging: greybus: correct typo in comment

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

Reviewed-by: Alex Elder <[email protected]>
Signed-off-by: Jaehee Park <[email protected]>
---
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

2022-04-13 11:59:35

by Jaehee Park

[permalink] [raw]
Subject: [PATCH v3 2/2] staging: greybus: remove empty callback function

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 <[email protected]>
Signed-off-by: Jaehee Park <[email protected]>
---
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

2022-04-13 21:23:41

by Alex Elder

[permalink] [raw]
Subject: Re: [PATCH v3 2/2] staging: greybus: remove empty callback function

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 <[email protected]>
>
> Suggested-by: Dan Carpenter <[email protected]>
> Signed-off-by: Jaehee Park <[email protected]>
> ---
> 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,
> };

2022-04-16 02:44:43

by Jaehee Park

[permalink] [raw]
Subject: Re: [PATCH v3 2/2] staging: greybus: remove empty callback function

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 <[email protected]>

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 <[email protected]>
> > Signed-off-by: Jaehee Park <[email protected]>
> > ---
> > 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,
> > };
>

2022-04-21 09:57:40

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v3 2/2] staging: greybus: remove empty callback function

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 <[email protected]>
>
> 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.