Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp69680lqj; Thu, 11 Apr 2024 10:03:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXOXB0ddW8vNzLQvZhlJvZL6xBZm76nirRylk/P9rGV97RlpBevwNXWvgZcdcdRShHsXXbs3tyCcdAtohdtBgS5MLkl6IGtyxdMqNoecA== X-Google-Smtp-Source: AGHT+IFIpsr0mZbD5t5bJsTVhJVucEXmKaAw5wMdy/KqRHLNpVv1p4tVAEGy4Y3GS4/I5+k8hKfy X-Received: by 2002:a17:90b:418e:b0:2a5:d979:8eb2 with SMTP id hh14-20020a17090b418e00b002a5d9798eb2mr145920pjb.19.1712854999760; Thu, 11 Apr 2024 10:03:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712854999; cv=pass; d=google.com; s=arc-20160816; b=gaWNdvviI98gWb/nrwu59obYB9O3g3tpOdNlO2kk0qrj2b6TA0LeEgWsnyNEjJ68KR v66U5MTH/Wldyl65LUxOOBrCQKuq2Yh7w7vWYCphpnA07JUBkYmVnfxBd1SmjKRAI0Wy 165Jl6eN8AdMFV0iH8GMnXOU5n2fFPpmFvRVWdXP1pPJMCzC/hHoTG7Ojax/y6s6HCxs UojqrWlFaFKEEa8W9P0eZXkxrCOcTYHps5s9oDuu2/zNwz9tK17VlmBEgXxb+sgBdCoQ eRm8JQO/YknNfNuv9oOCqjn9aBgoczWHmOKmltmS7I1lxIPsXGvUmdiYNfKYLe/27PDi Tjuw== 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=+wBNOT3qBs3L+vPl85zEaCnmdS1VUYoqA6qMqegfI90=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=c5+skLtk3nLU34cX0shyDRW+R0EjMB1pLJvBnnoQ+6CCniPyQIOdrOULNXrJ3mNli9 Bpje5VbHj5Yo+LsBsTnqWUalyVdLWdP1moO0kpo/IX80N0ni47SNsk5NUlTAwClG2jE7 gSJPW4w8XPLcHYRJP0Sfq8LCh1nLSPsz26U653NxDXH8Rd1eeI27uVQwGvd4mlA53Qy9 MDlQalB/uVLiwhTM5q56jm+6UUwkv8yOIIpnO572OaRDyKh81HJQ8Ka1NhVBNI7hiqrj N1c6sRbOw9eKWdlL5okICsA1+Iq3GGl+Gk/ooLsatlBJytnfU1yhUV5sPOgKKDdmdv6g 9w2A==; 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="l/6us2eA"; 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-141018-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141018-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 np4-20020a17090b4c4400b002a08f48bbadsi3959614pjb.21.2024.04.11.10.03.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 10:03:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141018-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="l/6us2eA"; 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-141018-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141018-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 3C889B300DC for ; Thu, 11 Apr 2024 16:36:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 935251C7894; Thu, 11 Apr 2024 15:38:31 +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="l/6us2eA" Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (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 76F441C6614 for ; Thu, 11 Apr 2024 15:38:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849910; cv=none; b=iHJAGSmOt9loMg3EmG1YNKJd6M6qFxssSY301uLXREY0V00dHpcShlMwzomGvUlVse5ovcu2RJQkK3jegfegobY0vdtwD1uqM0laP3qNP2AQw3fgzLwkh4+SJRmHSwI8p1vH5Cy4aq5fdj5mZf2o79bo3eR3+gX1gbjqzIRCtlU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849910; c=relaxed/simple; bh=+IwXRNokeWhuKQAbLUvjR7gXm5aqUPimPCYVp+GDpH0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d3r27vlCwIY0qeOIUF8Qcjcxx9eBIscvxxNUkCIE0NZelQVpnSBe6GlV2tViqEfXwQdQg+rZ780oOtW/mxdNFk9j6OT10eLsbIHS7ZgKXjXAfRIChUIysOo4SPofKMOfIYa//kqw/ijRkIxDEnDmeUEFD8PRanBDDbpJAV+YhJI= 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=l/6us2eA; arc=none smtp.client-ip=209.85.166.54 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-f54.google.com with SMTP id ca18e2360f4ac-7d5ed700c2dso16197739f.0 for ; Thu, 11 Apr 2024 08:38:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712849908; x=1713454708; 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=+wBNOT3qBs3L+vPl85zEaCnmdS1VUYoqA6qMqegfI90=; b=l/6us2eATqk53WQ76S6+qcXtvHXbhNVv7QpFVxgZEhLSj1UAncR58rijRR3QCPUjgK LDd5QU+PcZZrIdLMKqxgVlpMx9UeBXPb4e/c00uC6RfU0rVLPPX7+rJd7kRBm3EIbrKy OmYUH/zOskFHtDh7r7auZ0m27DFDgbQKV++YyYDgjG7VEj14PqCCvclEKcnM0V5SszV9 pvauRhC+nm98OdCVD9vpXIh7iYPsjz3kbgaai60cZkkrepUPkSw+3DMoCtzdfGMqwvsg XTwriL1iFTZVyE4ayHP25yCqtWD7FDYaPnH8KhGPEyYgo38G4O7vncxiyoiHTi9wn0rd DsQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849908; x=1713454708; 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=+wBNOT3qBs3L+vPl85zEaCnmdS1VUYoqA6qMqegfI90=; b=GhFN6wWA2ZuhIuppuyqDnjyoVtvhgkf49EGIN3+T1MzZhLCbXRBMkvsqWcwfXPVTDI DsxBKMBG3S+piioKMVF0Z34y33pZkKP3dDJ72ilB580uXMhBiLdt/oBCG432TLsBwwWp bytsW8Lv/rQuOL7U5qIPEeo3gTO06xKBsrLDPODYdW4XIamx9LdlaXJM6u3SahV4TsnF WP07Nu+bgLUwsNjtLiAzViRsPTbPQiWklW0J/LHKeKOE5X0P8YybCRV/mzLA4+1L4mLs hGRwkSW2lTsVTuFvCE4kaetxtzYVAWU6oS0hXsfgnBw7fwFfrjLQL6GFdtPovydsxRDy 90rw== X-Gm-Message-State: AOJu0Yz817U6NGZXRNeXSUhrdfkEmmDHMRI3LwLQ6fDjn7y9dxUMg1hu Z+7Y9HG8impvUfzjPM1tXv/X8y3YKqmMrtC+zMs10qUa9KOmNUuVGIDgkcNB6apYwl/4Ol3Ruxu x X-Received: by 2002:a05:6602:38d:b0:7d6:513b:254 with SMTP id f13-20020a056602038d00b007d6513b0254mr192183iov.2.1712849908351; Thu, 11 Apr 2024 08:38:28 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:38:27 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 245/437] watchdog: mei_wdt: convert to read/write iterators Date: Thu, 11 Apr 2024 09:16:25 -0600 Message-ID: <20240411153126.16201-246-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/mei_wdt.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c index c7a7235e6224..c930fb5b8fe1 100644 --- a/drivers/watchdog/mei_wdt.c +++ b/drivers/watchdog/mei_wdt.c @@ -491,10 +491,9 @@ static void mei_wdt_notif(struct mei_cl_device *cldev) #if IS_ENABLED(CONFIG_DEBUG_FS) -static ssize_t mei_dbgfs_read_activation(struct file *file, char __user *ubuf, - size_t cnt, loff_t *ppos) +static ssize_t mei_dbgfs_read_activation(struct kiocb *iocb, struct iov_iter *to) { - struct mei_wdt *wdt = file->private_data; + struct mei_wdt *wdt = iocb->ki_filp->private_data; const size_t bufsz = 32; char buf[32]; ssize_t pos; @@ -504,31 +503,30 @@ static ssize_t mei_dbgfs_read_activation(struct file *file, char __user *ubuf, __mei_wdt_is_registered(wdt) ? "activated" : "deactivated"); mutex_unlock(&wdt->reg_lock); - return simple_read_from_buffer(ubuf, cnt, ppos, buf, pos); + return simple_copy_to_iter(buf, &iocb->ki_pos, pos, to); } static const struct file_operations dbgfs_fops_activation = { .open = simple_open, - .read = mei_dbgfs_read_activation, + .read_iter = mei_dbgfs_read_activation, .llseek = generic_file_llseek, }; -static ssize_t mei_dbgfs_read_state(struct file *file, char __user *ubuf, - size_t cnt, loff_t *ppos) +static ssize_t mei_dbgfs_read_state(struct kiocb *iocb, struct iov_iter *to) { - struct mei_wdt *wdt = file->private_data; + struct mei_wdt *wdt = iocb->ki_filp->private_data; char buf[32]; ssize_t pos; pos = scnprintf(buf, sizeof(buf), "state: %s\n", mei_wdt_state_str(wdt->state)); - return simple_read_from_buffer(ubuf, cnt, ppos, buf, pos); + return simple_copy_to_iter(buf, &iocb->ki_pos, pos, to); } static const struct file_operations dbgfs_fops_state = { .open = simple_open, - .read = mei_dbgfs_read_state, + .read_iter = mei_dbgfs_read_state, .llseek = generic_file_llseek, }; -- 2.43.0