lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4e5c567-63dd-f7de-114b-a357075444a2@ieee.org>
Date:   Wed, 13 Apr 2022 07:48:03 -0500
From:   Alex Elder <elder@...e.org>
To:     Jaehee Park <jhpark1013@...il.com>, johan@...nel.org
Cc:     elder@...nel.org, gregkh@...uxfoundation.org,
        greybus-dev@...ts.linaro.org, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org, outreachy@...ts.linux.dev,
        Dan Carpenter <dan.carpenter@...cle.com>
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 <elder@...aro.org>
> 
> Suggested-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Jaehee Park <jhpark1013@...il.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,
>   };

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ