lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1732811829.git.mazziesaccount@gmail.com>
Date: Thu, 28 Nov 2024 18:49:58 +0200
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Matti Vaittinen <mazziesaccount@...il.com>,
	Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc: Matti Vaittinen <mazziesaccount@...il.com>,
	Jonathan Cameron <jic23@...nel.org>,
	Lars-Peter Clausen <lars@...afoo.de>, linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 0/3] iio: gts: Simplify available scales building

Simplify the available scales building.

Building the available scales tables looks confusing. It has also been a
source of a few memory leaks.

https://lore.kernel.org/lkml/20241016012453.2013302-1-ruanjinjie@huawei.com/
https://lore.kernel.org/lkml/20241011095512.3667549-1-ruanjinjie@huawei.com/

Attempt making it a bit less error prone by simplifying some error paths
using __free(kfree) from the cleanup.h. Try doing this without
introducing variables in the middle of a function while also improving
the logic of the functions. This is possble by splitting the long scale
building logic in a couple of different, well purposed functions, and
finally streamlining the logic a bit by taking out one extra 'total gains
to scales'-conversion.

Inspired by the discussion here:
https://lore.kernel.org/lkml/2d16bf36-57d3-4c54-bbee-2e7d93399f29@gmail.com/

Matti Vaittinen (3):
  iio: gts: Simplify using __free
  iio: gts: split table-building function
  iio: gts: simplify scale table build

 drivers/iio/industrialio-gts-helper.c | 171 ++++++++++++++------------
 1 file changed, 91 insertions(+), 80 deletions(-)


base-commit: a61ff7eac77e86de828fe28c4e42b8ae9ec2b195
-- 
2.47.0


Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ