Re: is_err checking

2016-07-24 Thread Julia Lawall
On Sun, 24 Jul 2016, walter harms wrote: > > > Am 23.07.2016 16:56, schrieb Julia Lawall: > > Code like the following looks a bit clunky to me: > > > > if (IS_ERR(data->clk) && PTR_ERR(data->clk) != -EPROBE_DEFER) > > > > Is there any reason not to always use eg > > > > data->clk == ERR_PTR(-EPR

Re: is_err checking

2016-07-24 Thread walter harms
Am 23.07.2016 16:56, schrieb Julia Lawall: > Code like the following looks a bit clunky to me: > > if (IS_ERR(data->clk) && PTR_ERR(data->clk) != -EPROBE_DEFER) > > Is there any reason not to always use eg > > data->clk == ERR_PTR(-EPROBE_DEFER) > > Code of the latter form is a bit more popul

is_err checking

2016-07-23 Thread Julia Lawall
Code like the following looks a bit clunky to me: if (IS_ERR(data->clk) && PTR_ERR(data->clk) != -EPROBE_DEFER) Is there any reason not to always use eg data->clk == ERR_PTR(-EPROBE_DEFER) Code of the latter form is a bit more popular. Perhaps one could want something like: IS_ERR_VALUE(data-