[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ace70750-6f58-4bd9-a18f-9889dae30061@web.de>
Date: Mon, 29 Apr 2024 10:55:29 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Li Zhijian <lizhijian@...itsu.com>, linux-cxl@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Alison Schofield <alison.schofield@...el.com>,
Dan Williams <dan.j.williams@...el.com>, Dave Jiang <dave.jiang@...el.com>,
Davidlohr Bueso <dave@...olabs.net>, Ira Weiny <ira.weiny@...el.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Vishal Verma <vishal.l.verma@...el.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [1/2] cxl/region: Fix potential invalid pointer dereference
>> 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
Powered by blists - more mailing lists