swh:1:snp:173f8deb0c56c557784b4fd217e7608ac6197844
Revision 58e40308f329275ccf556312a9cd788522f7c224 authored by Johannes Schlumberger on 20 March 2007, 21:55:58 UTC, committed by Herbert Xu on 20 March 2007, 21:55:58 UTC
there is a tiny bug in Documentation/crypto/api-intro.txt.
The file has the following example code:

struct scatterlist sg[2];
[...]
if (crypto_hash_digest(&desc, &sg, 2, result))

which does not match the declaration of crypto_hash_digest() in
include/linux/crypto.h.

(static inline int crypto_hash_digest(struct hash_desc *desc,
	struct scatterlist *sg, unsigned int nbytes, u8 *out)

The code in the example passes the address of a pointer (an array actually) as
the second argument, while the function expects the pointer itself.

I have attached a patch to fix this.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent f70ee5e
History
Tip revision: a9c9a6f741cdaa2fa9ba24a790db8d07295761e3 authored by Linus Torvalds on 02 September 2021, 22:09:46 UTC
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Tip revision: a9c9a6f
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 572 bytes
.mailmap -rw-r--r-- 3.5 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 88.9 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 82.0 KB
Makefile -rw-r--r-- 49.1 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top