Subject: Re: [PATCH net-next v2 3/3] netconsole: Populate dynamic entry even if netpoll fails

From: Jakub Kicinski <[email-masked]>
Date: Tue, 20 Aug 2024 16:27:25 -0700

On Mon, 19 Aug 2024 03:36:13 -0700 Breno Leitao wrote:
> -	if (err)
> -		goto fail;
> +	if (!err) {
> +		nt->enabled = true;
> +	} else {
> +		pr_err("Not enabling netconsole. Netpoll setup failed\n");
> +		if (!IS_ENABLED(CONFIG_NETCONSOLE_DYNAMIC))
> +			/* only fail if dynamic reconfiguration is set,
> +			 * otherwise, keep the target in the list, but disabled.
> +			 */
> +			goto fail;
> +	}

This will be better written as:

	if (err) {
		/* handle err */
	}

	nt->enabled = true;

As for the message would it be more helpful to indicate target will be
disabled? Move the print after the check for dynamic and say "Netpoll
setup failed, netconsole target will be disabled" ?