[elrepo] nct6775: request for el7 update adding NCT6116D support

Björn Gerhart gerhart at posteo.de
Tue Nov 26 08:36:57 EST 2019


Dear folks,

this summer, I’ve modified the nct6775 driver to add support for Nuvoton's NCT6116D family. Meanwhile, the patch has been integrated to the latest kernel release. So I would kindly ask you to provide an updated version of the kmod-nct6775 package in particular for el7.

In order to backport the vanilla kernel’s code for getting compatible with the el7 kABI, the following patch might be helpful:

--- nct6775.c	2019-07-26 18:27:08.247146034 +0200
+++ nct6775-b.c	2019-07-26 18:27:56.697454029 +0200
@@ -1323,8 +1323,8 @@ nct6775_create_attr_group(struct device
	if (attrs == NULL)
		return ERR_PTR(-ENOMEM);

-	su = devm_kzalloc(dev, array3_size(repeat, count, sizeof(*su)),
-			       GFP_KERNEL);
+	su = devm_kzalloc(dev, sizeof(*su) * repeat * count,
+			  GFP_KERNEL);
	if (su == NULL)
		return ERR_PTR(-ENOMEM);

@@ -2831,7 +2831,6 @@ store_pwm_weight_temp_sel(struct device
		return err;
	if (val > NUM_TEMP)
		return -EINVAL;
-	val = array_index_nospec(val, NUM_TEMP + 1);
	if (val && (!(data->have_temp & BIT(val - 1)) ||
		    !data->temp_src[val - 1]))
		return -EINVAL;


If woman or manpower is lacking, I also can learn to contribute such work for elrepo.

Thanks and best!
  Björn



More information about the elrepo mailing list