From patchwork Fri Feb 9 16:40:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Kellermann X-Patchwork-Id: 199014 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp990325dyd; Fri, 9 Feb 2024 09:02:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXLUhfiM9XJu0HE5W6m1GeYAMELFLnkok+vdelHRvQomNvsWMK49qxk8MjroJk9OzZb62t6w7w4FbPzEPFtI3N+Cwq6yg== X-Google-Smtp-Source: AGHT+IH9SNjr0oRDNn69mpE4pqryWqQiw6pPlBxQMJuyXhOoKLmbstCHb6iXriD5tvWM8bJpKEbP X-Received: by 2002:a17:90a:6fa2:b0:296:930:8792 with SMTP id e31-20020a17090a6fa200b0029609308792mr2340026pjk.9.1707498154263; Fri, 09 Feb 2024 09:02:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707498154; cv=pass; d=google.com; s=arc-20160816; b=LqLsDeGOTVbZ40uCRYYbHtqMZ732mhO0+k4uXL2i11IJZuW+LJZ4recZBvUnXC85/B c4DHh/259hx/jPa0JtW89+TAaRHSkyD7AlGFk1Pt1UI+NCwe3esz+XMZXRkD/K8/AoaH vundVOyW1tBaKlZWLaDilmg8iW5408B+WUNjez0f7modvJLFtVANhwhTbE9cNkEmUcZQ 1PYvixPDW0BTvb47NC5ji1S6R1BknIX7J/jtkESH0Y+cU+9yiUf/mTFPWKW9M0Dj5dEP mCEbVRMQ79Fs2Ru7jbzdC8zSw7OitffVIt+sm1iElbsdc7Wc4+4+AZRZKwFjUQIYDyHQ Bb1A== 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=6RzTfSVvaxCQds+vfCIgTWL90cMKMfve56yUjlfe8no=; fh=dqJSgv2QycKX/Q3R3zWrQ5w9bGTSX+mf8lU8y/NVMjQ=; b=L4Ttjl30vNQVxKFMu+kTGDnsc53A0wXh9W3waldz1BX6Yq9IvPPKHFMgWTnNLHTAzS HDeniXsLQzeOXu5gnRVEL/kGBGxowQxlhQZqkGl/wDui5EBj4luyDX1B9dpoOfsm+aA6 VHWarNJJgEd0PDLLT/2H2Qmy0tLAjmzuDFJCRS5rdBNqqrFIlp1LVr+nhTH+oIpMk/37 nZeZNZWIIvdjzaFgyDZpmfntuwnNTGsY8lQ2TUoAE4xGj2Kkrf8oeCRdG7McFeFBxmp2 A2LMn+kj58iRjcPUC6p8qAtra5RUO7txYE3dYZ9NqssUIapoxkyKkz2C+JNB9L+tDupN sEEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=IDQ8Q2+4; 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-59649-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59649-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com X-Forwarded-Encrypted: i=2; AJvYcCWamH/H928ofyAYS4X3lx37JQtzqzpOglqjlw2Kr6OSzkiueM1CnjhCdVEMGo3pRPAjbouAAMCwO2JqUY38OcVOZiZ63w== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e18-20020a17090ab39200b00296944d82c8si1122413pjr.151.2024.02.09.09.02.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 09:02:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59649-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=IDQ8Q2+4; 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-59649-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59649-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 CA241B249C5 for ; Fri, 9 Feb 2024 16:47:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB52612CD90; Fri, 9 Feb 2024 16:41:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="IDQ8Q2+4" Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 4BCA77BB05 for ; Fri, 9 Feb 2024 16:41:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707496881; cv=none; b=erqaSYt1WZHHvcx/5VCC2eJL6cn+uQMFo90AJgDtGgQM3P+EpCPuC5omATRT4klupK0XTIaIo41t8dfW+VJ/cnaRpidUCMv3jsyjYjymsl1ouE6nUAX1zDfNGoNM0DIygZOjXLSe/KnqJ7yh5Jj4VXUjQDTm6OZ/f5QEV5MXAD8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707496881; c=relaxed/simple; bh=vVaFOilpxLPhAvgW98K39yGa6ovKunon69GOcqaDBNE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=X8rWwEPFLCZ1j8yc2l6vd8xFkxfepMZCHeS9Tz2m/r4BUiZeEoKCebMzHUoywRjj23pqnKrWTJhY1fd6c1iFgqlAoviBukrr6ia4rRPsrRVyHMUMlopua64Evy/0kfJS6Z4CserFWpEJ2Jpd5jfgSdP435ctYhFLy+mzT3Xm3tE= 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=IDQ8Q2+4; arc=none smtp.client-ip=209.85.208.46 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-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-560c696ccffso3884833a12.1 for ; Fri, 09 Feb 2024 08:41:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1707496875; x=1708101675; 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=6RzTfSVvaxCQds+vfCIgTWL90cMKMfve56yUjlfe8no=; b=IDQ8Q2+4owy3M3itQpNSfbzJOPViCOgZCFx7bYnmYQkYHEQueXZn1OlKORby+O0EuL L/aq9ir7EYqe3PaXWN5mOulzZ3WrmEXwU6FALCyMBJTb+FZq9X+1fPNo9fDuZ1Fmi6CI 0t4i/eQf5uFQgbzQaxSOWnpbzGhy2WHALxCtJUsV8bHWqvpzW5MpsLWu5U/qQHElgz0S gpky89TZWE9gAwIxn89DqSFMP5Gn9ZvIc2rcrB6RdqPuX9FZdB8fNNTvrPW0KNraCW7B RwUjDuRpPJ2UN4ADjcvwCGTaqZaUoi/+/nn/di34yA09m4H/WK4DA3ys9kKZzCwG5cYl heGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707496875; x=1708101675; 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=6RzTfSVvaxCQds+vfCIgTWL90cMKMfve56yUjlfe8no=; b=CVqKNaQ22MxByK71TfxwKjLxVO+dIV/XPiUU4fJIK+WRdN3RD9MgfwSwoYgPDzBsxn flvyzHVKAF+BVS3dQCAb5JGTkdUZVZ4MlxSl553I63HR71d+0Xe+brgfP+chSYNle9WR HKNLktCP5vBwNV+730VWwT9Ak7b9W68IbO4+RhITM3Ywl8IW0OGYAinLRYfhrN4/+e11 aaS8xRmByjWN8sbwFY7WW+PQvMFqbwQmu6xDt7aGYUFW4+27r804xt3oonGmSh0COoW+ i79FNwKkelHnlZeZAk3fyQ0Tlo+Q+BYvCP8SlS1EQiw1eaB3Bb0Z962sRWZrX53CPmBu 4KRg== X-Gm-Message-State: AOJu0Yx5zCGz/eXIlXUHVaPtkwFvbIVRXvsNvdZXnMod7PD63zW3K5Hu /GTJm7eEbjq7cHCJrBImB+XJ+Giunkw4XR1t+0rEd3YKs+lkTShaw8KqjdrhcEXYRkYzwmRmulT P X-Received: by 2002:a17:906:1c4e:b0:a38:4340:60d3 with SMTP id l14-20020a1709061c4e00b00a38434060d3mr1429684ejg.10.1707496874787; Fri, 09 Feb 2024 08:41:14 -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 tl27-20020a170907c31b00b00a3bfe97fe27sm477724ejc.218.2024.02.09.08.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 08:41:14 -0800 (PST) From: Max Kellermann To: linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH v2 31/35] linux/kernel.h: move READ and WRITE to direction.h Date: Fri, 9 Feb 2024 17:40:23 +0100 Message-Id: <20240209164027.2582906-32-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240209164027.2582906-1-max.kellermann@ionos.com> References: <20240209164027.2582906-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: 1790441584596358875 X-GMAIL-MSGID: 1790441584596358875 Reducing dependencies on the header linux/kernel.h. Signed-off-by: Max Kellermann --- drivers/memstick/core/memstick.c | 1 + drivers/memstick/host/jmb38x_ms.c | 1 + drivers/memstick/host/r592.c | 1 + drivers/memstick/host/rtsx_pci_ms.c | 1 + drivers/memstick/host/rtsx_usb_ms.c | 1 + drivers/memstick/host/tifm_ms.c | 1 + fs/overlayfs/copy_up.c | 1 + include/linux/direction.h | 9 +++++++++ include/linux/kernel.h | 4 ---- include/linux/nd.h | 1 + include/linux/uio.h | 2 +- 11 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 include/linux/direction.h diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c index 7afc0132f512..e48ca1bdea66 100644 --- a/drivers/memstick/core/memstick.c +++ b/drivers/memstick/core/memstick.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c index 594f55b8cd11..0621121edb95 100644 --- a/drivers/memstick/host/jmb38x_ms.c +++ b/drivers/memstick/host/jmb38x_ms.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c index b941c8d02f7c..76a480de78d2 100644 --- a/drivers/memstick/host/r592.c +++ b/drivers/memstick/host/r592.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/memstick/host/rtsx_pci_ms.c b/drivers/memstick/host/rtsx_pci_ms.c index 15720a4afac2..4bd00d69a9b6 100644 --- a/drivers/memstick/host/rtsx_pci_ms.c +++ b/drivers/memstick/host/rtsx_pci_ms.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/memstick/host/rtsx_usb_ms.c b/drivers/memstick/host/rtsx_usb_ms.c index 29271ad4728a..eeebdde571e6 100644 --- a/drivers/memstick/host/rtsx_usb_ms.c +++ b/drivers/memstick/host/rtsx_usb_ms.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/memstick/host/tifm_ms.c b/drivers/memstick/host/tifm_ms.c index c272453670be..c46b6157aa25 100644 --- a/drivers/memstick/host/tifm_ms.c +++ b/drivers/memstick/host/tifm_ms.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index 6a861535ed38..7431a4b20081 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/direction.h b/include/linux/direction.h new file mode 100644 index 000000000000..78d70701579d --- /dev/null +++ b/include/linux/direction.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_DIRECTION_H +#define _LINUX_DIRECTION_H + +/* generic data direction definitions */ +#define READ 0 +#define WRITE 1 + +#endif diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 67662bdb17d0..5d088ce30045 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -39,10 +39,6 @@ #define STACK_MAGIC 0xdeadbeef -/* generic data direction definitions */ -#define READ 0 -#define WRITE 1 - #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) #define u64_to_user_ptr(x) ( \ diff --git a/include/linux/nd.h b/include/linux/nd.h index b9771ba1ef87..eb8e037d92c8 100644 --- a/include/linux/nd.h +++ b/include/linux/nd.h @@ -7,6 +7,7 @@ #include #include #include +#include // for READ, WRITE #include #include diff --git a/include/linux/uio.h b/include/linux/uio.h index bea9c89922d9..306b0fffe2a4 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -5,7 +5,7 @@ #ifndef __LINUX_UIO_H #define __LINUX_UIO_H -#include +#include // for READ, WRITE #include #include #include