From patchwork Wed Mar 23 23:05:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12790210 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B99EAC433EF for ; Wed, 23 Mar 2022 23:05:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 516F78D0006; Wed, 23 Mar 2022 19:05:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4C8068D0003; Wed, 23 Mar 2022 19:05:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 38F138D0006; Wed, 23 Mar 2022 19:05:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 29E4C8D0003 for ; Wed, 23 Mar 2022 19:05:50 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id EE932247E7 for ; Wed, 23 Mar 2022 23:05:49 +0000 (UTC) X-FDA: 79277185218.15.DD54E76 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf19.hostedemail.com (Postfix) with ESMTP id 81C1F1A002F for ; Wed, 23 Mar 2022 23:05:49 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D6CF7617C1; Wed, 23 Mar 2022 23:05:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A593C340EE; Wed, 23 Mar 2022 23:05:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1648076748; bh=ZCU7Of7v/lbpEDiuwt7YJBx0glvj//0sL5U6XPWuRm8=; h=Date:To:From:In-Reply-To:Subject:From; b=q8+CzY5cObzizqx7MSOf4N3KeqJyEUK7GemzmT7ZHELqvCkn7NluGAvzBCNTr6VDN iOlL9cFZmLKVXVlrHbOCu7TeIpuhlCWS33eiYgpEeIwEfQPi3aw7t0gA/qL2bn7g+I dgv+Xw3shw93ug06OL/4IaqV5uJGS9ChsAT6wZNM= Date: Wed, 23 Mar 2022 16:05:47 -0700 To: peterz@infradead.org,jsd@semihalf.com,andriy.shevchenko@linux.intel.com,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220323160453.65922ced539cbf445b191555@linux-foundation.org> Subject: [patch 10/41] bitfield: add explicit inclusions to the example Message-Id: <20220323230548.3A593C340EE@smtp.kernel.org> X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=q8+CzY5c; spf=pass (imf19.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 81C1F1A002F X-Stat-Signature: m74j7njyz6dtxqr8i5smemq7jgi8xp4b X-HE-Tag: 1648076749-470542 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Andy Shevchenko Subject: bitfield: add explicit inclusions to the example It's not obvious that bitfield.h doesn't guarantee the bits.h inclusion and the example in the former is confusing. Some developers think that it's okay to just include bitfield.h to get it working. Change example to explicitly include necessary headers in order to avoid confusion. Link: https://lkml.kernel.org/r/20220207123341.47533-1-andriy.shevchenko@linux.intel.com Fixes: 3e9b3112ec74 ("add basic register-field manipulation macros") Depends-on: 8bd9cb51daac ("locking/atomics, asm-generic: Move some macros from to a new file") Signed-off-by: Andy Shevchenko Reported-by: Jan Dąbroś Cc: Peter Zijlstra Signed-off-by: Andrew Morton --- include/linux/bitfield.h | 3 +++ 1 file changed, 3 insertions(+) --- a/include/linux/bitfield.h~bitfield-add-explicit-inclusions-to-the-example +++ a/include/linux/bitfield.h @@ -19,6 +19,9 @@ * * Example: * + * #include + * #include + * * #define REG_FIELD_A GENMASK(6, 0) * #define REG_FIELD_B BIT(7) * #define REG_FIELD_C GENMASK(15, 8)