Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp78162lqj; Thu, 11 Apr 2024 10:15:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJ4gVwHRg39uZ8WDMkxYuTyN56l8vrJvkXspMu5m1OcRN1uaGimcJwS4HPJr1qTbbqQSbXiGRmypho6Y4hH416vlwaN+Il1txu5vttXw== X-Google-Smtp-Source: AGHT+IGrteFLiqdl/PBhAQ3LMQ/pQuX+7wJu/c0Pq2fDh1iegPCJPhb9WAXP9lACU/0T5w0xMXpy X-Received: by 2002:a05:6e02:1fe3:b0:36a:23dd:bdac with SMTP id dt3-20020a056e021fe300b0036a23ddbdacmr139884ilb.24.1712855724416; Thu, 11 Apr 2024 10:15:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712855724; cv=pass; d=google.com; s=arc-20160816; b=TmWMB5RoRslAr1sIH7dTWRn37lqcY71xXWXitrSPiEqbjX0B6Hs1+bTn0o00jRTM75 OJAyIUKjjUl1Ad5jpVvincYP1ONIcUObzpdxBY3A/01HjEUpamijB/QmVG5yJ5tsgIZH /oHVCs7+aJXDimb1eDwZjWb1Mckkesoj8QOu7+wM+C+qOfiS6Nl8fdwLFNGEusQPQUq2 ouLP1aMjeeHdUtCdFv0ViUQjblptEzO00wAaa0n6nSzyCHyhHWOccjf3nXEbvRCc7/5G v2ej2SENNJsGmxwZ+NJRedkBGQrN4a6vHXb1MxbZqshDtmVu/BhYvMJRvIURk/wJQ0Aw QuSA== 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=tHg/3S6NbCQ02OFZAWNiLhmvhUCnFDNl1Jg+mlY3jqs=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=V7Z86gKJxMXWUCRIcUvm2Dzu0cvuoHqqnHze02IAzVh1jWEmNEup692J8TEbnZKdNi V55LFUHyo+iczcPjS4exg8lDUAWqW+zJNvcDViC016aCkLfgTqh14XajTWRDapGAsuJh CSuXznYhs0CcFjt8ydOY85eeqcR9CGRqwmwoHzOO7uEIypI57rnSmKmHcpgEk7ebEg1H oiDj2QHpvtOvYhoStE+AxK7C8IXhiXm10ACcChuSP9a2QID7F5Uf3Y5hYw+GkuAnlIrM j0Iy+gr/XAH9Ev8lzbHBE4S08To3/0zr/2GxjdrCRZ11/P9c4IzWx5V5zeLa6xt8qQsB XWdw==; 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=owFm2kNH; 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-141137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141137-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 s2-20020a632c02000000b005dc229b6778si1586294pgs.14.2024.04.11.10.15.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 10:15:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141137-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=owFm2kNH; 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-141137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141137-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 24F4C28C84D for ; Thu, 11 Apr 2024 17:02:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 745B31ECE6E; Thu, 11 Apr 2024 15:41:44 +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="owFm2kNH" Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (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 7616F51C21 for ; Thu, 11 Apr 2024 15:41:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712850103; cv=none; b=cpBZxtCYgMKp/cLkH1dNO4z0dIGMPqFBhxkMeNPuUE9/btE3GZYt6EBAqVYRRWrz8CIxCPollM79kGH8KvXy/g8Sv9N3TznNAkTS682i8hQYyo8VIZYF6j8UZj2P4R4e4Q4lkJyiPFWRQupPnU87tM5v+HeiYydCrMs8cEjNOek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712850103; c=relaxed/simple; bh=ojbnloJYVO4ehK8CMeeqy7PmCoHDvIpXm4TvHz9u5Ks=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=byjO/j/UcPnNktdMxMVa1tFanEpAYaY0emy94hXmscILfTs5r8DHxrFCCTidsShQzd68csPDiadpo4XJPTurITAWv6BtDe9avwvLOoYyVOrRHbomg7yFkk/6+MKR08DNa0mrTgel7IiewI7N+mRyAsleBLduv7QwAE0MvV/36x0= 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=owFm2kNH; arc=none smtp.client-ip=209.85.166.50 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-f50.google.com with SMTP id ca18e2360f4ac-7d67d1073easo9917739f.0 for ; Thu, 11 Apr 2024 08:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712850100; x=1713454900; 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=tHg/3S6NbCQ02OFZAWNiLhmvhUCnFDNl1Jg+mlY3jqs=; b=owFm2kNHo2C3gw5H5LbunGtn21+FJrkEJpyadxXq56ElQuqe/gRGKZpr7UAdToHkl/ oXLOB4XQGMqr5VUa5Go6PkKkmHIDrLErK+FOuTwnwND2R34+BrhW15PlvwR25fhaAtEi NxdrC0j91Qu4FjhKMk98+M1/F3IRZfX4tRxfBQADiDJVq7aQ/4xHII2P7skm0W/jNBtZ ZuOpkzZ5LdjnucYetUy55/7I0VZHR6SpkLuEgm+Up4KHlyp0Q2k9ViVohWMIz2ksYlvZ SjMU7JiFwgFwvBxeiMWBPaZDNlEOPgq6D8jCyLUeJs92SDXpDs5XA2daV2Fy1t+52d6i 4u1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712850100; x=1713454900; 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=tHg/3S6NbCQ02OFZAWNiLhmvhUCnFDNl1Jg+mlY3jqs=; b=VDAu1Tsuj+CJl5ssXQgyCPvUnuwkCigVhTYgMacIyVvf911wqax467x9/pA6dPR3FK 4cTCUzC/JTvnT/V4TKDgxthgjyrgl/27poaihwbMPhwSwYrQGStOef+F5UYlzVUxC6qc TPa27DF3A2AeUrr8QtXV9+38syLzuGC6HkwtfU2mbrAhI/sXP9GkSFWJuT2Hd5i4CVGo HEik6jon0IWykzjCP3FdN9WZWfS3dC0+fF9vC+/1vSTjwH+BAvDHBylIYkXayAcFPmnR EZ/Wokne+dzOitD/OIZ/1FOzpwxhdd3p6NfYJMfGlCizECzld+dDjCKtoTyWmRYT9m57 878Q== X-Gm-Message-State: AOJu0YzEtj5b0PAdSVrQwP+e5164zlT1kb8emLFz1QMWxCR+a3yDUH2C ws0hWor4At+YdL6EAsXQHvQWP/Vms5FGyIgAaO9/UY0nieDjhR1+GaxDGH55AgwjnnjykdVoswc G X-Received: by 2002:a6b:c34e:0:b0:7d6:7b7c:8257 with SMTP id t75-20020a6bc34e000000b007d67b7c8257mr234266iof.0.1712850100112; Thu, 11 Apr 2024 08:41:40 -0700 (PDT) Received: from localhost.localdomain ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id jc25-20020a056638891900b0047f14b7f6c0sm457056jab.5.2024.04.11.08.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:41:39 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 358/437] hwmon: fschmd: convert to read/write iterators Date: Thu, 11 Apr 2024 09:18:18 -0600 Message-ID: <20240411153126.16201-359-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/hwmon/fschmd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c index b30512a705a7..896a073811a0 100644 --- a/drivers/hwmon/fschmd.c +++ b/drivers/hwmon/fschmd.c @@ -848,11 +848,11 @@ static int watchdog_release(struct inode *inode, struct file *filp) return 0; } -static ssize_t watchdog_write(struct file *filp, const char __user *buf, - size_t count, loff_t *offset) +static ssize_t watchdog_write(struct kiocb *iocb, struct iov_iter *from) { int ret; - struct fschmd_data *data = filp->private_data; + struct fschmd_data *data = iocb->ki_filp->private_data; + size_t count = iov_iter_count(from); if (count) { if (!nowayout) { @@ -863,7 +863,7 @@ static ssize_t watchdog_write(struct file *filp, const char __user *buf, for (i = 0; i != count; i++) { char c; - if (get_user(c, buf + i)) + if (get_iter(c, from)) return -EFAULT; if (c == 'V') data->watchdog_expect_close = 1; @@ -951,7 +951,7 @@ static const struct file_operations watchdog_fops = { .llseek = no_llseek, .open = watchdog_open, .release = watchdog_release, - .write = watchdog_write, + .write_iter = watchdog_write, .unlocked_ioctl = watchdog_ioctl, .compat_ioctl = compat_ptr_ioctl, }; -- 2.43.0