Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp52161lqj; Thu, 11 Apr 2024 09:35:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1tyeHHVbb3yB6xjE6WwCHlBfApHIm9rak1Au+WRXXQk+U3FTdeQm6ehZ2xadX6I+/y+2bT5dXXgSkuF1VjaVy/JwM1qbdJlwhRZRRcg== X-Google-Smtp-Source: AGHT+IEUusZJWZLs0nuLvLMWuHZwlOdEX7cmnPamKvnQUclft/Zw9nticDKMPT0+EXopdWo+brqt X-Received: by 2002:a50:ab18:0:b0:56d:faa2:789b with SMTP id s24-20020a50ab18000000b0056dfaa2789bmr163578edc.40.1712853308736; Thu, 11 Apr 2024 09:35:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712853308; cv=pass; d=google.com; s=arc-20160816; b=FOnyOCoPUmqfngUZlGFzamjq0v/N5ydHen0aToiNZfTl1NzdhJ3Ilxs5WFKKh33Tc4 my4/22tWpKrdYmBRHWy9i8Tgh6WeJvuT61cuNmwRHy0b0v5cdIHQhCiAbg8yAnrvHJni VCS1YQFs8nKSG9c960e7Ec7k0qi8bagu749Wmlwa0MG+j2RmBKoZh1DrNI4Lx3NNEZyp m4pzgW/rozjlVj0CYqkSfjajqx4F3yhs9bz/qxzXeA8LR/VDMygjEGNIAE/XNMGHbp3s 7RY+P3FhNQtxGZYRqqv/vuGiKI89SeZM6GwctzT/SafcfhJ5VVjOQ1ByxOqJEbDam3QO Kpig== 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=qdXV8ZsMH7zUbt3+z3Z9fZuxmHYAX1pvA/Y9quQEfus=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=beWVQk8gZLd8Di9kIa8o+nWbTo3JDQ2f5FIZIUORgOu85x2dn+FW3cs0JJSG6BrEj5 VFXKvCIZw63OaGU3sfeJOfGI+uRBjsqUTgy9qUfDVMSxtm8xn8ThIi1FItUxO5SvfKeu 4eU4dbwDTLWSCc3l0Zl3gEZG7RfSPU6oDiPt6h2NIlSFLqBKE9fWMxdifY/rSs35PL4v HUdWQHzg1KnSj1PVcdzrTEkCALxWdRjt4CREIkAgCkJ78K98y8LuiplkRsPlWDNrF4q9 snKJeXRJP5V1Jym1+Z49WuIym6za/8LokzoonMBfNVNFL3oK3d25wEIC6SYVFv2EIJOe mJeg==; 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=cBOCkMds; 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-141014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141014-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h28-20020a0564020e9c00b0056fde6d6b73si931278eda.631.2024.04.11.09.35.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 09:35:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=cBOCkMds; 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-141014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141014-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7AF211F21B8B for ; Thu, 11 Apr 2024 16:35:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34C8517D039; Thu, 11 Apr 2024 15:38:25 +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="cBOCkMds" 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 21B9C17D005 for ; Thu, 11 Apr 2024 15:38:22 +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=1712849904; cv=none; b=NRRO6C6fjU0Er4hoxf9grgofNd155G92bwU4ppKpCe5MyfvL4Y2Y5aBl9nU0Leh3KWKCdVkesgjEr2nyVHEjvZj52HPuqjgATEv6IYyqV8JDwYQQdPtgDk3Y1G+PoOko/obKhIY0oDsApz18LqzHeMg1mFUwdwgndshGMDxZ7LA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849904; c=relaxed/simple; bh=E2wx/0FL1TQR0BsAabiuUfktTaJ7onkJ24+tyDM+ewU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oW6Pxy9sNnAUO2zK0sIfjVSO4i0R6XDARDi4RAiMndvwQQf8BJDh+CrybZ/iH4+ZSTspyGuTP4XnFSSBeTvbsaKLCmN/IeBT6q2KqvpZm7ixqBMxqkZUZk4shAxafMDre3rd03drA2SLiO3Bw/5bBGlOSzB8nxNu+zkEVrluLzw= 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=cBOCkMds; 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-7d6812b37a6so8991939f.0 for ; Thu, 11 Apr 2024 08:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712849902; x=1713454702; 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=qdXV8ZsMH7zUbt3+z3Z9fZuxmHYAX1pvA/Y9quQEfus=; b=cBOCkMdsBOAcYmA6bitrpRVwtKBPwqSIB6WBeekRnbtnRqZUqmjvct2ECwB7nQ3dv9 4aUjWb2aQnqvds2IKjKw9Fhh2w7waSzgRO4SaIWjj+sKa4DoNQSa+lvO98kBOX45PuMB Em21HbW4/DULHz9Td9ZZZgZWUrq1jXKXWm9hd/JgQ+DaKEaBv633UZMN2ZiQ3hdx2y8Y tIbxSw5t/SiyVTUL9eI0lF61dac84RQBAY5oF3ulFlg7ahbqgBiiv7WGYpZFEMRPu721 P9vuxzXA8sFcbTJ1XMFUQEPLIuaVkY93sjy88sty9lrNxk7eS6nch1QaXHB9sGiVlIMc TbKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849902; x=1713454702; 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=qdXV8ZsMH7zUbt3+z3Z9fZuxmHYAX1pvA/Y9quQEfus=; b=c5fUEOP/d8pu01VHjZXty+uZsXlcqtZRq61VoMTD3+pRyVMIYfQVdgnAX57CyT8RWw Rx5dvFtqE2C4GVYXV3uQTiZ31VkO1GJ6MSQDBugulsl0F0rpZ7x0mOULJaMMyNL6qGvp l8X50+s4fqous7OFw0kXfqo/0olXcIOKnAr3QkFTVynphuHF3mlVgB2HyVCl31K8zeBD WYO9U3JL778SxzAd04hfTIA0U2s0Yxlt2v8lgbBKQTzy1DaWu7znl1767Ak1S1CLgSJe IUB9cdHAM9ljuovpXile3H76/sVFOb2Vz8BKcbre2v0mdQCpnVdA1TB1cUj2seiglznn pNXA== X-Gm-Message-State: AOJu0YydmK6trUVDvQxpDYkA8sF+0ddwZfkfRVBY+3AtxlCPudpa/Efu hcJcvgIA4B0sF1krg7feGsR+l4xNWztW7KnTtZ8zuVv64JuIPu+SS3KAs9BM2G/WTFNbOgbGLiI j X-Received: by 2002:a92:2912:0:b0:36a:f9aa:5757 with SMTP id l18-20020a922912000000b0036af9aa5757mr3588463ilg.2.1712849900494; Thu, 11 Apr 2024 08:38:20 -0700 (PDT) Received: from localhost.localdomain ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id jc25-20020a056638891900b0047f14b7f6c0sm457056jab.5.2024.04.11.08.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:38:19 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 240/437] watchdog: geodewdt: convert to read/write iterators Date: Thu, 11 Apr 2024 09:16:20 -0600 Message-ID: <20240411153126.16201-241-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/watchdog/geodewdt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/geodewdt.c b/drivers/watchdog/geodewdt.c index 5186c37ad451..2a0c904536d9 100644 --- a/drivers/watchdog/geodewdt.c +++ b/drivers/watchdog/geodewdt.c @@ -108,9 +108,9 @@ static int geodewdt_release(struct inode *inode, struct file *file) return 0; } -static ssize_t geodewdt_write(struct file *file, const char __user *data, - size_t len, loff_t *ppos) +static ssize_t geodewdt_write(struct kiocb *iocb, struct iov_iter *from) { + size_t len = iov_iter_count(from); if (len) { if (!nowayout) { size_t i; @@ -119,7 +119,7 @@ static ssize_t geodewdt_write(struct file *file, const char __user *data, for (i = 0; i != len; i++) { char c; - if (get_user(c, data + i)) + if (get_iter(c, from)) return -EFAULT; if (c == 'V') @@ -197,7 +197,7 @@ static long geodewdt_ioctl(struct file *file, unsigned int cmd, static const struct file_operations geodewdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, - .write = geodewdt_write, + .write_iter = geodewdt_write, .unlocked_ioctl = geodewdt_ioctl, .compat_ioctl = compat_ptr_ioctl, .open = geodewdt_open, -- 2.43.0