Messages in this thread | | | Date | Mon, 29 Apr 2024 10:55:29 +0200 | Subject | Re: [1/2] cxl/region: Fix potential invalid pointer dereference | From | Markus Elfring <> |
| |
>> I suggest to simplify such source code by using a conditional operator expression. > > Thanks for your suggestion. Do you mean something like: > cxlr = region_dev ? to_cxl_region(region_dev) : construct_region(cxlrd, cxled);
Yes.
> If so, I'm open to this option, but the kernel does not always obey this convention.
Involved developers present different coding style preferences. I hope that further source code parts can become a bit more succinct.
Regards, Markus
| |