Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp234817lqp; Mon, 10 Jun 2024 02:19:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX11hoSUo2ivs3jMTypH4TbH5WGC/145BmYW5FNWAzjpAL3AeWa3mTUHXFffWCrWn1qMpPj6lmfGOX9iSVo8WGExwyIW1dm8QK7Ssx8pA== X-Google-Smtp-Source: AGHT+IFwI/nrbr7W9qSJI/tD5Zyt/z4M3NTecfSQSoHV6eY2kGZKPbMRUKqv5CYj0QTpj6kG02CK X-Received: by 2002:a05:6358:4425:b0:199:432b:821b with SMTP id e5c5f4694b2df-19f1fe65fafmr1301409455d.17.1718011164040; Mon, 10 Jun 2024 02:19:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718011163; cv=pass; d=google.com; s=arc-20160816; b=O6RzCakZy1MtDZuJyygOG6gEaFeeuabSIRua1HpgQV8fhClSV8Nr4is65ZmePm0KOA ci9MOFVwKJhdI6emDCfhPis/AjW2Q+9C/wXjqsmmugsLx115Qgw2NU7UGQwEg+pM6J6S /O0eaIbYCxCdFRqQ7DUvLlAyuqRk5qvscOY48xMQqOcxDutuOWJl1jDbNpTuPBLBfnyK 9zXdH4JhRfFPaQtUe7rik4A3s+rxBG70lyecypfR61p2AzfAPYtcZ05xU+fpWu0RPmP5 omIGCmY1meQD9ptrr+eU5d3ZuBQrt/+pVmsmQi4Z979B9pSXhB81wzBm+kFGTodqS2O8 DA9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=6YXzyCsoRRHEYsnsz7snbNd/OFh2QNBazYlwAYKoZCA=; fh=gzZmAd+xsXTumWawxuZxL/LsPQWk5uBWEnrdK3jE+H0=; b=Qd2Ua6Dw5anLeHf4rKcwLFArmkPJBZgBCS3iTx+bbmL421EFw/FRbGnUzITrOUwf0e XrQEnhpMLGOtq/f1AJm9ZysMb3NB0aGTeZS8jr1u+msDaAsXhqGIBZvyG2WUbURLFRrZ VfZ8kfoP5yByDQTmqQbFxbofiqvXyljjZCmdpbOQ/IzFjSlG64vgCEw+26Dms6gnUne0 P38Cz0u1SghqNtgcN6tN7ibMP0WVXvy6Z1m8QlTvSCO1VczDnvRcVX8Yph3OqL/2HEb8 1PwcMp2NiyK07ejgwFYDEy0S+KIv4d42914fBLjemb7hH7rznqkjaShnhT3KzpGeeIM1 ds+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PbaNp1j0; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-207926-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207926-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de2073c8b9si4142885a12.90.2024.06.10.02.19.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 02:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207926-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PbaNp1j0; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-207926-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207926-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A0C282853FD for ; Mon, 10 Jun 2024 09:18:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 972D057323; Mon, 10 Jun 2024 09:18:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PbaNp1j0" Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2653518C31 for ; Mon, 10 Jun 2024 09:18:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718011090; cv=none; b=m0VJcGvjRE2QdRnM2xxxGCjLJuH9Mh4y+bJSdZgQUavLtlFFMRui70rI+ieNvajGFsX5KQp6TUgYXQyyIYGQao2HH3/ECW/CW7tc32+xvP4fj/uF2oFUrQAtHFNSUfMeW3aLLlB443PUZ8srvi0Ran0s0VSAt3yIzAC6BC1N858= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718011090; c=relaxed/simple; bh=gtteO0LSPQdQ3RdVgHLeMls4+WyFe2f9ktPoUGUolqo=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=JLPgFRMxGgon42zSCp3xaTeeoZFlybgkW+j53J0P5qFtCD9s3RnYiOX+OvPGP/YozKXQo55LDFJDz5Q3WyUaAtnnJWkIEedMlUCKUDmapNJk0UPdto89z4UoByOQirCgJNo30+5iE89um5kEInFtPSoW0SzZhoGLGuri+lsBQjw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PbaNp1j0; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-35f1bc63981so878696f8f.1 for ; Mon, 10 Jun 2024 02:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718011087; x=1718615887; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=6YXzyCsoRRHEYsnsz7snbNd/OFh2QNBazYlwAYKoZCA=; b=PbaNp1j07oK26owcoytYGJnocpgNpuJkt2VhB6NAdRYXh50rSJhlWCmRYcInF/cMfg 3vr0blbkjx7yQRt914mZrcB48X9dFwUdssOS5Ir0uXXZokeOViCLh8UeYq2aKoKY9hQU iwDBxRyqnPIGvi6peqXp8peHHhH36DY4RYZBx/FXz/zQAyeNk3ZsI5iLUIqyi1Talu1i Rydeld2aeZ/DYS3p5bOyfdGwJi86lhY1bUoUVt9uyLdS3QS+uVxG0qjQW85KzYa2TOvx Raa0c5JKDMpwhavNIsy2k0tPSnaV3W3Bkwss1PfiPU/MyOMA8xGA1/EZM5VZ2OD45s8H blWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718011087; x=1718615887; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6YXzyCsoRRHEYsnsz7snbNd/OFh2QNBazYlwAYKoZCA=; b=w08mf/rSs9i/R8PDoh2ETnpbSOeMvqjEUsAMi6QqEizrurN6nGX8BdQW6AtSDRBuHx fDgY/l4ze4aKYlqFhuhLZsyOARxelxWTL+RY/YgpEbVA6PjRaXWZKlbXisa8DJVRrpLx c+rAlJDUU9emgoLOVA58zFFpHdSAh3BrKHEK58NLO7Yaz06OvSzvm9wj35ciyCKbuowz j6kRRHpx97VLkIepKNH0tma0rPmx6zAIelZ3AAooyyglpvSW5dWiWi0kOB7SpfOimC3c jRZCZqi0ZvISsOykdXP4+aVtIv3WaMm6e/iKihNGFn37bSVbIe9G6OKV/XNzSO/jg7oF Uu7Q== X-Forwarded-Encrypted: i=1; AJvYcCV+SA5aqt2DJANw1Hc+puBBMPfgpjfQH+kLpvqg0uhE2LKdhyVrH/x2LY2qe+Q20CqEMZW/hMlaGevQ/AiiaOWGremAcu6lX23Cdudy X-Gm-Message-State: AOJu0YyA0ASPB2QpSsIOTZRM4O75PDqsUOKE7gxHWdWIzRRFyE2o7e8R e1/MUC3lpeqpZSPHyhsUUAQ9UJ18f1BrnmYH1/+cSj+8oxxHV/bS3OTSjjwT2SbTU1KfFacmoDy D X-Received: by 2002:a5d:458c:0:b0:35f:ddb:70e2 with SMTP id ffacd0b85a97d-35f0ddb72f9mr6126276f8f.1.1718011087265; Mon, 10 Jun 2024 02:18:07 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35f048dddddsm7859065f8f.111.2024.06.10.02.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 02:18:06 -0700 (PDT) Date: Mon, 10 Jun 2024 12:18:03 +0300 From: Dan Carpenter To: Yury Norov Cc: Rasmus Villemoes , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Linus Walleij Subject: [PATCH] bitops: Add a comment explaining the double underscore macros Message-ID: <0ffbc9c3-7a7c-4cbe-bdb7-1041df44ce53@kili.mountain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding Linus Walleij pointed out that a new comer might be confused about the difference between set_bit() and __set_bit(). Add a comment explaining the difference. Link: https://lore.kernel.org/all/CACRpkdZFPG_YLici-BmYfk9HZ36f4WavCN3JNotkk8cPgCODCg@mail.gmail.com/ Signed-off-by: Dan Carpenter --- include/linux/bitops.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 46d4bdc634c0..b35a5c3783f6 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -29,6 +29,9 @@ extern unsigned long __sw_hweight64(__u64 w); #include /* + * These double underscore __set_bit(), __clear_bit() macros are non-atomic + * versions of set_bit(), clear_bit() and so on. + * * Many architecture-specific non-atomic bitops contain inline asm code and due * to that the compiler can't optimize them to compile-time expressions or * constants. In contrary, generic_*() helpers are defined in pure C and -- 2.39.2