Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp46023lqj; Thu, 11 Apr 2024 09:26:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU6QFW+UdERBBbyeMNg/ucefPSvN0jlcnQpSu5qFOl9Tnj2hvIhhUwkA+6gbUihQhcNY5KeMjvDk3Rg1eqQhL4AWvQwb18y8BN3DNdnIA== X-Google-Smtp-Source: AGHT+IGKTnvDvFRob3QZYzCXCs+IwQMpziWSRMSv0fEBdl0o3Gq0bcJiCB+1AAwFrIzsgmSBaAmc X-Received: by 2002:a05:6a20:3948:b0:1a3:b187:f261 with SMTP id r8-20020a056a20394800b001a3b187f261mr3962925pzg.29.1712852767064; Thu, 11 Apr 2024 09:26:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712852767; cv=pass; d=google.com; s=arc-20160816; b=z55zHgptEPH8vZ3VnxgcLV7NYmnCa85FrK4g+W86NObNiCoCVPrIFKGHE09iDsrL4s VKsubTLamYTQz4pGMrp2DsbP9e6PssY9MyyWURv5CwRHTMG+7jyer5V4v86lx/IYrqsF SCj61dFqLGIGyqxCXJBodOWXMe7iAuZt9LaG2f3hhwkfyOtCCeyzu9US+Rl6aJK/uAsO Fv8Al6qHq9YDBBrHVTOodZVNAkdWD189hUJv5m0XX1xccWgRdT/qqhRxt5MRjVsZ0+Hk yQtjMFRjL1X9CFNEdysR/21MjmnOzKhtCho2ambpf65taEMl8fjf+fMI5piN8qPnawsB ufvQ== 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=vMmAvR/fEaupoAUATuQL+LXaXxKdjFUmcU+pS5j3aQM=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=i1JWLz/Q5EPDV/LnX2yjkpzvXaqYEOBO58XPPW90ZD69YC4NwlecwFkMKcajeKjuwZ 3qbNpJQ8mxT1YOQYCxX1PNj/Xxr8IY8M/ASU6xg8xGTHlPBqM1ZT/0/KRbcGt+rTmBv8 DPVOyMKDNYToasAZ2JzKGsWSyo1hGPNX/dfzXlMzesihYwzCxODN9Ne+mjMrgkE0nsVe Bzx5ujFKDO2MAmwpvSRB5eMGYcmRi1P828XZvOjNEorizWOOW5Qy8b7voe7wL0ZkjAyh x9xOIURIhLrOxjX1+ALp1vXXrzK4Fv1s51leIjc5OfftnL8xMSe+3Mf8q5hj2VuZMAAg 60dQ==; 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=jfk00Jsz; 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-140958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140958-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 l9-20020a63ba49000000b005f073cdbc73si1496944pgu.473.2024.04.11.09.26.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 09:26:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140958-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=jfk00Jsz; 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-140958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140958-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 E5CB3287AD0 for ; Thu, 11 Apr 2024 16:21:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F1C51B7592; Thu, 11 Apr 2024 15:37:01 +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="jfk00Jsz" 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 53B7D1B680C for ; Thu, 11 Apr 2024 15:36:59 +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=1712849820; cv=none; b=FJa9AZp1XF4fDGo355Wre1g510FxJVq0cYy0LCUKpEVdS/lYoQ2m/cbvSZMKrk1AIcSSrhLemw33+kC62V7fFGJAn7dlNdlnkfl+0UtxlXOTBhy4IJRrBCFpj0r4JhdtXIle/lwaGmfklcV1BPfnKl0DsLabMT3KriJh1gDD9PM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849820; c=relaxed/simple; bh=O7lZ/hhLmBQ7iZ9zpUnKqu87tUwBAsVmNJtxcuJqXS0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VypCEdO3f0igdoN7obHKS2TpGXleRHxi/CbY1R+b7XLxL5fn1SNT57F8D9l/jgqfHIgI7td/H8sjc/Thpv/3DSBn+rhWNXRjbajcNahkk8/r8zSFLeRBr7/WZIlSHORWAAaQgwc0tEVv5FD6El8Tx+lLdxuFnBlJA+60PSiMzvE= 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=jfk00Jsz; 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-7d6812b37a6so8964339f.0 for ; Thu, 11 Apr 2024 08:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712849818; x=1713454618; 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=vMmAvR/fEaupoAUATuQL+LXaXxKdjFUmcU+pS5j3aQM=; b=jfk00JsztQkZ0oTR/ZugWu8mN1UfHQliO8Vz2ObkbQura8PdgaYcqvKeAnUhzpUv9o sNDFK3kHxs4B2SUaoM91mrjuA7ZlyreIjxP68nHWdDuMDGMzssIMi/oDVh6pQ9wqmIU5 dIf170V7dSVOggL/+9LxpU1wx3UlAOCTmHIDsC/9E+/lBQCZTmlcgblJV6JLHZD0AZ0w H93ZemfqAULMoXKI1C7c/RVYBE9jXUJA9itsINekT44FZ79NtXq9W4+vrFahdJo1g9+a Yja4cbOvjpyB8J+vugLL1SF/6XNG3chAgugTL+m6KQbmjGf3lGHJYhebW6cKsqpN2VAI 9K7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849818; x=1713454618; 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=vMmAvR/fEaupoAUATuQL+LXaXxKdjFUmcU+pS5j3aQM=; b=SDXFA0C7Al3GKxNy7i1PYq3BNVayyn95g8z0t5CN8aFrXhkR638b9OKmfXMjAjuVix kG5zD4frmD7+nE8ngUxr/WnSTohNW0KvJu6jtiSJ9V4YLm4+kzXRhYhsSiiluYU+/+Kb wlmgFGSw8hVt0b5T4vFGh17T92ek+r5Aak4QC0Z536CsdjE9RmKqqKA9R5y7GjAtAF+A PRe6WRQKQcLnRZ3jKSeehPOpUSVt+JN5cyIsyiXKeNl1wGOtISCVVZGh1JdoKYRsyNTk 9zDh8brh7a0UVwik2B5PEqNk9fHDT7exRewLfXjzZsrS6v3df1zFZSlSSwGUDiGxwHhS XvDw== X-Gm-Message-State: AOJu0YycPguTfX3Nh0vqeqIWaz2qufw/7CQUq1LlQvrBl85g/IweX4ef dZV7EkZK8YbAFLt9TIR9saLqpYBlPKkDONwxgSLSeKj8fVW4jN7vGR1T5QPDz1MJ8vUYFcKVEvO D X-Received: by 2002:a6b:5b10:0:b0:7d0:bd2b:43ba with SMTP id v16-20020a6b5b10000000b007d0bd2b43bamr223899ioh.0.1712849817966; Thu, 11 Apr 2024 08:36:57 -0700 (PDT) Received: from localhost.localdomain ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id jc25-20020a056638891900b0047f14b7f6c0sm457056jab.5.2024.04.11.08.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:36:57 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 190/437] scsi: megaraid: convert to read/write iterators Date: Thu, 11 Apr 2024 09:15:30 -0600 Message-ID: <20240411153126.16201-191-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/scsi/megaraid/megaraid_sas_debugfs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_debugfs.c b/drivers/scsi/megaraid/megaraid_sas_debugfs.c index c69760775efa..d0b8626eebd8 100644 --- a/drivers/scsi/megaraid/megaraid_sas_debugfs.c +++ b/drivers/scsi/megaraid/megaraid_sas_debugfs.c @@ -45,15 +45,14 @@ struct dentry *megasas_debugfs_root; static ssize_t -megasas_debugfs_read(struct file *filp, char __user *ubuf, size_t cnt, - loff_t *ppos) +megasas_debugfs_read(struct kiocb *iocb, struct iov_iter *to) { - struct megasas_debugfs_buffer *debug = filp->private_data; + struct megasas_debugfs_buffer *debug = iocb->ki_filp->private_data; if (!debug || !debug->buf) return 0; - return simple_read_from_buffer(ubuf, cnt, ppos, debug->buf, debug->len); + return simple_copy_to_iter(debug->buf, &iocb->ki_pos, debug->len, to); } static int @@ -92,7 +91,7 @@ megasas_debugfs_release(struct inode *inode, struct file *file) static const struct file_operations megasas_debugfs_raidmap_fops = { .owner = THIS_MODULE, .open = megasas_debugfs_raidmap_open, - .read = megasas_debugfs_read, + .read_iter = megasas_debugfs_read, .release = megasas_debugfs_release, }; -- 2.43.0