Commit 6bc79455 authored by Linus Torvalds's avatar Linus Torvalds

Fix up some bitops due to strict type checking

parent a5297c70
...@@ -76,11 +76,11 @@ static void __init intel_init_thermal(struct cpuinfo_x86 *c) ...@@ -76,11 +76,11 @@ static void __init intel_init_thermal(struct cpuinfo_x86 *c)
unsigned int cpu = smp_processor_id(); unsigned int cpu = smp_processor_id();
/* Thermal monitoring */ /* Thermal monitoring */
if (!test_bit(X86_FEATURE_ACPI, &c->x86_capability)) if (!test_bit(X86_FEATURE_ACPI, c->x86_capability))
return; /* -ENODEV */ return; /* -ENODEV */
/* Clock modulation */ /* Clock modulation */
if (!test_bit(X86_FEATURE_ACC, &c->x86_capability)) if (!test_bit(X86_FEATURE_ACC, c->x86_capability))
return; /* -ENODEV */ return; /* -ENODEV */
rdmsr(MSR_IA32_MISC_ENABLE, l, h); rdmsr(MSR_IA32_MISC_ENABLE, l, h);
......
...@@ -38,7 +38,7 @@ enum {Enabled, Magic}; ...@@ -38,7 +38,7 @@ enum {Enabled, Magic};
typedef struct { typedef struct {
struct list_head list; struct list_head list;
int flags; /* type, status, etc. */ unsigned long flags; /* type, status, etc. */
int offset; /* offset of magic */ int offset; /* offset of magic */
int size; /* size of magic/mask */ int size; /* size of magic/mask */
char *magic; /* magic or filename extension */ char *magic; /* magic or filename extension */
......
...@@ -544,10 +544,10 @@ int snd_seq_queue_use(int queueid, int client, int use) ...@@ -544,10 +544,10 @@ int snd_seq_queue_use(int queueid, int client, int use)
return -EINVAL; return -EINVAL;
down(&queue->timer_mutex); down(&queue->timer_mutex);
if (use) { if (use) {
if (!test_and_set_bit(client, &queue->clients_bitmap)) if (!test_and_set_bit(client, queue->clients_bitmap))
queue->clients++; queue->clients++;
} else { } else {
if (test_and_clear_bit(client, &queue->clients_bitmap)) if (test_and_clear_bit(client, queue->clients_bitmap))
queue->clients--; queue->clients--;
} }
if (queue->clients) { if (queue->clients) {
...@@ -575,7 +575,7 @@ int snd_seq_queue_is_used(int queueid, int client) ...@@ -575,7 +575,7 @@ int snd_seq_queue_is_used(int queueid, int client)
q = queueptr(queueid); q = queueptr(queueid);
if (q == NULL) if (q == NULL)
return -EINVAL; /* invalid queue */ return -EINVAL; /* invalid queue */
result = test_bit(client, &q->clients_bitmap) ? 1 : 0; result = test_bit(client, q->clients_bitmap) ? 1 : 0;
queuefree(q); queuefree(q);
return result; return result;
} }
......
...@@ -51,7 +51,7 @@ struct _snd_seq_queue { ...@@ -51,7 +51,7 @@ struct _snd_seq_queue {
spinlock_t check_lock; spinlock_t check_lock;
/* clients which uses this queue (bitmap) */ /* clients which uses this queue (bitmap) */
unsigned int clients_bitmap[SNDRV_SEQ_MAX_CLIENTS/sizeof(unsigned int)]; unsigned long clients_bitmap[SNDRV_SEQ_MAX_CLIENTS/sizeof(unsigned long)];
unsigned int clients; /* users of this queue */ unsigned int clients; /* users of this queue */
struct semaphore timer_mutex; struct semaphore timer_mutex;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment