staging: greybus: fix warnings reported by checkpatch
v3 cover 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(-)
Signature · 1 line
2.25.1
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.
--- drivers/staging/greybus/arche-apb-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/arche-apb-ctrl.c +1 -1
@@ -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. *
Signature · 1 line
2.25.1
PATCH v3 2/2 staging: greybus: remove empty callback function
In reply to Jaehee ParkRemove 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.
--- drivers/staging/greybus/audio_codec.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/staging/greybus/audio_codec.c +0 -8
@@ -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, };
Signature · 1 line
2.25.1
Re: [PATCH v3 2/2] staging: greybus: remove empty callback function
Quoted 10 lines · Jaehee Park
Remove the optional remove callback for the
soc_codec_dev_gbaudiostructure. The only place it is referenced issnd_soc_component_remove()which is only called if thesound_componentpointer 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 wholegbcodec_removefunction, 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]>
Thanks!
regards,
dan carpenter
Re: [PATCH v3 2/2] staging: greybus: remove empty callback function
In reply to Jaehee ParkQuoted 7 lines · Jaehee Park
Remove the optional remove callback for the
soc_codec_dev_gbaudiostructure. The only place it is referenced issnd_soc_component_remove()which is only called if thesound_componentpointer 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 wholegbcodec_removefunction, 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.
Quoted 33 lines
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(-)drivers/staging/greybus/audio_codec.c +0
-8@@ -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, };
Re: [PATCH v3 2/2] staging: greybus: remove empty callback function
Quoted 9 lines · Alex Elder
Quoted 7 lines · Jaehee Park
Remove the optional remove callback for the
soc_codec_dev_gbaudiostructure. The only place it is referenced issnd_soc_component_remove()which is only called if thesound_componentpointer 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 wholegbcodec_removefunction, which used to be an empty function with a void return type.
Quoted 6 lines
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?
Quoted 32 lines
Quoted 31 lines
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(-)drivers/staging/greybus/audio_codec.c +0
-8@@ -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, };
Greg KH
maintainerRe: [PATCH v3 2/2] staging: greybus: remove empty callback function
Quoted 12 lines · Jaehee Park
Quoted 11 lines · Alex Elder
Quoted 7 lines · Jaehee Park
Remove the optional remove callback for the
soc_codec_dev_gbaudiostructure. The only place it is referenced issnd_soc_component_remove()which is only called if thesound_componentpointer 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 wholegbcodec_removefunction, 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.
Quoted 7 lines
Quoted 4 lines
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.