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

Akemi Yagi amyagi at gmail.com
Tue Nov 26 18:24:10 EST 2019


On Tue, Nov 26, 2019 at 5:37 AM Björn Gerhart <gerhart at posteo.de> wrote:
>
> 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

Hi Björn,

As far as I can see, the patch you copied in is already in our code:

https://github.com/elrepo/packages/blob/e2829d12a818d33abd18df85718542916250c7d4/nct6775-kmod/el7/nct6775.c

Akemi


More information about the elrepo mailing list