Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp48421lqj; Thu, 11 Apr 2024 09:29:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUOYWlGrYKnxw6C20eAbIyiySkPk/HBxlNFWJstSGtKpb1++6kOTvN9S4sVijXEKTDkfgr6LurfY5zIQf6YdpYCVAmkb7HhC+0lUXbRTw== X-Google-Smtp-Source: AGHT+IEYENKmnMd9Md2CzMSKWqkC8YFRlt4FViEGssompdDo6PURPdrw0d5oJELVOFV4pvxcOhtC X-Received: by 2002:a17:903:1ce:b0:1e2:bdfa:9c17 with SMTP id e14-20020a17090301ce00b001e2bdfa9c17mr7046823plh.54.1712852994249; Thu, 11 Apr 2024 09:29:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712852994; cv=pass; d=google.com; s=arc-20160816; b=R+8BvTWRbUX1a1vkfgMVMjloFr6c42DiEv3DFG1D8Y+WkwvQ0ukvPWjZktJbBjCGl4 IMsfAxpK7KEhKuZ/CY216CCoIyEo8unX8P9CIewqeMm0kUdoEpn1XkN+iACanmptV7cs xIbZSO6SQG+eumdMDDcJ+2MHEWZGULoLoch5qMlQDXigdVNZbAbMjAVUk7D23vXWo/qq tuZuVp8nondo+5VJa8Ti7UZNFCv9pzJ5F2Bu0vjDrmX2vByBvBrz0JjeSdtT6A5i8dAo EGwzH7oR9GAVzogD++6jdXCygDuGvxBv+d/MJiDISub2H8to4qqxVNqHfM54AAPMuhmh O49w== 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=nnCvDuWCdqbx45susY4lKXAhNpbfLhWCqwRwbKGo0sM=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=HFVwSuIWmq9NlfvgBV363QvtUVY9Leo+YoVo7jy0tD0z+KvWbCcWo2kVEtC55RxIYQ tUZgOKCJGaAJTroZ6UkVd77Yh/ypW4hfEVPE6ln3iwIlMoT6kzqOgkZcS49eD8U3nFtm vxCR0OT201Kav22m5pFBF8PgyQ3/EH/h52p+Adl7bV478LZ/UpZoKnOvcRWaTZYel14L SK39K4MMP6TqayMM5mmxq10VuhMNK+C+YCNQiQTVaBpOZNKyvqNxU7kKP6DnaVIXY+AC /OXu/4lH5pTRgme9PSiMqUa6C9GQPi0aEubrUDVeZnaNc7DaPWgrjqh1LhN/uHW3Fw1m CaoQ==; 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=j3hkh06g; 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-140981-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140981-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a18-20020a170902b59200b001ddbab57f3dsi1493471pls.234.2024.04.11.09.29.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 09:29:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140981-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=j3hkh06g; 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-140981-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140981-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 65711282BCD for ; Thu, 11 Apr 2024 16:26:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7EFE882498; Thu, 11 Apr 2024 15:37:36 +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="j3hkh06g" Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (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 6B7543BBC7 for ; Thu, 11 Apr 2024 15:37:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849855; cv=none; b=Lx4MJ8v4/h9A+AbznfRKFPjfblVbDoLu23PoN/Mf5hdvIJuE6KgfxiGO99wXa2x7x7foZZ2Mvy1vYKAwi8FDd5t2AC8n7vcVdW7hseFv2LI4i/YsMIS0OvQzFFZxe/OwI0avS70SZyjCUsbc7MzGUV2lxpwNadoDrX02BLdCYE8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849855; c=relaxed/simple; bh=Jj/NcxDqsb3ke7CqA5w00fJhJUeMhJsECJ2fjtlkHS0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n9UC9AUO8JowJiSOELuknWLpwatsNGL0qI4mfoWk63Nfw9NLOHqshFUHz1+hpEusRu91ujBUN/ZUCv8qUOWKQVTKLBiXCF+DwCAdbzo3/1tycA5oM1soGOoNhlpKB8G3/f2mUx5Bm9KYSQlCKJt8uvDPgIxx2VXmWDdLNFTDbEU= 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=j3hkh06g; arc=none smtp.client-ip=209.85.166.45 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-f45.google.com with SMTP id ca18e2360f4ac-7d6812b37a6so8975039f.0 for ; Thu, 11 Apr 2024 08:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712849853; x=1713454653; 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=nnCvDuWCdqbx45susY4lKXAhNpbfLhWCqwRwbKGo0sM=; b=j3hkh06gB1K16vvNeTGw35z4a4FteMe8rQBdc1aCAr2HaSM2JolvR3Zn3QySJdRIM3 FroRnDJPlzr8s63o6Ye8ujfdxPGz3sE1gExYQlepRgrOLu29S6Bg9i+jQTPXnuVo+pcG FCNSYky3VJvRljPjdpdBJUpum0GDGcyg/FIPHmqPJlfeqagEiOiT3Dp+3uQydlyGsBaM F/haa/BdY3hkpu4veaCtBg6piyt8nBu2a3dO3JTdc9GlTq4tWbsz9yg/bcPruELfm5qc sfqa4sjJ59C9PrHJ7ab5bffSA7pe9NeEL8EcxidOblSUGap1AS4QrMGOAwYLXu+yFewp k7zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849853; x=1713454653; 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=nnCvDuWCdqbx45susY4lKXAhNpbfLhWCqwRwbKGo0sM=; b=lUDB8C8LmIwOMbLqp67gweZYdkiJyJI3QYiwWazpDHutcPv68IRKZM06cdiKHpg8gB HLDSH+YX5jMXDtg1oOfVZVo3myE8V24T8O7+NHVK+L54AU110YwUjHPzziVSQz1K9qsj LocBOy3WmP2bjSFXLE5TdcstN2CySMwjbM2o9VxFv3Fnizn5ekG7yKfWSeHIgi11XLxI 9VtsKyD7OOcy8VB29KuRpQ2AFTKag7BPKU4mdJWmErR+bZBCN57+S6M5DZq1UNpoF1Zq QFALgS4v23XHmwysspkA9X9TSm5XIPgFHSEGlsRLF56MchoYQFw9pcE/gn4PRd04oxTE TTxg== X-Gm-Message-State: AOJu0Yy02OLeXH+am4a+VrTTAkcfYayCoTW2bqqYuLOVbblyO+gNgopm 8++BcaqQzxlr4bz8HVk3CP0cwhMI+dNBHdOfNecwIkzVpiUSY78hKvQiERXIewEBa7rAnuHRxTy X X-Received: by 2002:a05:6602:21d7:b0:7d6:9ddf:5095 with SMTP id c23-20020a05660221d700b007d69ddf5095mr19999ioc.1.1712849853069; Thu, 11 Apr 2024 08:37:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:37:32 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 211/437] drivers/iommu: convert omap to read/write iterators Date: Thu, 11 Apr 2024 09:15:51 -0600 Message-ID: <20240411153126.16201-212-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/iommu/omap-iommu-debug.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/omap-iommu-debug.c b/drivers/iommu/omap-iommu-debug.c index 259f65291d90..46798b7584b5 100644 --- a/drivers/iommu/omap-iommu-debug.c +++ b/drivers/iommu/omap-iommu-debug.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -80,10 +81,10 @@ static ssize_t omap_iommu_dump_ctx(struct omap_iommu *obj, char *buf, return bytes; } -static ssize_t debug_read_regs(struct file *file, char __user *userbuf, - size_t count, loff_t *ppos) +static ssize_t debug_read_regs(struct kiocb *iocb, struct iov_iter *to) { - struct omap_iommu *obj = file->private_data; + struct omap_iommu *obj = iocb->ki_filp->private_data; + size_t count = iov_iter_count(to); char *p, *buf; ssize_t bytes; @@ -100,7 +101,7 @@ static ssize_t debug_read_regs(struct file *file, char __user *userbuf, bytes = omap_iommu_dump_ctx(obj, p, count); if (bytes < 0) goto err; - bytes = simple_read_from_buffer(userbuf, count, ppos, buf, bytes); + bytes = simple_copy_to_iter(buf, &iocb->ki_pos, bytes, to); err: mutex_unlock(&iommu_debug_lock); @@ -231,7 +232,7 @@ static int pagetable_show(struct seq_file *s, void *data) #define DEBUG_FOPS_RO(name) \ static const struct file_operations name##_fops = { \ .open = simple_open, \ - .read = debug_read_##name, \ + .read_iter = debug_read_##name, \ .llseek = generic_file_llseek, \ } -- 2.43.0