Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp24636lqj; Thu, 11 Apr 2024 08:57:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW63KS1P/JJN7PmEfEnjFEevWYHdyienCXKIzjWpAucRclVOSxAbqdrVW/HYlkc99wW/L/lCmsmUl1fxcmKA+onuLzMUNz58E+rt0hQUw== X-Google-Smtp-Source: AGHT+IH3+hmnGMMJNDIF8ITUMiM5hcEMRUJkDNMH4gR1wflwkng/sNIBpkzlkKiiB1M1fara9IEw X-Received: by 2002:a0c:c20e:0:b0:69b:901:b076 with SMTP id l14-20020a0cc20e000000b0069b0901b076mr107059qvh.9.1712851060344; Thu, 11 Apr 2024 08:57:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712851060; cv=pass; d=google.com; s=arc-20160816; b=LRE64jYdip+bSCuxDRQpUZerBqMnpX4kglnfT1v9ceqGtBju8767+4wWibPAneVGpW A5F4U+8cEr+3EHWcZszPnNK4VmvRaoWMfM/pbf8oquWRUfGkcvel9CJvv5YYIAWrw3TM OsqwJEh7bxWPnAE9r7ozwcWisBvo4YD5t8knI4Lm5Mtsf1a0AGk0SlJDMecQSRFr+IA8 rTgfFnVlOTQ7oq0xf4o1asBCvv0VNxIOi0VOT4qRpGmoIlkZ802s+6UDQc14E5Vi4w+7 JnPz3U+lxiWk8W+sKPyYMtHuokTlCPmP/h7/rekFKr6LvKq6GLh7wSWWRSmKxndR2LOw gs9g== 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=Pav+Q6I1FDbUoscEArc8DWkYbazZgyALLdsNa2Zru1c=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=k2I/+6ETibO4UejrxUdMapPRjXpu2LfEy/o7l6/X9JG/HV3X5WkhJ4HtdxKU310ThA bOaPFFlbniRRwOVkCC+/bXKwwHxtdkzi3xBr4TUA2prdmiWCXDwOubXcVx9DPKgGQDEo NYmy+/7A6fVCVNTMMLE6pJtsJtHCG4i1VrmsJDwd95r2233Rwtqye4u4hGHOddVqS+zB lyThRr6L7PA7pZHRPnXhg4bBzwrMpcnnB1xEbO8Btz2/2NP6u0Ep+hAgeH8Ss1KNGBPD XWtL0gGzwYgSVtsyPuE50Px6igyVUFPr6lCKBvNy+o0qThc8htfBvsTpbLX4eMPKLsUk Xstw==; 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=j7u7F3H3; 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-140845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140845-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id cn12-20020ad44a6c000000b0069b47083961si1722299qvb.539.2024.04.11.08.57.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:57:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=j7u7F3H3; 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-140845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140845-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 01C741C20836 for ; Thu, 11 Apr 2024 15:57:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0BFBC13442E; Thu, 11 Apr 2024 15:34:06 +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="j7u7F3H3" Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (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 F29E81332B0 for ; Thu, 11 Apr 2024 15:34:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849645; cv=none; b=C9tty8EFYi/GTGMfP4sL26ajYr5CS/gjtRHPmiwPVOPKMQP9vfxMwv0elZwYg470ctxhY/EfkZJxBxsChj9yu+eaIVCqBV7WuRuwz+hxdEbO0ofJ4BNGPe/2bOZ+WESaIIcFjCOpHpDmrG+yq9m3IOfDHLPZWNOg8o3x4mhUFt0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712849645; c=relaxed/simple; bh=dhvFxfup7smCS2tY0UKeEOj506EogbS1zmag/Nv+yHA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YEZsLhyBi7akJbPmQnh2D5jjfOX58Do4WKpSCoIUaYTuVzhlaVHr2i/9gblHezcpvR+w1t7aIBAT2RUYROfRw6Uzfchqwbt58RgHiq0XgVx/yF9IkGU3spO66g4ydORPPl8h/RRHfaAHwyTKPGkJcr9aHcy1V0vBdwR94e+ukr0= 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=j7u7F3H3; arc=none smtp.client-ip=209.85.166.52 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-f52.google.com with SMTP id ca18e2360f4ac-7d6112ba6baso58006239f.1 for ; Thu, 11 Apr 2024 08:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712849643; x=1713454443; 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=Pav+Q6I1FDbUoscEArc8DWkYbazZgyALLdsNa2Zru1c=; b=j7u7F3H3SphrJ66LTS939OYmZY2Nx+/UNOMZbjhRDrCormeTdtABP1FiBiyHt0AmvG gfJF4EQyGVmZQjsOhce6XPqaSiIOho6qNZhaqrWi8CQ+il+MeIy4bCrWDIenUd8dmo+U tG5J/91VYo5T/eI9OE/9IQZ6jNYhOSjj0b8Rv8CgYI6lPVKIL9RhL7JvtvO9fsskvfjz +VsaX3zlAIX8oWrkMvtAKZgWmpCQksjjcyJgmcBzlUieLXIRLe+qCs9+lM+WWFXz2dlm fLab85tgRtOyhAA8KzCnf17TmpiD7XVWqQ+ViNAFdAozpXnNa/oGNAinmtnG2g/pTG0A X+Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849643; x=1713454443; 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=Pav+Q6I1FDbUoscEArc8DWkYbazZgyALLdsNa2Zru1c=; b=GjTkcS5F2HFX4gHBuQLhz6TjDf+6xLQkwTYHkd/n3o8nDx8ul2ZM/06JiD0zfoE1TK IOQeoCcEnwJHYnPk38/MD9R/UGxytzebkgcrh0e/n1xiiaPHAmS+05NcT4h9vTmYIfhe h2g3rclkmdu6C0jpEBHzjdmswwHuviAQ0f9K9TLjEna1xRApmpidSABrsJryaWuKgh69 hXLIR2q7yiZDmKXMGodVK6LphhEV1SlLqWqPK4laozKhQgm1QV+5wRgtqYhGtUEskAXd 4emk7YzPvd5IkzR3ualOCiK56lfMJBV91D/X6uouD456zQp1oDHaawvGywenU6oubRfb VeCw== X-Gm-Message-State: AOJu0YyhP+q6dh9rE24SgFBjT9I/sHGIX/jPPDzQvzMu0YpMHJ81IeBO z/ZEtdQ72WYCm7VBpVxmYCVuVzDe94AkckiWrZinUms8Eg9SMYOg5mS0ym6SHaD+NgCKonTtOn5 D X-Received: by 2002:a05:6602:38d:b0:7d6:513b:254 with SMTP id f13-20020a056602038d00b007d6513b0254mr177064iov.2.1712849642804; Thu, 11 Apr 2024 08:34:02 -0700 (PDT) Received: from localhost.localdomain ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id jc25-20020a056638891900b0047f14b7f6c0sm457056jab.5.2024.04.11.08.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:34:01 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 083/437] kernel/irq: convert debugfs helpers to read/write iterators Date: Thu, 11 Apr 2024 09:13:43 -0600 Message-ID: <20240411153126.16201-84-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 --- kernel/irq/debugfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/irq/debugfs.c b/kernel/irq/debugfs.c index aae0402507ed..addf000046b8 100644 --- a/kernel/irq/debugfs.c +++ b/kernel/irq/debugfs.c @@ -193,15 +193,15 @@ static int irq_debug_open(struct inode *inode, struct file *file) return single_open(file, irq_debug_show, inode->i_private); } -static ssize_t irq_debug_write(struct file *file, const char __user *user_buf, - size_t count, loff_t *ppos) +static ssize_t irq_debug_write(struct kiocb *iocb, struct iov_iter *from) { - struct irq_desc *desc = file_inode(file)->i_private; + struct irq_desc *desc = file_inode(iocb->ki_filp)->i_private; + size_t count = iov_iter_count(from); char buf[8] = { 0, }; size_t size; size = min(sizeof(buf) - 1, count); - if (copy_from_user(buf, user_buf, size)) + if (!copy_from_iter_full(buf, size, from)) return -EFAULT; if (!strncmp(buf, "trigger", size)) { @@ -215,8 +215,8 @@ static ssize_t irq_debug_write(struct file *file, const char __user *user_buf, static const struct file_operations dfs_irq_ops = { .open = irq_debug_open, - .write = irq_debug_write, - .read = seq_read, + .write_iter = irq_debug_write, + .read_iter = seq_read_iter, .llseek = seq_lseek, .release = single_release, }; -- 2.43.0