Hi Jonathan, jic23@xxxxxxxxxx wrote on Sun, 6 Feb 2022 15:45:33 +0000: > On Wed, 2 Feb 2022 15:02:02 +0100 > Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote: > > > An odr_lock has been introduced to protect local accesses to the odr > > internal cache and ensure the cached value always reflected the actual > > value. Using the mlock() for this purpose is no longer needed, so let's > > drop these extra mutex_lock/unlock() calls. > > > > Suggested-by: Jonathan Cameron <jic23@xxxxxxxxxx> > > Cc: Denis Ciocca <denis.ciocca@xxxxxx> > > Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> > > Obviously a different issue but all the write_raw() functions should > use the pattern used in st_pressure_core.c and do early > returns seeing as there doesn't seem to be any cleanup to do. I honestly hesitated when dropping the mlocks there. I've done it in v3, so that we don't hurt our eyes on this anymore :) > > We can tidy that up in a follow up patch as I'm sure there are other > areas in these drivers where direct returns would be nicer than > what is there currently! Thanks, Miquèl