From patchwork Sun Jun 25 20:12:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 112683 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7081420vqr; Sun, 25 Jun 2023 13:21:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5DLH+ORDofBGvJfSTyh3a4Ln4rPRm7LLNkVOQ9RiQJjKPwaekZm7rmVeGzkwozUe4iEpYc X-Received: by 2002:a17:902:c204:b0:1ad:e746:ca50 with SMTP id 4-20020a170902c20400b001ade746ca50mr2379080pll.2.1687724464388; Sun, 25 Jun 2023 13:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687724464; cv=none; d=google.com; s=arc-20160816; b=MuV4VAYSq8AvY0u+XEe6skBrycinWsgIP9d8Xd4cuHiN/aWCVwBCVUob87S19vjG5l kCZTGitDwy6tCK2kwL7QDo1Ly5cXUBqJvPZOrxox034S8HukImFWlTDU3FEPmpaeZb+1 4mfO8Gz7tejVTDi7ay25lHPk9m+riwK+Dk+jtx68gk5MVLi7OqKV1R3FczjENaxF1unK +GVydPMfeFOsEyKU1Cuj89HkNHI36Hsc6RZZH5sD57xecQ/GQLADHfDowKYqSaqub3OA zElg4UGI/QEwZvF3hR7IpyRsEDNtde2uKecN+RRl6mbdES9uQk/NTHR7dPHgSJykyIqM cy7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HTnGWUbgPOu9tTPS83pukflv+YYfBRc11HYbCi9ouX0=; fh=tSi+2ADJPE8vvfV/OFO9X1TV3PsXuT4yQOTeKzm+Qxo=; b=g8sHKoJyBuc8BzBtkcJGiZtnDmZ2WQywyt3dSvfWy2YV7A7fh7RvZBaLCPhBBYEIdh kJOFQWJJGj6swMxgwGVj9BRNI1Uuq0yHWt/+9T1Vwjz5sxHa/nkuE+YMFPctZOYQtGwe TEheC3C9llqsKZ7t3PF17vT3Wj/jR6xVzNF6JwXSDfeFpUwRuIkNPegmSx2qVYrPGCsT bjB1KvVv5OhVFD2sXQ3T14yDWcxp12QriqBdoUzhj0HNIjGbb9Zgl/hsxMOdJUzqhN1D GptavgK9+qsAL13RjqQ4v6D3f4BLxu74urJbBEQmys3yuyWnEQJ7KCTm94QLhEXpWRZx U4JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=b2ShBgjQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u1-20020a170902bf4100b001b6aa82743esi3361223pls.271.2023.06.25.13.20.48; Sun, 25 Jun 2023 13:21:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=b2ShBgjQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229452AbjFYUMi (ORCPT + 99 others); Sun, 25 Jun 2023 16:12:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjFYUMg (ORCPT ); Sun, 25 Jun 2023 16:12:36 -0400 Received: from smtp.smtpout.orange.fr (smtp-24.smtpout.orange.fr [80.12.242.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1EF512A for ; Sun, 25 Jun 2023 13:12:34 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id DW63qPPnMbrosDW63qNCVb; Sun, 25 Jun 2023 22:12:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1687723952; bh=HTnGWUbgPOu9tTPS83pukflv+YYfBRc11HYbCi9ouX0=; h=From:To:Cc:Subject:Date; b=b2ShBgjQ6v15WHD9DHvM6hSighEpWGOflB5hZdnpEp1Wo7tww95BuoosSTZtrdpM0 eaSTuK04y7HdYQxEwtA1uf3oEVA7PiF1JwRMQzpX0t5VYOv7qP0TQurFcLQFDs2PuE zEOpWxESgG4U8CxdXQ7FZYp7IpP04kL7R/CPvTKXnxZpuJA3Itm1bcEyH27vH4Mhot xEcMPVfpCwTdJRH9qors2SpIM0MGgWsFnC7/KkyfSHGQBlOjJjhgmfM4tS1t6fSqaz oxWAeyJsM0FhaS/uTLde2F/rxfCQaU2GD6oPgNv4tIRJc4biNsxDPHSKAiE9m8Mld4 ECjYMjYlyzB4Q== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 25 Jun 2023 22:12:32 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Jonathan Corbet Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , workflows@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH] docs: deprecated.rst: Update an example Date: Sun, 25 Jun 2023 22:12:24 +0200 Message-Id: <3484e46180dd2cf05d993ff1a78b481bc2ad1f71.1687723931.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769707367995219393?= X-GMAIL-MSGID: =?utf-8?q?1769707367995219393?= vmalloc() has a 2-factor form. It is vmalloc_array(). So use another function as an example. Signed-off-by: Christophe JAILLET --- Documentation/process/deprecated.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/process/deprecated.rst b/Documentation/process/deprecated.rst index f91b8441f2ef..1f7f3e6c9cda 100644 --- a/Documentation/process/deprecated.rst +++ b/Documentation/process/deprecated.rst @@ -77,7 +77,7 @@ kzalloc() can be replaced with kcalloc(). If no 2-factor form is available, the saturate-on-overflow helpers should be used:: - bar = vmalloc(array_size(count, size)); + bar = dma_alloc_coherent(dev, array_size(count, size), &dma, GFP_KERNEL); Another common case to avoid is calculating the size of a structure with a trailing array of others structures, as in::