From patchwork Thu Feb 15 09:36:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Kellermann X-Patchwork-Id: 201325 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp286360dyb; Thu, 15 Feb 2024 01:59:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVPTgQNKlm6qu0vHuIhlQjFC+kOP+DFHPwROnUc4P2bUFfPuCw5W05UoAJI2wwsmNwXwihUgpSPr26Vzj0vCXkr0ZEK/w== X-Google-Smtp-Source: AGHT+IF0LnNaKxnbX+AyAg89DDtGlzoZr7EvCcB4WjTROMNPhXl9kvTnt1Q744RpzGYxxcFuB60m X-Received: by 2002:a05:6e02:d0f:b0:363:8df1:c52a with SMTP id g15-20020a056e020d0f00b003638df1c52amr1094398ilj.8.1707991176897; Thu, 15 Feb 2024 01:59:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707991176; cv=pass; d=google.com; s=arc-20160816; b=hiNgaN/Yynr5uH10DzlohfazENprwo3kqdbWP/FnTD9ipv3hjQ40HDn7f1QNFR9QJr 6CrjP05X5p+R9EGWwNQZV1r14xOFAg768srizihG3wCekCS0wm/FGOtzTnOmiLKkV7J4 8jRN2L0nKJyWrGDSSFdrUgw9YivuPErzDf/IwqlbSEEy4nInld0xqmN8cO8kNgRbHTpL yjjM+s+rw0v6x1WlcLjR4NhBe1mTDF3yshYIHJf6V+G4Rb/t3KUWeCVl3dwu23qDzoFU QDVriq22Xz1rPX1t6H+0qk1/i46N/IIje+y2tdBi0mLMYm/M2IGtbqqOpurQWBgbeeml ID8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=GL6ddD5YKfOqRj2RNy6xNtOts5S4Jrg36FUNpDVDuuc=; fh=KdkJjeZw/67bsxRSoO8Cj8OsbWp5WsCKsMMy5B3Phrs=; b=Vzab0/mCa/cc+wa+2bMlJ0CYA4vqwcHVqGB18dHmApQ/xu26wMC6T13n0Ggr6xp0OD pGV6YzCA4++BoWRgAyyx8tg2P0Gvl65nkymEfnF49gKz616r/FUzt9aEYOO/2UzV8O6S 1Wqhvd7cIcYo6+ncn7kMQfTeJ+zFU1chZJJ52+/fv1ZYVl2IJB6SezoDzamA68FudiIK uPoTKX/ELLNlerDKfykcwNfs1+xVmx4Uvi6KeOp8BitmPTpEnTSAeN9dQVhsoIMIwbeo jGOFykX2mSqj/RoglpW0mxhmeE5UMM9yjTaNqA5+Tus+yFti8WoOHFHaZE90+6yix97P 8fFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=TQG+iyxn; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-66558-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66558-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b26-20020a65669a000000b005dcbb6ae5b0si192704pgw.248.2024.02.15.01.59.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 01:59:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66558-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=TQG+iyxn; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-66558-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66558-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E8C69B2CBD9 for ; Thu, 15 Feb 2024 09:38:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C80A1BC4B; Thu, 15 Feb 2024 09:37:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="TQG+iyxn" Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 8523417BA6 for ; Thu, 15 Feb 2024 09:37:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707989823; cv=none; b=tCiZQn5YHzHOy63+b+dartyquc8zEOB4xkR2wkdV5tBg+HRZxucsXL6XwsIisrGFt9H8/C6k17ZXGNO63BFvoHC0RtbZq4XmFM3NmZV3XHAZ7xhydup3V8raT/SPaXfmynccc6sW6EnsyF6KkTXOYiCMVIi71irzMB/h/PY5g9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707989823; c=relaxed/simple; bh=xUBeVNY5mqTWjVsqFsHwlt9icptll46YRyGdat/hD6s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QQUUlCHALk2Kx1GjCxTxNdYWdWW2O6oOPLec7kcgMI3GBWgZSwRlRg0DHQYxDT2jPQPNjw1vTo25TVVRr4CgDLDxqOjvbsL9g+PAY8cuYg5rM/uf4A2e7+T9BGdllJoUu45w8lDJM56hqhvigq1yOuShg7tlbswmDeQ7QpL6HEc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com; spf=pass smtp.mailfrom=ionos.com; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b=TQG+iyxn; arc=none smtp.client-ip=209.85.218.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ionos.com Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a30f7c9574eso82267666b.0 for ; Thu, 15 Feb 2024 01:37:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1707989819; x=1708594619; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GL6ddD5YKfOqRj2RNy6xNtOts5S4Jrg36FUNpDVDuuc=; b=TQG+iyxnc/h06yz/3oGbWd5uEICugybXWLY+DMR1HZM9OXiQOmAIVM/Mt5DSyaxZKA UT236ix3YDlFcspWvEMqo8PLTQX/5nJolB7Ga8pYCWb/KU5Twr7ILXTU4wdYtlbrB78p BKmPvKvWHSB4bMT4Ffq2pv8xhRG0lAp5bs2nCacyAoBt061MhDHOMQI7i9q+sbGEmgjW snuqUevNA3esDClhjSwTUrHUSZvuHihi41qFaq5bWfuYK8RvgeRoAC++81Amu9Q2Jh7s 10a8g9jHsRVJmgzftATFe9T5qSkLSyG2IMwm+WBSLhDlAvcbCfnmyhAJgS8+kd5dj05u ak1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707989819; x=1708594619; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GL6ddD5YKfOqRj2RNy6xNtOts5S4Jrg36FUNpDVDuuc=; b=S08FcO0oel/EOCeIlE5U1c7SjZndG7QC92HvAehvE+q8j3bVRZ3f/noYCZMj5D0+Uz GXOXZvS/GXGHqbzklwxPr0Gcq1vrgxJoRai8iVtjJuxZgfDQedQzCuKi/Cv2crXYKMoH jZFwD+zlyWPtFvgtXQd5uGv2j1GzKdXB22rHahVznD4TWVGIZ9HPoNPGwd4UiPdMBtl3 RIIUlD3pqtW2j9ieiT20QDE1dSHh2my+hkQUFdtWH11D1TxVODWj2iGGt60usmFaY3Rz +Gk+aOty+uF8XEDlgdStet/faXChdAh2ZwMURD+vqsHPKQyIoZcrD+ISsdj5fTciu1gf 7LYw== X-Gm-Message-State: AOJu0YyiiAccA958jgKLPWsb/5u84offjo5a84m8yfCLfawzaDGrXqYZ A6ckKz69jUxkTDszLcVdy8xCaSRybfntpf/9wKJcUTy8b9ZUT0BKcFqDt9HBv085Snj9NxH0qRn O X-Received: by 2002:a17:906:f9ca:b0:a3d:2cce:a8df with SMTP id lj10-20020a170906f9ca00b00a3d2ccea8dfmr758183ejb.36.1707989818839; Thu, 15 Feb 2024 01:36:58 -0800 (PST) Received: from raven.intern.cm-ag (p200300dc6f267100023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f26:7100:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id rg14-20020a1709076b8e00b00a3d09d09e90sm362059ejc.59.2024.02.15.01.36.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 01:36:58 -0800 (PST) From: Max Kellermann To: linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH v1 4/8] linux/random.h: reduce dependencies on linux/kernel.h Date: Thu, 15 Feb 2024 10:36:42 +0100 Message-Id: <20240215093646.3265823-5-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240215093646.3265823-1-max.kellermann@ionos.com> References: <20240215093646.3265823-1-max.kellermann@ionos.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790958556608705999 X-GMAIL-MSGID: 1790958556608705999 This header doesn't need kernel.h at all, but if we remove it, the build breaks because kernel.h includes limits.h and log2.h, which random.h needs. list.h is also removed because it is not needed at all. Signed-off-by: Max Kellermann --- include/linux/random.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/random.h b/include/linux/random.h index b0a940af4fff..3183025ddda9 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -4,8 +4,8 @@ #define _LINUX_RANDOM_H #include -#include -#include +#include // for U32_MAX +#include // for is_power_of_2() #include