[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200311.224821.1526910923298377538.davem@davemloft.net>
Date: Wed, 11 Mar 2020 22:48:21 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: mkubecek@...e.cz
Cc: netdev@...r.kernel.org, kuba@...nel.org, jiri@...nulli.us,
andrew@...n.ch, f.fainelli@...il.com, linville@...driver.com,
johannes@...solutions.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 04/15] ethtool: add ethnl_parse_bitset() helper
From: Michal Kubecek <mkubecek@...e.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.
Powered by blists - more mailing lists