mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andre Noll <maan@tuebingen.mpg.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: Dan Williams <dan.j.williams@intel.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Jonathan Corbet <corbet@lwn.net>,
	Maciej Sosnowski <maciej.sosnowski@intel.com>,
	Andre Noll <maan@systemlinux.org>,
	linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] docs: crypto: async-tx-api: fix broken code example
Date: Thu, 23 May 2024 16:17:00 +0200	[thread overview]
Message-ID: <Zk9P3ITcqc-9EhZp@tuebingen.mpg.de> (raw)
In-Reply-To: <20240523-async-dma-docs-v1-1-b900e0804e11@pengutronix.de>

On Thu, May 23, 15:18, Ahmad Fatoum wrote
> The code example fails to compile:
> 
>   1) ddr_conv is defined twice, once as a VLA, which have been phased out

       addr_conv
> 
>   2) submit is not a pointer, but is still dereferenced with ->

3) The first call to async_xor() lacked the trailing semicolon.

> Fix these issues and while at it, make the functions static as users
> are unlikely to export them.

No objections, but please don't consider me authoritative. Two nits
below, FWIW.

> --- a/Documentation/crypto/async-tx-api.rst
> +++ b/Documentation/crypto/async-tx-api.rst
> @@ -150,38 +150,38 @@ of an operation.
>  Perform a xor->copy->xor operation where each operation depends on the
>  result from the previous operation::

Maybe add

#include <linux/async_tx.h>

>  
> -    void callback(void *param)
> +    static void callback(void *param)
>      {
>  	    struct completion *cmp = param;
>  
>  	    complete(cmp);
>      }

This could be simplified to

static void callback(void *param)
{
	complete(param);
}

Best
Andre
-- 
Max Planck Institute for Biology
Tel: (+49) 7071 601 829
Max-Planck-Ring 5, 72076 Tübingen, Germany
http://people.tuebingen.mpg.de/maan/

  reply	other threads:[~2024-05-23 14:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 13:18 Ahmad Fatoum
2024-05-23 14:17 ` Andre Noll [this message]
2024-05-29  8:10   ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zk9P3ITcqc-9EhZp@tuebingen.mpg.de \
    --to=maan@tuebingen.mpg.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=corbet@lwn.net \
    --cc=dan.j.williams@intel.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel@pengutronix.de \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maan@systemlinux.org \
    --cc=maciej.sosnowski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®