]> git.sur5r.net Git - u-boot/blobdiff - fs/jffs2/mini_inflate.c
arm: socfpga: Fix with the correct polling on bit is set
[u-boot] / fs / jffs2 / mini_inflate.c
index 4f511ec1a479e8d5fa93e5ea87c559102cfd2de1..7bfbdb680195ada25783c11385b5310a23dae43a 100644 (file)
@@ -6,34 +6,17 @@
  * Description:   Mini inflate implementation (RFC 1951)
  *-----------------------------------------------------------------------*/
 /*
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <config.h>
-
-#if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
-
 #include <jffs2/mini_inflate.h>
 
 /* The order that the code lengths in section 3.2.7 are in */
 static unsigned char huffman_order[] = {16, 17, 18,  0,  8,  7,  9,  6, 10,  5,
                                        11,  4, 12,  3, 13,  2, 14,  1, 15};
 
-inline void cramfs_memset(int *s, const int c, size n)
+static inline void cramfs_memset(int *s, const int c, size n)
 {
        n--;
        for (;n > 0; n--) s[n] = c;
@@ -82,8 +65,8 @@ static void init_stream(struct bitstream *stream, unsigned char *data,
 /* pull 'bits' bits out of the stream. The last bit pulled it returned as the
  * msb. (section 3.1.1)
  */
-inline unsigned long pull_bits(struct bitstream *stream,
-                              const unsigned int bits)
+static inline unsigned long pull_bits(struct bitstream *stream,
+                                     const unsigned int bits)
 {
        unsigned long ret;
        int i;
@@ -102,7 +85,7 @@ inline unsigned long pull_bits(struct bitstream *stream,
        return ret;
 }
 
-inline int pull_bit(struct bitstream *stream)
+static inline int pull_bit(struct bitstream *stream)
 {
        int ret = ((*(stream->data) >> stream->bit) & 1);
        if (stream->bit++ == 7) {
@@ -392,5 +375,3 @@ long decompress_block(unsigned char *dest, unsigned char *source,
 #endif
        return stream.error ? -stream.error : stream.decoded;
 }
-
-#endif /* CFG_CMD_JFFS2 */