[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180305161739.GN8588@sirena.org.uk>
Date:   Mon, 5 Mar 2018 16:17:39 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Fabio Estevam <festevam@...il.com>
Cc:     david@...hnology.com, linux-kernel@...r.kernel.org,
        Fabio Estevam <fabio.estevam@....com>
Subject: Re: [PATCH] regmap: debugfs: Do not print warning when no device is
 associated
On Fri, Mar 02, 2018 at 04:12:40PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@....com>
> Commit 9b947a13e7f6 ("regmap: use debugfs even when no device")
> allows the usage of regmap debugfs even when there is no device
> associated, which causes several warnings like this:
> (NULL device *): Failed to create debugfs directory
> Do not print the warning in the case there is no associated device. 
>  	map->debugfs = debugfs_create_dir(name, regmap_debugfs_root);
>  	if (!map->debugfs) {
> -		dev_warn(map->dev, "Failed to create debugfs directory\n");
> +		if (map->dev)
> +			dev_warn(map->dev,
> +				 "Failed to create debugfs directory\n");
This then means that we will just randomly not create a debugfs for
anything except the first device that tries to do so with no device
which doesn't seem right.  We should try harder to create a name here,
for example we could try printing the pointer to the map.  Or keep a
counter and use dummy0 and so on.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists