]> git.baikalelectronics.ru Git - kernel.git/commit
lib: crc8: pointer to data block should be const
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Fri, 7 May 2021 01:03:37 +0000 (18:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 May 2021 02:24:12 +0000 (19:24 -0700)
commit13cdcc24fb7dd01c0c89f213060ed190d57ff164
tree8384513fa290cba884373e3963ae79abe4735029
parentd3ef6cf0d94a9c5e28a15b2bc22363b930680564
lib: crc8: pointer to data block should be const

crc8() does not change the data passed to it, so the pointer argument
should be declared const.  This avoids callers that receive const data
having to cast it to a non-const pointer to call crc8().

Link: https://lkml.kernel.org/r/20210329122409.3291-1-rf@opensource.cirrus.com
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/crc8.h
lib/crc8.c