Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp47614lqj; Thu, 11 Apr 2024 09:28:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUr1YBHcxlTQ+A9PSQJ30KECin+xMJopgRP0GUIk/ENIE7PW+fGriSHjAKmQ13/ePdqqRs0LimD2Jo8jqUvd2eSFQRLtinqxscyXkgbUg== X-Google-Smtp-Source: AGHT+IELwtqL7RyInG8x7HmGCOG1x2u9e7aJHqvlZdywcZOSrDxQeG+1Yczg3sz0FRPy6QAfyOjv X-Received: by 2002:a17:903:230d:b0:1e1:1791:3681 with SMTP id d13-20020a170903230d00b001e117913681mr6799996plh.61.1712852914021; Thu, 11 Apr 2024 09:28:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712852914; cv=pass; d=google.com; s=arc-20160816; b=klPCfxJZKHmd7HzomvJkbh/L4lJFsp3K3wHK/pzRy/bds679mJGwQkyfOgbIREe43T Gvk32ENQcp0EiTtzE78ZNMY6Q4iLh2jdmb2NEEznl33LfKln1lmZLxOVgpr0K/Zt0rnV HD/79szOKNqbYKSRBwc33tU+mtHpPUxWxS5oAb5N+6199ImUfo9ZBJPC5EVbIPCnOmIk kdMgxTecQkSRTitjujcYZhM9JyNVhfqiqYTIxDFcu2oYaBqWV989t5grfMKx1mmjRcF3 7H6w7vWaqcqCx//8XR6Dortpb8pIFxqzF7Qym1l5Q4jXvz/rChAQ6e0hbJCg86sM5ivB T/mQ== 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=LWEn5iB1LmcjEiy1XdfAmvuMK+L+7s2BzBG5cbasvDQ=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=WsdrFhpZQr0aXLRbByzr3dDavK2DukhPeuGy7udaio0XVoQY4OKgVgZWSSOyOjNrS9 b4oO+oZvk/s8OHl9NxCDApwQ2JQHH6W15PQbC9Sz94D+DwRVCNA1lHmfn/sreM5QQeBa UJJ0wToRw5gK1MDJ1NhUNPAYlx0eZlfv16pIaPFuNdHL2HNIWC4DWELvc+dWDuveopcP J3zaOa1shVsoxamdZaBvkTXpmhEt3X6daFwfh83zxdpE5DEkCNBHiO0QnLXub28bBOrV 9v610YjNLgZxDCNGRWuZNYPctNVqgKXI9FIJoet4XjQj/mLGxJQbjiFD1p2vgyBEoABM 6bpQ==; 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=ppxdMzeM; 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-140972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140972-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n7-20020a170902f60700b001e2abe09daesi1523952plg.303.2024.04.11.09.28.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 09:28:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=ppxdMzeM; 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-140972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140972-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0F048280A0B for ; Thu, 11 Apr 2024 16:24:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E120539AF8; Thu, 11 Apr 2024 15:37:22 +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="ppxdMzeM" 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 BFE6817AD89 for ; Thu, 11 Apr 2024 15:37:20 +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=1712849842; cv=none; b=T8NIx6072hbbu4ZUWvwoubdJMgb2Pc8VGh7ctt8SD2XF3OSQrXw56bqMST19J/lhEszDasySZYkYfH919I8LnUrLZJj2jjPuR4c30x17VCAx6myUeUik9q0E7KdZgY+KI0oTqAE7wuZ7Mb/yv+2LcfNnpQP4l42jrjh4KGhtgmw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849842; c=relaxed/simple; bh=e2gTwFqCtDrY3UJAn9H2Bhmoo5CFknNWcQ48BCmUjKY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XGvIReiL7KSnauqaTn28MNHMsgDGcZhmPcdfIOxKDBWysmw0Y+o78vJUhHlMvQX/Bm7u8O5/T/jrs1cyxbyk/wvd17y4l5suLVv+GwZsfIvVR7HuSuuYSJxVKLq7BWFOewTdR7yrMk1YeeAnb8jOn0iw85cSXNU+vIbYAZm8iTo= 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=ppxdMzeM; 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-7d6812b37a6so8971939f.0 for ; Thu, 11 Apr 2024 08:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712849839; x=1713454639; 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=LWEn5iB1LmcjEiy1XdfAmvuMK+L+7s2BzBG5cbasvDQ=; b=ppxdMzeM6PVeL/AjRTCAj/Dn7PELly2hlKdjyW4a8BMH13UmuiqQ0EZbwY4zwjj/bz 5u7s0W+eMleHKpm3SFkxIY/9XBzzOcJI9JjkN5amckOY/WXzTgRh437YWHiTSOMkPmWL Ac/IplO1rHQgCv/bkDZQf5n6gwxKVfxLOgXNTd+BAfLZuUguj9nN7fuu6w2rcUdMRqPL hiVDzLc4F7CR8weCtnbw81WZsUDxnHYro9QwL09xpH4D/uVuLJZN1BfzzHnqSHHQMtwB 6jQq3vETn1wlpUkhRC9eO+SHxHEMxO1OinaRI/UAeA8330AOnWkZNHYE02+kQBgX9fBs gmQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849839; x=1713454639; 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=LWEn5iB1LmcjEiy1XdfAmvuMK+L+7s2BzBG5cbasvDQ=; b=aNNfvzT99ZNjEC9/COYDhgYt8TdJGZ7bgpEH/QGSirxZ8jF0a9kHOtWACHEB2mAgn7 Wofn9tavq8a7Ln3VWP2ByjrfabTh8Fs8cPtH0U1c47K0DC3M0sWV0xNp05MWjXx2LhR5 jBRV+r6y1Y23gNLB6hbh4nUBiInfJjhm9d2yfB/qRrk3ve3pyMzfUmBgsy5XWjAUbpsa dnRdJmfrHhyMdIngP5HP2WJl34VEuf3p3qmhAiVXLO2zpqMdIpLClQ3SrDg3q86sHNEw r+C3paH6vHtHpMHWrhdHmgGZ70RAWBdFev+UECN/lcBU/rxApmVYGHS2Jmgs93ASOOy2 IOjw== X-Gm-Message-State: AOJu0YyuiX87Qr9eMMyIb622hjRYWXPq6wChil3EBCIiPNeUUatyGtB8 dUsUK5n50RsYetf9r2QYs0VkpRORoX3ZkKrmb+UkVIMlKUvp6+4CIWFkOlMli9N0dEI4ya88oWB z X-Received: by 2002:a92:d352:0:b0:36a:1275:4aeb with SMTP id a18-20020a92d352000000b0036a12754aebmr5885227ilh.1.1712849839682; Thu, 11 Apr 2024 08:37:19 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:37:18 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 203/437] staging: av7110: convert to read/write iterators Date: Thu, 11 Apr 2024 09:15:43 -0600 Message-ID: <20240411153126.16201-204-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/media/av7110/av7110_av.c | 6 ++++-- drivers/staging/media/av7110/av7110_ca.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/av7110/av7110_av.c b/drivers/staging/media/av7110/av7110_av.c index 00dd6a7fea64..eb3ad2eae2d0 100644 --- a/drivers/staging/media/av7110/av7110_av.c +++ b/drivers/staging/media/av7110/av7110_av.c @@ -974,6 +974,7 @@ static ssize_t dvb_video_write(struct file *file, const char __user *buf, else return dvb_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 1); } +FOPS_WRITE_ITER_HELPER(dvb_video_write); static __poll_t dvb_audio_poll(struct file *file, poll_table *wait) { @@ -1015,6 +1016,7 @@ static ssize_t dvb_audio_write(struct file *file, const char __user *buf, else return dvb_aplay(av7110, buf, count, file->f_flags & O_NONBLOCK, 0); } +FOPS_WRITE_ITER_HELPER(dvb_audio_write); static u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00 }; @@ -1572,7 +1574,7 @@ static int dvb_audio_release(struct inode *inode, struct file *file) static const struct file_operations dvb_video_fops = { .owner = THIS_MODULE, - .write = dvb_video_write, + .write_iter = dvb_video_write_iter, .unlocked_ioctl = dvb_generic_ioctl, .compat_ioctl = dvb_generic_ioctl, .open = dvb_video_open, @@ -1592,7 +1594,7 @@ static struct dvb_device dvbdev_video = { static const struct file_operations dvb_audio_fops = { .owner = THIS_MODULE, - .write = dvb_audio_write, + .write_iter = dvb_audio_write_iter, .unlocked_ioctl = dvb_generic_ioctl, .compat_ioctl = dvb_generic_ioctl, .open = dvb_audio_open, diff --git a/drivers/staging/media/av7110/av7110_ca.c b/drivers/staging/media/av7110/av7110_ca.c index c1338e074a3d..6b9c90562228 100644 --- a/drivers/staging/media/av7110/av7110_ca.c +++ b/drivers/staging/media/av7110/av7110_ca.c @@ -327,6 +327,7 @@ static ssize_t dvb_ca_write(struct file *file, const char __user *buf, dprintk(8, "av7110:%p\n",av7110); return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos); } +FOPS_WRITE_ITER_HELPER(dvb_ca_write); static ssize_t dvb_ca_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) @@ -337,11 +338,12 @@ static ssize_t dvb_ca_read(struct file *file, char __user *buf, dprintk(8, "av7110:%p\n",av7110); return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos); } +FOPS_READ_ITER_HELPER(dvb_ca_read); static const struct file_operations dvb_ca_fops = { .owner = THIS_MODULE, - .read = dvb_ca_read, - .write = dvb_ca_write, + .read_iter = dvb_ca_read_iter, + .write_iter = dvb_ca_write_iter, .unlocked_ioctl = dvb_generic_ioctl, .open = dvb_ca_open, .release = dvb_generic_release, -- 2.43.0