Re: [PATCH v4 2/3] hwrng: add Rockchip SoC hwrng driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Uwe,

On 2024-06-23 11:46, Uwe Kleine-König wrote:
On 6/23/24 09:00, Krzysztof Kozlowski wrote:
On 23/06/2024 05:33, Daniel Golle wrote:
+
+	pm_runtime_set_autosuspend_delay(dev, RK_RNG_AUTOSUSPEND_DELAY);
+	pm_runtime_use_autosuspend(dev);
+	devm_pm_runtime_enable(dev);
+
+	ret = devm_hwrng_register(dev, &rk_rng->rng);
+	if (ret)
+ return dev_err_probe(&pdev->dev, ret, "Failed to register Rockchip hwrng\n");
+
+	dev_dbg(&pdev->dev, "Registered Rockchip hwrng\n");

Drop, it is not useful at all. Srsly, we had already long enough talk,
[...]

And in this long talk using dev_dbg() was one of the suggestions for a
compromise. For me this is ok.

There is no single benefit of such debug statement. sysfs already
provides you this information. Simple entry/exit  is provided by
tracing. You duplicate existing interfaces without any benefit, because
this prints nothing more.

There might be a (small) value if you want to know when during boot
the device becomes available. So having a dev_dbg() that can be
enabled dynamically (assuming DYNAMIC_DEBUG=y) and isn't in the way
otherwise might be justified. IMHO a dev_dbg is lightweight enough
that *I* won't continue the discussion.

For anyone interested, below is an example that shows the usability
of knowing when a device becomes available:

https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/issues/21




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux