Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp65912lqj; Thu, 11 Apr 2024 09:58:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUp65Rov6SnR5/1NdCp2OOSCY7WIgbL1KggihS8EdGkjaQIKoS8dzWvWlWGwFZVCQDY7zEzePpHPGk21J2IaA4IvNIt7dqbt+ba3jggLA== X-Google-Smtp-Source: AGHT+IGOZC8JKl8OfdG4KAXoW+3fcBJj/HTwcbuqgQXt2IJ/3Y2RTsneQqTUabEIytWDGa0zcCbo X-Received: by 2002:a19:ac01:0:b0:516:bef3:47ff with SMTP id g1-20020a19ac01000000b00516bef347ffmr167381lfc.28.1712854707098; Thu, 11 Apr 2024 09:58:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712854707; cv=pass; d=google.com; s=arc-20160816; b=DRgOLGco8yF9ujigj7JVAlY8ufwZ3el29OXMZLf7vcSRHWMK6ZGF6Bz+oCLJ9TpdAs a6cSb3KQwhngHuw0dqFOTGXCkkYiTHXASs+Lg2ETL8lh/2tLqvig+b1bckTHeDkRIi0b XjsCsgi5Rk5Ox/1ANAKmMASKZ9qcOxuH1qzH0MEe9B8wT3sgSGNlPWNpdyHyQTXbF/Ye 1kFSTzlHG/Hy0vEN0nh4a5NDDbkcp38+oUaN/85VQXXthXbmJhh8bZ4yMkX4rirklCyS UmuH0Vu4bN4MD7WV9HAw+2wtNehcKmfcAwI6zNqFREs0cHMc3grtAhn3ArmvKwRSX8YB rSGg== 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=BTDbZ/sPhGUL0gp8p6TK4lEEPdBeX2CDKpqOn++pqBo=; fh=2FInBIgEh7xt9W7JS1z2wQ7fUhvLHtwfAfkXluU3JoI=; b=iErRhtHaCbm9/1jzwrzPThD4FbFvLfcAxJeXRcC4KvTFZpT91xhwR+LNH54caOGlLx C/BL4WOwAjDB3VpGPUK1//0+aXiG2WKjmCBkuCTmfS41uP3HK0HTj5tLxAuuzaLnqfFI lXYwquQXYdr3LafdP5zjBlm5L5eyuPz3iNLSy5Q2nF7l7aSxufprmpvHoNLGZvN75Hqm 4rcSU2KYRJ4lzm2sWIYhPymG8yjxJfztXgb8bUnbplv4gFiCLPBljEVChRm7CPApNvod z5EUSE0NjLoERrDQ+mhUHSHJm9VYCKl/rZE5Mhu79Et97Nsc+fnvqWIS9EuGjGkL1f2R ptFA==; 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=EjqQspbx; 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-141111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141111-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id jj13-20020a170907984d00b00a4df5b0b434si886865ejc.206.2024.04.11.09.58.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 09:58:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=EjqQspbx; 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-141111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141111-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 5689E1F2578D for ; Thu, 11 Apr 2024 16:56:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E3D5165FCE; Thu, 11 Apr 2024 15:40:57 +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="EjqQspbx" Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (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 51574165FA6 for ; Thu, 11 Apr 2024 15:40:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712850056; cv=none; b=sEpTBdNY1XbHvkhHkwhYW/Q7pxAS1mlBKIvnBZpJyW4mJNnJ0pVxTm3nMSnjA1Jpb14BLafiwBFT+RF/SyIc2O+Vx55zFBrou7AOvX8mFFWiMSsHzrYQFQ5k2GmCLjzHWxiKmzrwln6VT8QvwgvmOhAy1oK7AIgnl3CYAB4yDvY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712850056; c=relaxed/simple; bh=xijPwjWmymtw1tBt+Sizqj7Uo+0bAjoiGy+bdtcRnB4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TKEUz04Ch7dgOXE3NLK4lh1r3cIn+JBaQZyce7X2MBTDa9bjA7pRh7s/2JuOnx8QFkofPwtufeztSptHNZ0M2hR6nShMlr9OTh6xPeZtVMWDcoD7duRJhsqBSdpwaMnol8u/pZ8kBoAfAUgPylLa6Ds2iztAbK/gxxAzKTeCKuY= 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=EjqQspbx; arc=none smtp.client-ip=209.85.166.41 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-f41.google.com with SMTP id ca18e2360f4ac-7d6112ba6baso58218839f.1 for ; Thu, 11 Apr 2024 08:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1712850054; x=1713454854; 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=BTDbZ/sPhGUL0gp8p6TK4lEEPdBeX2CDKpqOn++pqBo=; b=EjqQspbxwS42ThAvrpXFJM0rsN2U+rj7A+ETa8dZuXWrEydFwK5fiEehTqDg2VQEF7 3OCKP03+RkeTfWAJWOO1qyLKKBVfk3IgpTbME+7gv1pa9/q/wDzzQxf1jTvF0JlNfmlN IfziCMtJTgaEYgxaDSTbQjwBzROgjjJco9vQRHe6TUbbABx+K25UKd+4mQxhKaZdXkgU Z21MIGcAL4SrNVdarC00XRagtwX/OY/u/ovWv+tWM5TkK4WUmCYziS10C2pOs5NEyceU usmtrwz+Ir3YErLykUQlHJj6uWpyB1mt4MODPjwqogAmTx2H/I0zMaTzFnn5Sur+gkAe q4Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712850054; x=1713454854; 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=BTDbZ/sPhGUL0gp8p6TK4lEEPdBeX2CDKpqOn++pqBo=; b=vUC8+JFgeHSXSmp93szjSfLuCwtfSdTCl5nDpHcw/EeCwliaGM0uEwzS76TLHZBaex cbCAh9o9wseYN4PuJ4jhknQlnWv1kKomfqN9Uqg0Mg5aDmpqXTs0rbC7UWwlqoJaPQuK J9ML8nwJXhToI0pbOlPnHUyOj+cjhgwIynkUq0MZzf+W0Uc3G5IZGOcJBNEbmUlnaY14 2TnWADcK4l5AgBQLl9vIhFeq7/7g74cTBO0zZrw2bPc/NJey12YdSDo+PwsQTC6pUKaF R245/A47pho4ioC0dkTiTIaVIjpvFqDzHXauagkJz+98JAyK7qtw815dEXjriduOYR0i WCpQ== X-Gm-Message-State: AOJu0Yxz2+ufpsgsL3V8SN1fUzf13+0lsqFKYpwZJFbUIHT5q0Z88ZSz /vjCmWRUmagJBOGQXrGpjJ0jmTWMXAzMBA9nurOGMo1NLUdCF01AhqkX2qCu6ZsATu85t0l6zCi N X-Received: by 2002:a6b:cd08:0:b0:7d5:fe3e:90ff with SMTP id d8-20020a6bcd08000000b007d5fe3e90ffmr211331iog.0.1712850053760; Thu, 11 Apr 2024 08:40:53 -0700 (PDT) Received: from localhost.localdomain ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id jc25-20020a056638891900b0047f14b7f6c0sm457056jab.5.2024.04.11.08.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:40:52 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 333/437] arch/arm: convert to read/write iterators Date: Thu, 11 Apr 2024 09:17:53 -0600 Message-ID: <20240411153126.16201-334-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 --- arch/arm/common/bL_switcher_dummy_if.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/common/bL_switcher_dummy_if.c b/arch/arm/common/bL_switcher_dummy_if.c index cabc0659b329..f9794c4a6a40 100644 --- a/arch/arm/common/bL_switcher_dummy_if.c +++ b/arch/arm/common/bL_switcher_dummy_if.c @@ -15,9 +15,9 @@ #include #include -static ssize_t bL_switcher_write(struct file *file, const char __user *buf, - size_t len, loff_t *pos) +static ssize_t bL_switcher_write(struct kiocb *iocb, struct iov_iter *from) { + size_t len = iov_iter_count(from); unsigned char val[3]; unsigned int cpu, cluster; int ret; @@ -27,7 +27,7 @@ static ssize_t bL_switcher_write(struct file *file, const char __user *buf, if (len < 3) return -EINVAL; - if (copy_from_user(val, buf, 3)) + if (!copy_from_iter_full(val, 3, fro)) return -EFAULT; /* format: , */ @@ -44,7 +44,7 @@ static ssize_t bL_switcher_write(struct file *file, const char __user *buf, } static const struct file_operations bL_switcher_fops = { - .write = bL_switcher_write, + .write_iter = bL_switcher_write, .owner = THIS_MODULE, }; -- 2.43.0