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(-)
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. *
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, };
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
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, };
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, };
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.