Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp55211lqj; Thu, 11 Apr 2024 09:40:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWb4pO+MgfK1k33VaZcBAjGJp4mD6UrKDd7NEOJLCP0BNccy94cCAihgYx74QA/xnU0E7qkP4Mhr1hZCFWWwmrgYIaXOCfNTeFdPmSn4Q== X-Google-Smtp-Source: AGHT+IGnmmdLPOXcC7Lm6YXSZeAsTvMoVc25T9zFeyhym4KwmKNumtdQjnWCOgpzYFswZLaMZ8TB X-Received: by 2002:ac8:5891:0:b0:436:4f33:a9d with SMTP id t17-20020ac85891000000b004364f330a9dmr220337qta.20.1712853601113; Thu, 11 Apr 2024 09:40:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712853601; cv=pass; d=google.com; s=arc-20160816; b=0amNlmMmfC5k3b5nDZ9e9hGAxr6xmpSx/tvmzRpYINAqo8z8VvhKFV3MiOfIFdnzhT w2/rL5nFa/FNBqqf168MilHp4rEqW7j5dj580/Po7t+GfEJepU0Q82tqNsV7waSHWyVJ Ciz4UlDV0eh/iBLyOs0718cNL1da0bQP+ew/R7YdHPjKv0pNll43KAxi+z2c4iSA6MNM uLtzsgYVdabCULRDmb8igsoAEPJqhj5fK8dq1wWKsU5PEh/peqVdGWZqAOtaXT0FUnX4 RtvuvPYeS5k/OzsuFX6koepkB7Crzdvh4owcFLjayLP/fcltu6r3b8J9DXE6KLT6g9pd SoEg== 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=ugjaLLgj3DqyxTYX0rLANZyd9K+HJWGaprm3UVS6Ptk=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=bxquv52evyz9kMA7eqWo17RWT+WecXwSsQxjDTy5FB0fmMlXfbTMjR575hs9TF40Sv AjwvLvFpz6V+rF0eFqmu4xnHWa6Xbucca+qrX9+lYXn0XCIQKip5GILC3rMT7kqUMOpw qidYBu2VPaSw4O2t75VCxu50fv5/BQEiUlH9VGQdMLpR2M+d2ArpGVVuCadoyeJuVLG1 VQay6BKpqofKK/bMVhq4iAKWKxX/L1AzFl41KSZ4SE11gnqhvSGY1jfTl7TXiN7b6Y/G jLoMFUjhigPH1Owb9xLgyVoyDC1KRTgAM1aOWHJb1kYcsICqs6sxPZV+bMB5+TPJZVJG 5cUg==; 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=ptijERZZ; 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-141035-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141035-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o25-20020ac841d9000000b00434bc32aaebsi1676610qtm.441.2024.04.11.09.40.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 09:40:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141035-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=ptijERZZ; 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-141035-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141035-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D32EF1C21EC5 for ; Thu, 11 Apr 2024 16:40:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E47F1CCF1F; Thu, 11 Apr 2024 15:38:59 +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="ptijERZZ" 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 625BA1CCEE9 for ; Thu, 11 Apr 2024 15:38:57 +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=1712849938; cv=none; b=WmIqQbbTBBScAyNzSa8D33oSuF4esfeE4g2CfAwnA1QdkX3hHsfGo138RA3qWjRpf2Lbeq5Hlklh8k9eO8R6zguL+61AGWx5NkycRBbmlpZkq64ZevDOm5wmNvFqCOrVtVaX+st+y/D3B176IJXRLz/j8BqOi/SZ3Gptf81pfVA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849938; c=relaxed/simple; bh=uz1UIVkUObBVPUP9l685tSTHjPvXyiUur4zY67F/rRo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=L6ZRWMiqirBnmWAWn6sJXgQ6PPd3uz+DQlfnNziBXZE0BTURb77gho9HYOpvOD825+yj0pLli3Rx7A3fGiDvz2zsinceseZy7VNR6tUaSfSTCdm8SXyJYGtvBJ3/I6r03TmKbArghHj1XaKtwmBAa7wcR0awG766GRiH8vx5hb8= 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=ptijERZZ; 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-7d6812b37a6so9004539f.0 for ; Thu, 11 Apr 2024 08:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712849936; x=1713454736; 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=ugjaLLgj3DqyxTYX0rLANZyd9K+HJWGaprm3UVS6Ptk=; b=ptijERZZ+hNLqe7LeHiB8K1IT+KyBGs9RBTsV7aZ1doEdSBNPMhFA3PWOOe3hsB7aO lzFWYEdlJ8t/pNRhEMzrpnPP6HV/xTvYvDN8kTg3wdNon8a8EW/M2X8hZVLa1DLDgyzO yaXqLqhUrDRLekoFiLpdCjZFKIlh0+mbAARWuR2apfJbVGMdh2nd+Pquvho+++4Aztzy XnO4LE8PP4ujqRcMm4ZEqFvhX99Uhubo4imMQ050O9sL0/GL+t9Dq9WfNxPEncFb7fDU W0ls6EtkH2HZGHtmFNnWNwDZWCjC48mkfARmaqEsGzzPVXMznTKq9+tGh8ouAhCMGpZQ LDOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849936; x=1713454736; 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=ugjaLLgj3DqyxTYX0rLANZyd9K+HJWGaprm3UVS6Ptk=; b=BGUXwFO67qOUY4BHMCvsVGSkFtXyGUfSIVPP9MFSJnIF85qJtUDbEgY1kj/zNuMWMM b76g2Tc4CFvNDl4fXZcR2yFr0bCKIGjRPVViRDRsR7pkFvSEG2aXo3hrrtuz6XjB/yIW XOBNQTXe+jrojuw7cuKRTvENtdLHwIm2DdmI/h/YZ7Taw86An1YyjddUAwTkqRPi7e1X fH0uNnVzZgYPuTzYHfagTYElzm02vxWAKTHm8rdN7SU11BIvMao7hQxA4d4H/l4JMduB I/esc155pT9V2JmM4wQ93JmiMNMoq5+TcGgHl8p5Smb5Bh9ev0VfM6nrI2TEN5lEN71K oetg== X-Gm-Message-State: AOJu0Ywp+pTw8Nvu01+l19JaBZ1PpKfO0ToFSn8doc8xuzZLXlhkys9v DcDMQog+WcsxLs7NmFGVNU493xfO2U0YK3bSrWiH5MrOV4KptgGqgBvgxKDGRQ31H9zHmexywGC N X-Received: by 2002:a5e:9907:0:b0:7d6:751f:192 with SMTP id t7-20020a5e9907000000b007d6751f0192mr188442ioj.2.1712849936220; Thu, 11 Apr 2024 08:38:56 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:38:54 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 261/437] watchdog: wafer5823wdt: convert to read/write iterators Date: Thu, 11 Apr 2024 09:16:41 -0600 Message-ID: <20240411153126.16201-262-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/wafer5823wdt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/wafer5823wdt.c b/drivers/watchdog/wafer5823wdt.c index a8a1ed215e1e..64d6317f058f 100644 --- a/drivers/watchdog/wafer5823wdt.c +++ b/drivers/watchdog/wafer5823wdt.c @@ -91,9 +91,9 @@ static void wafwdt_stop(void) inb_p(wdt_stop); } -static ssize_t wafwdt_write(struct file *file, const char __user *buf, - size_t count, loff_t *ppos) +static ssize_t wafwdt_write(struct kiocb *iocb, struct iov_iter *from) { + size_t count = iov_iter_count(from); /* See if we got the magic character 'V' and reload the timer */ if (count) { if (!nowayout) { @@ -106,7 +106,7 @@ static ssize_t wafwdt_write(struct file *file, const char __user *buf, character */ for (i = 0; i != count; i++) { char c; - if (get_user(c, buf + i)) + if (get_iter(c, from)) return -EFAULT; if (c == 'V') expect_close = 42; @@ -228,7 +228,7 @@ static int wafwdt_notify_sys(struct notifier_block *this, unsigned long code, static const struct file_operations wafwdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, - .write = wafwdt_write, + .write_iter = wafwdt_write, .unlocked_ioctl = wafwdt_ioctl, .compat_ioctl = compat_ptr_ioctl, .open = wafwdt_open, -- 2.43.0