Skip to content

Commit 1083f2e

Browse files
committed
btrfs-progs: removed unused helpers from kernecompat.h
__set_bit and __clear_bit are unused and redundant, we have them in kernel-lib/bitops.h as well. Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 1921e52 commit 1083f2e

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

include/kerncompat.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -313,31 +313,6 @@ static inline void up_read(struct rw_semaphore *sem)
313313
# define fallthrough do {} while (0) /* fallthrough */
314314
#endif
315315

316-
/**
317-
* __set_bit - Set a bit in memory
318-
* @nr: the bit to set
319-
* @addr: the address to start counting from
320-
*
321-
* Unlike set_bit(), this function is non-atomic and may be reordered.
322-
* If it's called on the same region of memory simultaneously, the effect
323-
* may be that only one operation succeeds.
324-
*/
325-
static inline void __set_bit(int nr, volatile unsigned long *addr)
326-
{
327-
unsigned long mask = BITOP_MASK(nr);
328-
unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
329-
330-
*p |= mask;
331-
}
332-
333-
static inline void __clear_bit(int nr, volatile unsigned long *addr)
334-
{
335-
unsigned long mask = BITOP_MASK(nr);
336-
unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
337-
338-
*p &= ~mask;
339-
}
340-
341316
/**
342317
* test_bit - Determine whether a bit is set
343318
* @nr: bit number to test

0 commit comments

Comments
 (0)