From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D388C54FB9 for ; Sun, 19 Nov 2023 19:59:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229677AbjKST7C (ORCPT ); Sun, 19 Nov 2023 14:59:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjKST7B (ORCPT ); Sun, 19 Nov 2023 14:59:01 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ABE8C6; Sun, 19 Nov 2023 11:58:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=toYGyXAw4pSqVPIpTOL+xkcBrZVHFF2mcg2JdO/5Qxs=; t=1700423938; x=1701633538; b=ePJ23XIOvat7Qq1zDAAR8miy7amhaw+6xx2ohjbg6bzpd6S +z8HsRV+yTXnOnmJ6+pFndwGs0Nt2aBVKPVufuzD9N5mD78B/wGkWJZr0/CIoT+SSipP/r53qovYC 6UFht/1FukMPW+mMvmOzzbEM7ZHS7RtRNREBRMd+O1heXM4y8AWqg9F9hMNSTp7754GY+QTJ3pO7Q h8Aewqw6+ymrsWwA7ZkyozMzBcDrec9eeu95N+s/6tJGAaRcgnC3YIPyMv0NEzPZDhQKmAYns6O5x n9gK6ZDhUAcqbPnx4fGO9iW6DzuKTrgT3Gfc21MXRsAtNXjyJ1hfA1KCehLEt+cw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1r4nw2-0000000E81r-2EPI; Sun, 19 Nov 2023 20:58:26 +0100 Message-ID: <098e2983ac299cb3b33bd0a8e33aaab8d6235909.camel@sipsolutions.net> Subject: Re: [PATCH 12/34] wifi: intel: use atomic find_bit() API where appropriate From: Johannes Berg To: Yury Norov , linux-kernel@vger.kernel.org, Stanislaw Gruszka , Kalle Valo , Gregory Greenman , Hans de Goede , Kees Cook , Miri Korenblit , linux-wireless@vger.kernel.org Cc: Jan Kara , Mirsad Todorovac , Matthew Wilcox , Rasmus Villemoes , Andy Shevchenko , Maxim Kuvyrkov , Alexey Klimov Date: Sun, 19 Nov 2023 20:58:25 +0100 In-Reply-To: <20231118155105.25678-13-yury.norov@gmail.com> References: <20231118155105.25678-1-yury.norov@gmail.com> <20231118155105.25678-13-yury.norov@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Sat, 2023-11-18 at 07:50 -0800, Yury Norov wrote: > iwlegacy and iwlwifi code opencodes atomic bit allocation/traversing by > using loops.=20 That's really just due to being lazy though, it could use a non-atomic __test_and_set_bit() would be just fine in all of this, there's always a mutex held around it that protects the data. Not that it means that the helper is _wrong_, it's just unnecessary, and you don't have non-atomic versions of these, do you? johannes