lkml.org 
[lkml]   [2020]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next 04/15] ethtool: add ethnl_parse_bitset() helper
From
From: Michal Kubecek <mkubecek@suse.cz>
Date: Wed, 11 Mar 2020 22:40:23 +0100 (CET)

> +int ethnl_parse_bitset(unsigned long *val, unsigned long *mask,
> + unsigned int nbits, const struct nlattr *attr,
> + ethnl_string_array_t names,
> + struct netlink_ext_ack *extack)
> +{
...
> + if (bit_val)
> + set_bit(idx, val);
> + if (!no_mask)
> + set_bit(idx, mask);

You can certainly use non-atomic __set_bit() in this context.

\
 
 \ /
  Last update: 2020-03-12 06:49    [W:0.114 / U:8.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site