[PATCH] crc16: remove w1 specific comments.

Remove w1 comments from crc16.h and move
specific constants into w1_ds2433.c where they are used.
Replace %d with %zd.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Evgeniy Polyakov and committed by Greg Kroah-Hartman 877599fd 8ccc4577

+6 -16
+5 -1
drivers/w1/w1_ds2433.c
··· 15 15 #include <linux/delay.h> 16 16 #ifdef CONFIG_W1_F23_CRC 17 17 #include <linux/crc16.h> 18 + 19 + #define CRC16_INIT 0 20 + #define CRC16_VALID 0xb001 21 + 18 22 #endif 19 23 20 24 #include "w1.h" ··· 218 214 #ifdef CONFIG_W1_F23_CRC 219 215 /* can only write full blocks in cached mode */ 220 216 if ((off & W1_PAGE_MASK) || (count & W1_PAGE_MASK)) { 221 - dev_err(&sl->dev, "invalid offset/count off=%d cnt=%d\n", 217 + dev_err(&sl->dev, "invalid offset/count off=%d cnt=%zd\n", 222 218 (int)off, count); 223 219 return -EINVAL; 224 220 }
+1 -15
include/linux/crc16.h
··· 1 1 /* 2 2 * crc16.h - CRC-16 routine 3 3 * 4 - * Implements the standard CRC-16, as used with 1-wire devices: 4 + * Implements the standard CRC-16: 5 5 * Width 16 6 6 * Poly 0x8005 (x^16 + x^15 + x^2 + 1) 7 7 * Init 0 8 - * 9 - * For 1-wire devices, the CRC is stored inverted, LSB-first 10 - * 11 - * Example buffer with the CRC attached: 12 - * 31 32 33 34 35 36 37 38 39 C2 44 13 - * 14 - * The CRC over a buffer with the CRC attached is 0xB001. 15 - * So, if (crc16(0, buf, size) == 0xB001) then the buffer is valid. 16 - * 17 - * Refer to "Application Note 937: Book of iButton Standards" for details. 18 - * http://www.maxim-ic.com/appnotes.cfm/appnote_number/937 19 8 * 20 9 * Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com> 21 10 * ··· 16 27 #define __CRC16_H 17 28 18 29 #include <linux/types.h> 19 - 20 - #define CRC16_INIT 0 21 - #define CRC16_VALID 0xb001 22 30 23 31 extern u16 const crc16_table[256]; 24 32