Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp312487ybh; Thu, 12 Mar 2020 02:26:40 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuOIa3LFUOd02S41d/Sm0LUNFyVLDWIkDiUgYs7Yle4FJdxYsJ1ya7s+Cm5HL52cXSDajaa X-Received: by 2002:a05:6830:12d0:: with SMTP id a16mr4685550otq.218.1584005200184; Thu, 12 Mar 2020 02:26:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584005200; cv=none; d=google.com; s=arc-20160816; b=BusowVIYlai6dYUcsOuICm/MWX0dGK8jGTctSDpDtv4sf5fCkYGzdMGzF9qF+bh8IF 7tN22px2UrsmmJpSgvMrWh00jjgmcSZQ3YAZC8SPD6f91ERtG/NDwsjER8RKsA78UsU+ bEgAPXXGpC563vVaSOAmWuFVXpPMs28QkS53/8a2lGqkZ1bcEDapu2oVo60E0TtPQr3q K77qKI5gWyK1K0GYGbA+ddXqw5xYiHTLQx2TsBpN16bBHFylKjx8etbMQ8YXWCDPa5k3 DJEnpw+agX86nmDd7DPdvrze24LTIPWJrrcIVIrkurITxeRqViSJ9Ldb9ACdPm4NGDzd 851g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6zjxkxzfgYUagZYHsYY/hufZa7azvdyImmVqyusEsmA=; b=JzsIbX70SterUUu2RP0WQrqXaBvfnA7Z1Uq0/kCjGFBuyD5acY4jat6bCbOnDit2nr JL5Fw0D7uLsZ+vRJZ5Z+74gtcW/ZftuJBfLCopXHau8tbmG2oGeDJXYuHp+FSdE/6QeH 5L+Yt0AV4hTEG4YxoRQdIrueNKk3xluz/ywHrwLkax4MlVfsHUgZ631NUbiyzu11VIhf NoxgEt+Dg1Ji3u2pxiimhJXLXV4uM5jPUPd0w0wGWQpoGZwY1YJ/dRAzAQZQsfLWtGW/ aBMUciXQC/DO/204TUZVa6JKoiJVsqnnxByM/pObQPyS/3AnJkA9roVfXeY3VehaNuh4 2p/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l136si2305875oib.277.2020.03.12.02.26.28; Thu, 12 Mar 2020 02:26:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726874AbgCLJZg (ORCPT + 99 others); Thu, 12 Mar 2020 05:25:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:52852 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726194AbgCLJZf (ORCPT ); Thu, 12 Mar 2020 05:25:35 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DE82FAC6E; Thu, 12 Mar 2020 09:25:33 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 3D203E0C79; Thu, 12 Mar 2020 10:25:33 +0100 (CET) Date: Thu, 12 Mar 2020 10:25:33 +0100 From: Michal Kubecek To: netdev@vger.kernel.org Cc: David Miller , kuba@kernel.org, jiri@resnulli.us, andrew@lunn.ch, f.fainelli@gmail.com, linville@tuxdriver.com, johannes@sipsolutions.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 04/15] ethtool: add ethnl_parse_bitset() helper Message-ID: <20200312092533.GL8012@unicorn.suse.cz> References: <70fe704ddd961de7250e2cb7800369509ed6e1d8.1583962006.git.mkubecek@suse.cz> <20200311.224821.1526910923298377538.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200311.224821.1526910923298377538.davem@davemloft.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2020 at 10:48:21PM -0700, David Miller wrote: > From: Michal Kubecek > 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. Right, thanks. Michal