[PATCH 3/8] staging: gasket: core: move driver loaded log after error cases

Greg Kroah-Hartman gregkh at linuxfoundation.org
Thu Aug 2 08:57:34 UTC 2018


On Thu, Aug 02, 2018 at 01:42:40AM -0700, Todd Poynor wrote:
> From: Todd Poynor <toddpoynor at google.com>
> 
> Gasket could claim to have loaded a driver and then print an error
> indicating it actually did not.  Move the driver registration message
> after the last error check.  Replace the existing "loaded successfully"
> message with this instead.
> 
> Signed-off-by: Todd Poynor <toddpoynor at google.com>
> ---
>  drivers/staging/gasket/gasket_core.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
> index e550c9060dcd2..2160c2de78e77 100644
> --- a/drivers/staging/gasket/gasket_core.c
> +++ b/drivers/staging/gasket/gasket_core.c
> @@ -1759,10 +1759,6 @@ int gasket_register_device(const struct gasket_driver_desc *driver_desc)
>  	}
>  	mutex_unlock(&g_mutex);
>  
> -	pr_info("gasket: Loaded %s driver version %s, framework version %s\n",
> -		driver_desc->name, driver_desc->driver_version,
> -		GASKET_FRAMEWORK_VERSION);
> -
>  	if (desc_idx == -1) {
>  		pr_err("Too many Gasket drivers loaded: %d\n",
>  		       GASKET_FRAMEWORK_DESC_MAX);
> @@ -1810,7 +1806,10 @@ int gasket_register_device(const struct gasket_driver_desc *driver_desc)
>  		goto fail2;
>  	}
>  
> -	pr_info("Driver registered successfully.\n");

Same here, just drop this line.

thanks,

greg k-h


More information about the devel mailing list