From patchwork Wed Jan 24 18:12:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13529523 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83C07C47E49 for ; Wed, 24 Jan 2024 18:12:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 210478D000B; Wed, 24 Jan 2024 13:12:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 19ABD8D0001; Wed, 24 Jan 2024 13:12:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 03A818D000B; Wed, 24 Jan 2024 13:12:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E23FF8D0001 for ; Wed, 24 Jan 2024 13:12:24 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id BE8A11602FD for ; Wed, 24 Jan 2024 18:12:24 +0000 (UTC) X-FDA: 81714999408.09.FBF8C13 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf29.hostedemail.com (Postfix) with ESMTP id 0214712002E for ; Wed, 24 Jan 2024 18:12:22 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=gHbVnnpo; dmarc=none; spf=none (imf29.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706119943; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=AhiVK5zsyYmL8/e8G+YJeZMHQTJ4c3uco+OF9oETteY=; b=LNRbdcLEyG4s/NN8C0l+//vBa/gtaEmO97RRcZutYcEK43T9oHnZyD0Wg5nETa3PR8s89Z aPNI9cQrfn8J9LO8MaRGbeQjEqN3E2oRY3tgjF6Yd5FF4cIwTv8PHfrq3wce6fQHWKa94s VLU+W/mKIoXwgvWX+6pYqFNivXrXBbg= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=gHbVnnpo; dmarc=none; spf=none (imf29.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706119943; a=rsa-sha256; cv=none; b=0Bm5+kHxCLR3lVl0OEAzBxZ5wmsQ8SSqCi3eXH+TYxmTCKmYbIUdhF6KTAwiDroYqinJCw k6np83GglaiEaSoqw9kuA9pYwuzzMuU/etT+U5gFEneyb1KTPX6CpFkvoX6GaP/WfrRfwx a/H+5Pty9P3JT+9EWpJrUf4ShKWgKlI= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=AhiVK5zsyYmL8/e8G+YJeZMHQTJ4c3uco+OF9oETteY=; b=gHbVnnpoemGsB5FcNnKgoKSR8v D8yMXtsSgBx/UBGynJsDOhDRhXF8V+E0rSAFpaZVNmHrCev0B5iJPBYh8di2iBQ9jmio8mj7LoKRA DZ2wv22cqqeJHTCdSlXzyn2hGZYkv7ll220KxBg4wrrny9VfS8OpNbUciYxs/RQa1VaLDyqUkZThN HKaJV/lZCOjoNxfFYk/Rb58sZakaIil13ivkQeZwcNrJVFt1kNQIm66ILYTnREmVsg8UUv5Y14lNf z1AB+IQoEh33XvzF86Bj85lNWzePz67qfQVomyYjUxzySUY5sgKsGV6RJbCiHrlvR27gCYcaTFnAr nLIMUn4w==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rShjX-00000007OIL-1M4i; Wed, 24 Jan 2024 18:12:19 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: [PATCH] highmem: Add kernel-doc for memcpy_*_folio() Date: Wed, 24 Jan 2024 18:12:15 +0000 Message-ID: <20240124181217.1761674-1-willy@infradead.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: d5snbqr57obwgo4uu3a6gmrn557gr9c5 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 0214712002E X-HE-Tag: 1706119942-739933 X-HE-Meta: U2FsdGVkX19v7JjQYcXQ0UnEcTBiNGXME00m5OhEQBVXo5IJd1yFAKDBvVDGRMu08ICxHUpsQzTF/KFY/Dcxpgvf8dQxoDcAqnnjD5SM/lqcINweF39PsyiDFct72zsNx+rp5MD8BXYQrNQ5jscjdQL0jlXiy45wccpLIPUXfyFe576X4QoR8msr9kTENx0ttDk04Qujp1GPKQC+koXOHivGy/I1QqhFK+x0KeVuEnbYmb0HkTwrY7qVkBsbige6cnTrGEeTbe/MxmWa/f4cO13dKey75dB++3VuRLW5CCfk8loT7aEaQCM66u8rQXBRRPGilRPDWx74qO2KPLWjuHlJ10MyqqcScwhSMztRWVnUgo2UVuWpanyed2BgppiakStVImLjywCQUR05JAwgqJeZ8jKdbbMFg9a9UXmhuAxfu4PI3Bwjzu1jhvth+t/QqmI5lMzbPAaifzq5tk/A/Ox7TqtgtmVBJrrkXRhhw47q55RccTwM/6cE+sh28BR8VaMRvk1VAr+NEpYOu/BrFWgp/fvhf/E3II9OIJtZqI9YvlFuu7wdxGSDP3qKm31T2oQHKAcuztP9zYHpFgKU+SRfR4RguNAXfnvgJBkuE6z6LoPNvSgUGwLBM+2VAonKzwZJQVrXs07ahta49c0fHbI3XH0bA974a9CPHk39hcIIEQ9R5p3QvCZy+YL6iIgMySdnnrRuEWHC8mwkVer/oWP9CDaSWV9aP6E4EHPvVv8dwsPfoqCmW72227yMprJH2GyNWVVLS3qGEWooQMTKb5gT0Hudk6+KbZpB6JhFRSZlsH0mHT/fnXUym3xd5FcCZIFTyReO92iTrNU5scTsNY6IxGuSF+QEtmKwb+IJbx9P33UNNVsEIqAUziFTJ/1khRiP1Vs/VwRLq5AtbHamynU3EaZJI1J3diWRBgFKAD5I3tNiJV0u9oZDsw65T19SHE/kjT2f6YUhptv4qPb /oHAqSx+ qKdqCDzDaV/CGJLyIwoMkG6srJJJDqKbuY8URI+iirMlvZdfzPrSgaQKckIRaATCVgh2r/0b+C1XKkr1x2D6aAWM3Hd1Ebfl/h09Nn8bWV8P4Okh2F0UofCpXNUOdqayWjB5NVWhf9FeOmwgVohi1BeCx6sNiQ1DoeerdMcWmsVEzk+kN8Xw0IGISk4QSMGPijAj8o7HuogoMjSsYxT931wpoG0diP9pPcpkZ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This was inadvertently skipped when adding the new functions. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/highmem.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 451c1dff0e87..00341b56d291 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -439,6 +439,13 @@ static inline void memzero_page(struct page *page, size_t offset, size_t len) kunmap_local(addr); } +/** + * memcpy_from_folio - Copy a range of bytes from a folio. + * @to: The memory to copy to. + * @folio: The folio to read from. + * @offset: The first byte in the folio to read. + * @len: The number of bytes to copy. + */ static inline void memcpy_from_folio(char *to, struct folio *folio, size_t offset, size_t len) { @@ -460,6 +467,13 @@ static inline void memcpy_from_folio(char *to, struct folio *folio, } while (len > 0); } +/** + * memcpy_to_folio - Copy a range of bytes to a folio. + * @folio: The folio to write to. + * @offset: The first byte in the folio to store to. + * @from: The memory to copy from. + * @len: The number of bytes to copy. + */ static inline void memcpy_to_folio(struct folio *folio, size_t offset, const char *from, size_t len) {