Skip to content
Snippets Groups Projects
Commit ea40a054 authored by Daniel Schwierzeck's avatar Daniel Schwierzeck
Browse files

MIPS: constify address pointer in test_bit()


Fix several warnings when enabling UBIFS on MIPS:

In file included from ubifs.h:2137:0,
                 from ubifs.c:26:
misc.h: In function 'ubifs_zn_dirty':
misc.h:38:2: warning: passing argument 2 of 'test_bit' discards 'const' qualifier from pointer target type [enabled by default]
../include/asm/bitops.h:569:23: note: expected 'volatile void *' but argument is of type 'const long unsigned int *'

Signed-off-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
parent 0d69d918
No related branches found
No related tags found
No related merge requests found
...@@ -566,7 +566,7 @@ static __inline__ int __test_and_change_bit(int nr, volatile void * addr) ...@@ -566,7 +566,7 @@ static __inline__ int __test_and_change_bit(int nr, volatile void * addr)
* @nr: bit number to test * @nr: bit number to test
* @addr: Address to start counting from * @addr: Address to start counting from
*/ */
static __inline__ int test_bit(int nr, volatile void *addr) static __inline__ int test_bit(int nr, const volatile void *addr)
{ {
return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) != 0; return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) != 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment