From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] FRV: Make the bit finding functions take const pointers
Date: Fri, 04 Feb 2005 17:31:50 +0000 [thread overview]
Message-ID: <28761.1107538310@redhat.com> (raw)
The attached patch makes the bit finding functions in asm/bitops.h take const
pointers since they don't modify what they access.
Signed-Off-By: David Howells <dhowells@redhat.com>
---
warthog>diffstat -p1 frv-findbit-const-2611rc3.diff
include/asm-frv/bitops.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff -uNrp /warthog/kernels/linux-2.6.11-rc3/include/asm-frv/bitops.h linux-2.6.11-rc3-frv/include/asm-frv/bitops.h
--- /warthog/kernels/linux-2.6.11-rc3/include/asm-frv/bitops.h 2005-02-04 11:50:21.000000000 +0000
+++ linux-2.6.11-rc3-frv/include/asm-frv/bitops.h 2005-02-04 14:24:36.000000000 +0000
@@ -178,9 +178,9 @@ extern int find_next_bit(const unsigned
#define find_first_zero_bit(addr, size) \
find_next_zero_bit((addr), (size), 0)
-static inline int find_next_zero_bit (void * addr, int size, int offset)
+static inline int find_next_zero_bit(const void *addr, int size, int offset)
{
- unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
+ const unsigned long *p = ((const unsigned long *) addr) + (offset >> 5);
unsigned long result = offset & ~31UL;
unsigned long tmp;
@@ -277,11 +277,11 @@ static inline int ext2_test_bit(int nr,
#define ext2_find_first_zero_bit(addr, size) \
ext2_find_next_zero_bit((addr), (size), 0)
-static inline unsigned long ext2_find_next_zero_bit(void *addr,
+static inline unsigned long ext2_find_next_zero_bit(const void *addr,
unsigned long size,
unsigned long offset)
{
- unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
+ const unsigned long *p = ((const unsigned long *) addr) + (offset >> 5);
unsigned long result = offset & ~31UL;
unsigned long tmp;
reply other threads:[~2005-02-04 17:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=28761.1107538310@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox