All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] ARM: remove unused bit operations
Date: Thu,  4 Jun 2009 12:27:19 +0200	[thread overview]
Message-ID: <1244111241-32735-2-git-send-email-daniel@caiaq.de> (raw)
In-Reply-To: <1244111241-32735-1-git-send-email-daniel@caiaq.de>

Remove include/asm-arm/bitops.h a bunch of 'external' marked functions
from include/asm-arm/bitops.h. They are not implemented anywhere in the
sources, so this forward declaration is wrong.

Also remove the functions __set_bit, __clear_bit, __change_bit,
__test_and_set_bit, __test_and_clear_bit and __test_and_change_bit.

All these functions can be implemented in a generic fashion which will
be done in the next patch.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
 include/asm-arm/bitops.h |   70 ----------------------------------------------
 1 files changed, 0 insertions(+), 70 deletions(-)

diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h
index 4b8bab2..3ffd4d5 100644
--- a/include/asm-arm/bitops.h
+++ b/include/asm-arm/bitops.h
@@ -20,76 +20,6 @@
 #define smp_mb__before_clear_bit()	do { } while (0)
 #define smp_mb__after_clear_bit()	do { } while (0)
 
-/*
- * Function prototypes to keep gcc -Wall happy.
- */
-extern void set_bit(int nr, volatile void * addr);
-
-static inline void __set_bit(int nr, volatile void *addr)
-{
-	((unsigned char *) addr)[nr >> 3] |= (1U << (nr & 7));
-}
-
-extern void clear_bit(int nr, volatile void * addr);
-
-static inline void __clear_bit(int nr, volatile void *addr)
-{
-	((unsigned char *) addr)[nr >> 3] &= ~(1U << (nr & 7));
-}
-
-extern void change_bit(int nr, volatile void * addr);
-
-static inline void __change_bit(int nr, volatile void *addr)
-{
-	((unsigned char *) addr)[nr >> 3] ^= (1U << (nr & 7));
-}
-
-extern int test_and_set_bit(int nr, volatile void * addr);
-
-static inline int __test_and_set_bit(int nr, volatile void *addr)
-{
-	unsigned int mask = 1 << (nr & 7);
-	unsigned int oldval;
-
-	oldval = ((unsigned char *) addr)[nr >> 3];
-	((unsigned char *) addr)[nr >> 3] = oldval | mask;
-	return oldval & mask;
-}
-
-extern int test_and_clear_bit(int nr, volatile void * addr);
-
-static inline int __test_and_clear_bit(int nr, volatile void *addr)
-{
-	unsigned int mask = 1 << (nr & 7);
-	unsigned int oldval;
-
-	oldval = ((unsigned char *) addr)[nr >> 3];
-	((unsigned char *) addr)[nr >> 3] = oldval & ~mask;
-	return oldval & mask;
-}
-
-extern int test_and_change_bit(int nr, volatile void * addr);
-
-static inline int __test_and_change_bit(int nr, volatile void *addr)
-{
-	unsigned int mask = 1 << (nr & 7);
-	unsigned int oldval;
-
-	oldval = ((unsigned char *) addr)[nr >> 3];
-	((unsigned char *) addr)[nr >> 3] = oldval ^ mask;
-	return oldval & mask;
-}
-
-extern int find_first_zero_bit(void * addr, unsigned size);
-extern int find_next_zero_bit(void * addr, int size, int offset);
-
-/*
- * This routine doesn't need to be atomic.
- */
-static inline int test_bit(int nr, const void * addr)
-{
-    return ((unsigned char *) addr)[nr >> 3] & (1U << (nr & 7));
-}
 
 /*
  * ffz = Find First Zero in word. Undefined if no zero exists,
-- 
1.6.3.1

  reply	other threads:[~2009-06-04 10:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 10:27 [U-Boot] (no subject) Daniel Mack
2009-06-04 10:27 ` Daniel Mack [this message]
2009-06-04 10:27   ` [U-Boot] [PATCH 2/3] Add generic bit operations Daniel Mack
2009-06-04 10:27     ` [U-Boot] [PATCH 3/3] ARM: add unaligned macros Daniel Mack
2009-06-04 17:42       ` Daniel Mack
2009-06-04 19:03         ` Wolfgang Denk
2009-06-04 19:23           ` Daniel Mack
2009-06-05  3:21             ` Stefan Roese
2009-06-04 11:45     ` [U-Boot] [PATCH 2/3] Add generic bit operations Wolfgang Denk
2009-06-04 11:48       ` Daniel Mack
2009-06-04 11:58         ` Wolfgang Denk
2009-06-04 11:47     ` Wolfgang Denk
2009-06-04 11:54       ` Daniel Mack
     [not found]         ` <20090604115922.E6893832E416@gemini.denx.de>
2009-06-04 18:00           ` Daniel Mack
2009-06-04 18:18             ` Stefan Roese
2009-06-04 19:06             ` Wolfgang Denk
2009-06-05 20:44     ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-07 22:41       ` Daniel Mack

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1244111241-32735-2-git-send-email-daniel@caiaq.de \
    --to=daniel@caiaq.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.