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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 15 Aug 2022 17:01:19 +0800
From:   ChiaEn Wu <peterwu.pub@...il.com>
To:     lee@...nel.org, daniel.thompson@...aro.org, jingoohan1@...il.com,
        pavel@....cz, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, matthias.bgg@...il.com,
        sre@...nel.org, chunfeng.yun@...iatek.com,
        gregkh@...uxfoundation.org, jic23@...nel.org, lars@...afoo.de,
        linux@...ck-us.net, heikki.krogerus@...ux.intel.com, deller@....de,
        broonie@...nel.org, mazziesaccount@...il.com, lgirdwood@...il.com,
        andriy.shevchenko@...ux.intel.com
Cc:     chiaen_wu@...htek.com, alice_chen@...htek.com,
        cy_huang@...htek.com, dri-devel@...ts.freedesktop.org,
        linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-pm@...r.kernel.org, linux-usb@...r.kernel.org,
        linux-iio@...r.kernel.org, linux-fbdev@...r.kernel.org,
        szunichen@...il.com
Subject: [RESEND PATCH v8 06/12] lib: add linear range index macro

From: ChiaEn Wu <chiaen_wu@...htek.com>

Add linear_range_idx macro for declaring the linear_range struct simply.

Signed-off-by: ChiaEn Wu <chiaen_wu@...htek.com>
---
 include/linux/linear_range.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/linear_range.h b/include/linux/linear_range.h
index fd3d0b358f22..fb53ea13c593 100644
--- a/include/linux/linear_range.h
+++ b/include/linux/linear_range.h
@@ -26,6 +26,14 @@ struct linear_range {
 	unsigned int step;
 };
 
+#define LINEAR_RANGE_IDX(_min, _min_sel, _max_sel, _step)	\
+	{							\
+		.min = _min,					\
+		.min_sel = _min_sel,				\
+		.max_sel = _max_sel,				\
+		.step = _step,					\
+	}
+
 unsigned int linear_range_values_in_range(const struct linear_range *r);
 unsigned int linear_range_values_in_range_array(const struct linear_range *r,
 						int ranges);
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ