Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp91037lqj; Thu, 11 Apr 2024 10:38:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWhPPkJ6naQpCbH0lKvWDe4TwtGB+gWUiWjMVxRXtjplz8Lhv/17PYyf7fBbltuvNNjXi/8MnUHOcTWh7tkKgmHJ0+YlbpmvaqHuDt/1A== X-Google-Smtp-Source: AGHT+IGJRBr9qwbm2Lix+yTjGfixZQK9GQl4V0adsZrvVbZ0agoumD/lvlm/XuL32Uzm4jb7C9Iz X-Received: by 2002:a05:6a21:6711:b0:1a9:9f8e:70af with SMTP id wh17-20020a056a21671100b001a99f8e70afmr158269pzb.33.1712857082834; Thu, 11 Apr 2024 10:38:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712857082; cv=pass; d=google.com; s=arc-20160816; b=Z5FBEza6hLbICORsSLR2cGdwT/mYjUCchJTMPuABuOXXqYMpksvY4fKB79WHriDLOz OW28LnaWamYcaGibJsX3d+NMdg8ptYxElUfNfavtXAZ6pCB0VToX1G3PR2sJq3+TVd2B 6fQagDSWfHzbKRG1kSFPerXyK1Xi6R1agZN0xUr6jLK2w1y8UhoGA3xlsqCYWro/Mk9u E5N+HdL0DaMqA2gN62qJ5tna2MOUwW8AJSPdJREoHpL+PyshLNMf398gXCDOdEJnWct9 vJTewJqxkAIkLslUWy1sJxLbTX52YjTDHUoRjcYjWI/RaEYzXx40AhIzqqZTY+cGqPO0 wyKw== 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=QUwnBOIHWTDqxRA7ju6azON0mNBRNg9CJwY1xMY9Hh4=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=Ouv5QmoT2nAwo4Y/zMrMvcUKU+k1JbH8tdfc9wBfIQBa2jY7m+ddUtNnMzXqfIPVQK RNJzSrsXNwAEhU0wukVio8l4cQ0cyFX2GGSMfzaDWPWzjoSqmBm57jzcoOalv3M0rTtj hVPrhiessgnhYy5200rT4d29moD8lOenJyMvs7/fxGBI8h92M6+W9Mvv2Bo0/5fmtL63 15RykEXMzWCm9oAFZw7roiYGMEQWMxuqfNAEUP73fudQe8mhhwnY8gY1RXLCQH3FSUR5 KBdth8fwqfb4j5UE/fTQSaE/nTmA4gpLVyjJ4MD8Ag8DpEWpVv09IPGrQvQHbkUGJJI1 vY5A==; 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=xh+7a57D; 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-141138-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141138-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id r28-20020a63515c000000b005dc875b87ddsi1622185pgl.223.2024.04.11.10.38.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 10:38:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141138-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=xh+7a57D; 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-141138-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141138-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0FF94B21379 for ; Thu, 11 Apr 2024 17:02:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 071871ECE7D; Thu, 11 Apr 2024 15:41:45 +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="xh+7a57D" Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (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 06755167A55 for ; Thu, 11 Apr 2024 15:41:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712850104; cv=none; b=bniRaiE55w47ulP/XZBfYvWCushB7odzvmfcccsSWEZMWuG3txT5h4dhHO6YQMZrDqOTQuud7XVcbShhLz1w0uTj8i4XLqSdzY8M/Blz2ZS/6h3MNqHKcHQ3gSJ+TOR1op7VsJ6ylzR13OsiR5QeTvjVCta+42p6QcX8OqrpNHY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712850104; c=relaxed/simple; bh=EU0m+GYx750B5TEfB114nPOm0jKAAEysLyRXLk1OWKE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AHuB87BfW8GpjgbBg4d6gfA79HeF7rN0W9T0oEYmz/7aJmg/h7aj+h+ETDDuts5CPt3DoCDsRjvaBk2uGqTOwv4YP2EyNN8G4cVPH6z92nGEW2zt/P8gPkpYDT0+4ZjouJSCkyxXnD+RM0ni1c6nYy/8KTGYq1tQQfP2MK5DhoY= 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=xh+7a57D; arc=none smtp.client-ip=209.85.166.42 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-f42.google.com with SMTP id ca18e2360f4ac-7cc0e831e11so170635639f.1 for ; Thu, 11 Apr 2024 08:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712850102; x=1713454902; 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=QUwnBOIHWTDqxRA7ju6azON0mNBRNg9CJwY1xMY9Hh4=; b=xh+7a57DDm7wRyS95LT3a+SC1utocvGcUn8/pnGzm3QSosmq47L5g/Oi6/ULmh2SzB b9vTyeDOUOxHIDF6VW3CtnVg2BCkHbBDrK7VnTiUU6FB5YZrplf+V/8EbAukolr2/BI+ f5B2OT9yoyRCfoZem9gKWBjvbPvUmq4i6TJLPxn8W3H20sMcrC1YHdgnYJpQLcqJDjk8 ffBBVEcIjzTfg4KvID00cukRjt/ABrpZ2+2AHjR40+CWDOUb6670iIfQ5otWFb4frqMb 0Id+lizfpZsJVFwVTzqpDHZVM8rczgnc4LwC5AVsQ2h/WLuT+o580kx7OdpP4fKKqfqn IOLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712850102; x=1713454902; 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=QUwnBOIHWTDqxRA7ju6azON0mNBRNg9CJwY1xMY9Hh4=; b=d2CYnB9A53M8p1OatWmJo1AkUMRncuAGctt8kMV4xYXAGwGQ685bxKnO5GOL2Ug6NW Xm1MSPsQ1Xm1BRuaPPT7XIT31IgNtICFzXuCWzGcfJeTNsrJ67epaXum5zFbQQvzQt/Y 5SqKfs5pDAV0SS9Ef1sUFpGf9X0kJ8W7K2tHA9AiG1DOQ5VCQbdJKXW9uBpMtK9+2qvU DN0Wx945KWTW/NYD0dReuiRdvT7klL32Z3NWG5Z2Nf4AqWZS0epT4S+2HZ0eLAXdtLBz F5wzW9tbd8aDAyTLjcdzBM5eV5/oILmaGjzcvfxjqn5KP3BZrz5ATtHGh+0Z4LLp5LxN Xe9g== X-Gm-Message-State: AOJu0Ywtk/J2x8OPuRYw+4+iD9NIiCiBm4kZzUjIKs9WoU26xNamO1YP +wJv9vK9/XhrE+R9KQVkC6MTOi7y2roNh9y8xUjjwzdCsCwq9a9rhI3tpBxpUW2hiNr+eJZ0tF5 c X-Received: by 2002:a6b:5b10:0:b0:7d0:bd2b:43ba with SMTP id v16-20020a6b5b10000000b007d0bd2b43bamr236714ioh.0.1712850102076; Thu, 11 Apr 2024 08:41:42 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:41:40 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 359/437] hwmon: w83793: convert to read/write iterators Date: Thu, 11 Apr 2024 09:18:19 -0600 Message-ID: <20240411153126.16201-360-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/w83793.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c index 96bab94ba899..7594fc588112 100644 --- a/drivers/hwmon/w83793.c +++ b/drivers/hwmon/w83793.c @@ -1352,11 +1352,11 @@ static int watchdog_close(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) { ssize_t ret; - struct w83793_data *data = filp->private_data; + struct w83793_data *data = iocb->ki_filp->private_data; + size_t count = iov_iter_count(from); if (count) { if (!nowayout) { @@ -1367,7 +1367,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; @@ -1454,7 +1454,7 @@ static const struct file_operations watchdog_fops = { .llseek = no_llseek, .open = watchdog_open, .release = watchdog_close, - .write = watchdog_write, + .write_iter = watchdog_write, .unlocked_ioctl = watchdog_ioctl, .compat_ioctl = compat_ptr_ioctl, }; -- 2.43.0