History

[PATCH] gfp flags annotations - part 1

- added typedef unsigned int __nocast gfp_t; - replaced __nocast uses for gfp flags with gfp_t - it gives exactly the same warnings as far as sparse is concerned, doesn't change generated code (from gcc point of view we replaced unsigned int with typedef) and documents what's going on far better.

Al Viro committed 21 years ago

Commit dd0fc661 parent 3b0e77b145 files · +340 −360Browse files

Showing the changes to kernel (4 of 145 files). Show all

Unified · Split

4 files
  1. kernel/audit.c +1 −1
  2. kernel/cpuset.c +1 −1
  3. kernel/kfifo.c +2 −2
  4. kernel/signal.c +1 −1
kernel/audit.c+1−1
@@ -560,7 +560,7 @@ static void audit_buffer_free(struct audit_buffer *ab) · 559 unmodified lines
560560 }
561561
562562 static struct audit_buffer * audit_buffer_alloc(struct audit_context *ctx,
563− unsigned int __nocast gfp_mask, int type)
563+ gfp_t gfp_mask, int type)
564564 {
565565 unsigned long flags;
566566 struct audit_buffer *ab = NULL;
kernel/cpuset.c+1−1
@@ -1670,7 +1670,7 @@ static const struct cpuset *nearest_exclusive_ancestor(const struct cpuset *cs) · 1669 unmodified lines
16701670 * GFP_USER - only nodes in current tasks mems allowed ok.
16711671 **/
16721672
1673−int cpuset_zone_allowed(struct zone *z, unsigned int __nocast gfp_mask)
1673+int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
16741674 {
16751675 int node; /* node that zone z is on */
16761676 const struct cpuset *cs; /* current cpuset ancestors */
kernel/kfifo.c+2−2
@@ -36,7 +36,7 @@ · 35 unmodified lines
3636 * struct kfifo with kfree().
3737 */
3838 struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size,
39− unsigned int __nocast gfp_mask, spinlock_t *lock)
39+ gfp_t gfp_mask, spinlock_t *lock)
4040 {
4141 struct kfifo *fifo;
4242
@@ -64,7 +64,7 @@ EXPORT_SYMBOL(kfifo_init); · 21 unmodified lines
6464 *
6565 * The size will be rounded-up to a power of 2.
6666 */
67−struct kfifo *kfifo_alloc(unsigned int size, unsigned int __nocast gfp_mask, spinlock_t *lock)
67+struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask, spinlock_t *lock)
6868 {
6969 unsigned char *buffer;
7070 struct kfifo *ret;
kernel/signal.c+1−1
@@ -262,7 +262,7 @@ next_signal(struct sigpending *pending, sigset_t *mask) · 261 unmodified lines
262262 return sig;
263263 }
264264
265−static struct sigqueue *__sigqueue_alloc(struct task_struct *t, unsigned int __nocast flags,
265+static struct sigqueue *__sigqueue_alloc(struct task_struct *t, gfp_t flags,
266266 int override_rlimit)
267267 {
268268 struct sigqueue *q = NULL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t