Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp46515lqj; Thu, 11 Apr 2024 09:26:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/VGZM9Y0M5fAsTQZ4Lf9Angc7MJQmxhyMaEi75xTe72GoVl6UUicK2b/VALViZgdP7UsPBLAS++Tk16UHgymQQa0RKxrMJrpC75mg+g== X-Google-Smtp-Source: AGHT+IEcw/T3en7UzQfUdZmi51eadi/a5crkTrJyKzkYRSgdk80H6J9/yenkx4a4Z/iSRN568Jlz X-Received: by 2002:a05:6a21:7899:b0:1a8:4276:670c with SMTP id bf25-20020a056a21789900b001a84276670cmr385055pzc.17.1712852815218; Thu, 11 Apr 2024 09:26:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712852815; cv=pass; d=google.com; s=arc-20160816; b=QPGx+Tuji8jFg3PjG6X3rrlSwoDOM5zHONTSE9CoAnSuwNW4f3Vbx+ntqugJaxbBi3 d/YSHSXJlgiJi6Xx0Pkb15hnpb1B4TA1Zhet/j4tVNTdfAOFx5Tyhocd/oL5TJ4DtlR/ YwjwZe5r8LKXQLxiScf7TEuv15sxH57O+qWHKs7P49Aq2YCQeaezDASDHIC3fVFVxg/c RtDKOMBQwLVxmLT0reDtFKgw1/4m1RacSpMggTvPHvfQKpKZs+KoCJ/QjtOFVKhkHA22 pf2VZpPQYShCnJrDZ/lTHskDM8gCyHWpAwEiMp4Mylu1AXhMws1EYZeW13XCx/azjz7v ZDAw== 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=HWDh0fHrNKhYTff7Upo8ZcOWFWy4jGjf0GUm5p1uDg8=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=sZdnXq96zgiLRVUkBhXnddA1cRwVk5KMp6zdob6Y/nTYrj6jm//gyfwYZE4LwdcUM3 Q677mciOyBUYoNQvCM7V89y1/aA4w+i+Gyf46NHWTvnJtOFDOkuNJiY3G9sxPK5fIzBG NoZXe/THIAA+l0d76PPkH2xlpaHfm8e2EcAvII7KhEPvqqFsS3lfrsYTy11KNEE77ReJ gMI+CW8DGM0gcec5jaLcTSQZ9vrXmXOm9NoOAhK2pop7vI+6LQK7CILR5QI917yPwccA mvAkwQqe3LFFSTBXqT0GlJd2hdvfyrpmt+NmPemMg1u5dIHwlv3I1fJhnxgeLnr2wWqM KDWw==; 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=k3j01mFG; 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-140963-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140963-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 d5-20020a630e05000000b005f41aef11c5si1455533pgl.528.2024.04.11.09.26.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 09:26:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140963-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=k3j01mFG; 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-140963-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140963-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 F13162857D7 for ; Thu, 11 Apr 2024 16:22:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A0BB3DABE9; Thu, 11 Apr 2024 15:37:07 +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="k3j01mFG" Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.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 5CF8A1B8339 for ; Thu, 11 Apr 2024 15:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849826; cv=none; b=nQG17EnwLyvHjjMRyItHZMDjTpRfSEdhyC7Qr+Wr7Z9RmGGL5F5wTB+ji+FxjlLVwMcWDeDNN5vO0m6/Ah5qPsyE6F6wOV570ez5Vx8jur/D5/b8IJnai92IAjLp4vcvTGZKEMm6MpBDH5voJ5Hcv28JLVLVwSlad6PHB8ll47s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849826; c=relaxed/simple; bh=wAyhkeiT98OgDYnfb1/0TlRUPJy9U3NtVZbm/6cnRGk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rQWAXU0gCb27/OEU43qiUeNQe/vYMadU8qBuZMVbL9Q2/akr6lazHUggNuskJoMWwZsgmboja+/dwkMqRk2ZM4mOtoHpN7mY+xAOps4ZDoSAH/8VfYwJSSSsUSnX2uQYFojNwJfmfSbIVWl3iS3OkwVGObpLQNBCnOVLf5fO2VE= 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=k3j01mFG; arc=none smtp.client-ip=209.85.166.46 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-f46.google.com with SMTP id ca18e2360f4ac-7d67d1073easo9809239f.0 for ; Thu, 11 Apr 2024 08:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712849824; x=1713454624; 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=HWDh0fHrNKhYTff7Upo8ZcOWFWy4jGjf0GUm5p1uDg8=; b=k3j01mFGH+Umvif35nE/BlrnWm2l6kMOMzkmwpTT11bGx+o0laCkSucFSfLlZr0LHG gxjS74WzCfigIcpyM91hpOMXMcfJ/nMVzLddCRU+6xQhRnvIngRJ7qIFT6T4AdcOdDZj CnZCXvgZqpzx6RS4q31e5M5MQuS8044bzfpow6Eiqzq+pzyjTzHzrPjKL6W8Ap8UE8xl vXb1Hu9M/rXZUCs4mkx+cchoRCQkdvGXmAgd+0sJojNxwviH7xugWctU+wpBb9F9izgg YMlx2hWDHFH9B4hg0KENMopLETHfNzJELWvQEP6j8PpZvBaG4PujTgWZqEgpEaVZCa6n Uwiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849824; x=1713454624; 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=HWDh0fHrNKhYTff7Upo8ZcOWFWy4jGjf0GUm5p1uDg8=; b=CuKF/VZQibJ1ssuY/pvMyVqeChqqWUhX/LhTSaNkWS3n/8HpOQCgEImMlucQ9i6FGB Vp7LX6MKQBwv3/zFzWXKAirqUHmb41mhzbtzpBp75SaZiw8PaVtuUGxe1fESiVpAqTt5 q3zAN14cnIaTtTnccJmQBWU2slHgZYjRr5lHwZmZj2RMv7eJmMyPdi0FxBMuFFYIY0Dr rjiIjK17JWYE9Er+TMqRTFRQtSfN8TTL63S0RTqYQfZtHeS2S5+jwxeKemQ1I4P3x4Qa czaf504MVdPn6eyOcwEi/5mH/ZwiAH2o1NKLC1bohkfeEAwxxSqLBDedVjFxWni5V0dS EgwQ== X-Gm-Message-State: AOJu0YwzpPN+CYY8m7RDjOATw2Yf2Y9VuFtda+CBdkAv8oAmTqokVw13 StFf8kLXh9f94I45BOpZEYB9BOHRwOLskyD9YyhGLpe2SP1MhIXVxU8sEeXgTCnGfqQo6qJ7Glh Y X-Received: by 2002:a92:de01:0:b0:36a:cf8:3fe6 with SMTP id x1-20020a92de01000000b0036a0cf83fe6mr5774650ilm.1.1712849824297; Thu, 11 Apr 2024 08:37:04 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:37:02 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 194/437] scsi: qla2xxx: convert to read/write iterators Date: Thu, 11 Apr 2024 09:15:34 -0600 Message-ID: <20240411153126.16201-195-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/qla2xxx/qla_dfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_dfs.c b/drivers/scsi/qla2xxx/qla_dfs.c index 55ff3d7482b3..6aacdb5c65aa 100644 --- a/drivers/scsi/qla2xxx/qla_dfs.c +++ b/drivers/scsi/qla2xxx/qla_dfs.c @@ -490,7 +490,7 @@ qla2x00_dfs_fce_release(struct inode *inode, struct file *file) static const struct file_operations dfs_fce_ops = { .open = qla2x00_dfs_fce_open, - .read = seq_read, + .read_iter = seq_read_iter, .llseek = seq_lseek, .release = qla2x00_dfs_fce_release, }; @@ -569,13 +569,13 @@ qla_dfs_naqp_show(struct seq_file *s, void *unused) } \ } while (0) -static ssize_t -qla_dfs_naqp_write(struct file *file, const char __user *buffer, - size_t count, loff_t *pos) +static ssize_t qla_dfs_naqp_write_iter(struct kiocb *iocb, + struct iov_iter *from) { - struct seq_file *s = file->private_data; + struct seq_file *s = iocb->ki_filp->private_data; struct scsi_qla_host *vha = s->private; struct qla_hw_data *ha = vha->hw; + size_t count = iov_iter_count(from); char *buf; int rc = 0; unsigned long num_act_qp; @@ -591,7 +591,7 @@ qla_dfs_naqp_write(struct file *file, const char __user *buffer, vha->host_no); return -EINVAL; } - buf = memdup_user_nul(buffer, count); + buf = iterdup_nul(from, count); if (IS_ERR(buf)) { pr_err("host%ld: fail to copy user buffer.", vha->host_no); -- 2.43.0