Re: [PATCH -next v2] media: Switch to use dev_err_probe() helper

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

 



Hi,

On 2022/9/20 16:33, Sakari Ailus wrote:
Hi Yang,

On Mon, Sep 19, 2022 at 11:58:43PM +0800, Yang Yingliang wrote:
In the probe path, dev_err() can be replaced with dev_err_probe()
which will check if error code is -EPROBE_DEFER.
I don't really disagree with changing to dev_err_probe(). But I would like
to ask how have you selected the drivers and calls calls in them that you
do change.
The drivers that check if error code is EPROBE_DEFER when handling error case in probe
path.

E.g. the imx274 driver has a number of such calls and the patch appears to
change one of them. Other drivers similar to imx274 (e.g. other sensor
drivers) do use dev_err() as well.
dev_err_probe() will check if error code is EPROBE_DEFER, the rest of such calls
in imx274 driver don't check EPROBE_DEFER, so I don't replace them.

I wonder how difficult it would be to do this more systematically with
Coccinelle.




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux