Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp44962lqj; Thu, 11 Apr 2024 09:24:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWszxXPQy2UWdtnZZLxHnxzhI+fHGARbkG/vouI70IJuGBSWM8U7HpzGsA2wFHZL3IHXsmA4BwnFSZLLOL5y2KxMgkxzTxRodvRJg8TdA== X-Google-Smtp-Source: AGHT+IEuNSiCOVKCWAnhOOkTFFKdvTfk9Hsablx4QikyHTgTBAKp9//4gGIRQtqOBz08GhtGg5sd X-Received: by 2002:a05:622a:489:b0:436:71c6:af5a with SMTP id p9-20020a05622a048900b0043671c6af5amr164001qtx.20.1712852669156; Thu, 11 Apr 2024 09:24:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712852669; cv=pass; d=google.com; s=arc-20160816; b=sPpPNKcYj9YoZNbE7lZkwFUSBGwo9pLsL707W4MqJR3Sk+tEWUe095qlB3BhP/Zux8 OJVApWe/GjkX7MQIz7hSsvdV+YjCJFYGq5Hj/JregVAXDdLFjUj+9vR889nmZAhw31xZ NEA+hgispK7czN/m/OLUBBAzctOva2BjrIVLFNcz5//TzOT70lzH8Sf9k70GhbU1YvLm 9ni7+Ew7nyit5a0MpdV4GPZ3tzbYYpTIfvxrTv/MKVk5x2oBfP7TNLdLoi/WIcMpi9pu 6DfXC/KD/hm8SIcX5d02bswzqLc+9VFkXU8mnfBpjXNFJOHrfzAQr/4Mn6mIqltAYyYj w0uw== 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=CJHWZ8kVRf9wEcPJrG9reH4bITaufD9pcVT3oPpa9tY=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=tEhpFmWauQaMoBnol/X5REknHQGjc/1S92aqhePztzLEy3k6Xqvq9he8OCz8w1euRq UX6GoSXm6KDVKLB6adSyT4OJD3rdBpcDKvIHYeFkMobLSat62ZYZC44cgFJKLuIkj2gp ZWxPcn+50eUbiJzjB9aDz4W2GoDo76y27Zp0x2uwxi46Nr8CF7FJqQvOliepV3wTUwR0 895x2zY6X8p3Y9UVIIfxGlnHbmx+G6455b3+A8/Q7L6zkC2RhXba4/mtF6Boi9thZGjY /M74rLnqDn6FE9blLmQXedTID8/ZPKmYLHrqLmP35NQJVMom6E47tM6XmxgmgVOCIfMg rjOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=1c20Vr7i; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-140970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140970-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g20-20020ac85814000000b004349d8579d6si1854219qtg.709.2024.04.11.09.24.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 09:24:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=1c20Vr7i; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-140970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140970-linux.lists.archive=gmail.com@vger.kernel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C5D6B1C21134 for ; Thu, 11 Apr 2024 16:24:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7ACBB17AD78; Thu, 11 Apr 2024 15:37:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="1c20Vr7i" Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) (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 73FAD1BAA95 for ; Thu, 11 Apr 2024 15:37:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849838; cv=none; b=EOyBNh3/vv+UtUvfwMZ1lkEc9Oj+uWSWwEy7bbs1GwRFG/C2JfUAu4K3LMg0ZtA0halOG8YUODiRgwn0SOwjqsG9etv00FIViXH7fw6Vat+DxHy6BGEYFov006ElPW1GJZjBLF3G7ZLhvomXeJU/YxrQk1xTnI2aivRfv6gTyEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849838; c=relaxed/simple; bh=hzeGJuqsCNENJiQjtg2MffEahLh9ZmQ/4D1HGjsIBj0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FEORkqNUFDYvtEbvIzVDaq2ZE5TdCLWv3/kK+kTCRdVu31uzWlxKlx42uLllq1ct7SYlYVRfeisazpmvzEtNdVrwIk5UOHoEIFF+Vd+tyCkpoBhZ5fhN2N7UClfD2KCm4NUkflgzp+nxcpjK5M7nnBHv9Tnn3YchRM2qfM9LXmk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=1c20Vr7i; arc=none smtp.client-ip=209.85.166.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Received: by mail-io1-f48.google.com with SMTP id ca18e2360f4ac-7cc0e831e11so170538939f.1 for ; Thu, 11 Apr 2024 08:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712849836; x=1713454636; 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=CJHWZ8kVRf9wEcPJrG9reH4bITaufD9pcVT3oPpa9tY=; b=1c20Vr7iHeouKXDLeCgGs4o/O/T1HqrqfZcoMW6vHuOqgg6hxOEjtW4C2+k0FtGI86 0u99I9HYAFxClGkXOKoR/oaPSsCT4yUuYi5ue+3++t0CYpNZ6E56N7qQouW9lgv5LLzV 7fiFSdwc268W9Cpq6Y2iY3zFmoz9rhE8mw/NybjaN/V2RH0DMBmsbjGYJuMD1vcCj7l9 lRfDtuPqrgg9I3Gq1qTM8GINT3VRGYHWigliEimCLeo68E1nwu8pIfRcNcLPvhQhM1OG NDLiIfam4UiUgNpbBbkuwwInlwIUqdkswdq0bQD1A3sOXGwVjN8cxthqO+suIpM4eG0O i8zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849836; x=1713454636; 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=CJHWZ8kVRf9wEcPJrG9reH4bITaufD9pcVT3oPpa9tY=; b=M3EqWWkNIteIO9/Y3gTLStQ82nS8S9WnczEaac+eeG2uotT9zKGMnE/fr9zBx6avmp 54blJwaiLH2DJ1rKR/k9dEcgdOX5uRfJjhWZGcwjMR93zUALJGJ2T/AGMb0BtsDARS1Q dz+LCv4dS79vo6RGE72MJuJX7Q756vqReqrs3kISjkIhAYOrzQ1W1701KMYXNQpFSNxK ArWm8X5XwnEtzrcOFgMFa2o/xWgl8G/jp2ObBkPQageGZiRKwNWlLrmouY9pp4OtEwV/ shfd+12rcwz50+1v1Jrzhv//Q9+96KXGD6gyMrOjTJogKVWii56EYUjUjd0T8E13I7+D 5p+g== X-Gm-Message-State: AOJu0YzsAALXzsg3qoyufEHwaAuaHuS2dnbRTnfPGuvdbNsux5bW+ENL WdSTa3VdzTiXJLl0pYX85s0DerzdmQGYNsHG9xK9cEFeSlFYyLUAHSfFyG3j+MGnjAOPu3q1HfE o X-Received: by 2002:a5e:9907:0:b0:7d6:751f:192 with SMTP id t7-20020a5e9907000000b007d6751f0192mr183380ioj.2.1712849836257; Thu, 11 Apr 2024 08:37:16 -0700 (PDT) Received: from localhost.localdomain ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id jc25-20020a056638891900b0047f14b7f6c0sm457056jab.5.2024.04.11.08.37.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:37:15 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 201/437] staging: fieldbus: convert to read/write iterators Date: Thu, 11 Apr 2024 09:15:41 -0600 Message-ID: <20240411153126.16201-202-axboe@kernel.dk> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240411153126.16201-1-axboe@kernel.dk> References: <20240411153126.16201-1-axboe@kernel.dk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Signed-off-by: Jens Axboe --- drivers/staging/fieldbus/dev_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fieldbus/dev_core.c b/drivers/staging/fieldbus/dev_core.c index 0053ebd91442..4a9e211640db 100644 --- a/drivers/staging/fieldbus/dev_core.c +++ b/drivers/staging/fieldbus/dev_core.c @@ -194,6 +194,7 @@ static ssize_t fieldbus_read(struct file *filp, char __user *buf, size_t size, of->dc_event = fbdev->dc_event; return fbdev->read_area(fbdev, buf, size, offset); } +FOPS_READ_ITER_HELPER(fieldbus_read); static ssize_t fieldbus_write(struct file *filp, const char __user *buf, size_t size, loff_t *offset) @@ -203,6 +204,7 @@ static ssize_t fieldbus_write(struct file *filp, const char __user *buf, return fbdev->write_area(fbdev, buf, size, offset); } +FOPS_WRITE_ITER_HELPER(fieldbus_write); static __poll_t fieldbus_poll(struct file *filp, poll_table *wait) { @@ -220,8 +222,8 @@ static __poll_t fieldbus_poll(struct file *filp, poll_table *wait) static const struct file_operations fieldbus_fops = { .open = fieldbus_open, .release = fieldbus_release, - .read = fieldbus_read, - .write = fieldbus_write, + .read_iter = fieldbus_read_iter, + .write_iter = fieldbus_write_iter, .poll = fieldbus_poll, .llseek = generic_file_llseek, .owner = THIS_MODULE, -- 2.43.0