Commit bb0fd83e authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/linux-2.5

into samba.org:/scratch/anton/sfr
parents fd49e80d c3136961
...@@ -170,7 +170,7 @@ int parport_wait_peripheral(struct parport *port, ...@@ -170,7 +170,7 @@ int parport_wait_peripheral(struct parport *port,
{ {
int ret; int ret;
int usec; int usec;
long deadline; unsigned long deadline;
unsigned char status; unsigned char status;
usec = port->physport->spintime; /* usecs of fast polling */ usec = port->physport->spintime; /* usecs of fast polling */
......
...@@ -58,7 +58,7 @@ size_t parport_ieee1284_write_compat (struct parport *port, ...@@ -58,7 +58,7 @@ size_t parport_ieee1284_write_compat (struct parport *port,
parport_write_control (port, ctl); parport_write_control (port, ctl);
parport_data_forward (port); parport_data_forward (port);
while (count < len) { while (count < len) {
long expire = jiffies + dev->timeout; unsigned long expire = jiffies + dev->timeout;
long wait = (HZ + 99) / 100; long wait = (HZ + 99) / 100;
unsigned char mask = (PARPORT_STATUS_ERROR unsigned char mask = (PARPORT_STATUS_ERROR
| PARPORT_STATUS_BUSY); | PARPORT_STATUS_BUSY);
...@@ -431,7 +431,7 @@ size_t parport_ieee1284_ecp_write_data (struct parport *port, ...@@ -431,7 +431,7 @@ size_t parport_ieee1284_ecp_write_data (struct parport *port,
| PARPORT_CONTROL_INIT, | PARPORT_CONTROL_INIT,
PARPORT_CONTROL_INIT); PARPORT_CONTROL_INIT);
for (written = 0; written < len; written++, buf++) { for (written = 0; written < len; written++, buf++) {
long expire = jiffies + port->cad->timeout; unsigned long expire = jiffies + port->cad->timeout;
unsigned char byte; unsigned char byte;
byte = *buf; byte = *buf;
...@@ -520,7 +520,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port, ...@@ -520,7 +520,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port,
parport_write_control (port, parport_write_control (port,
ctl | PARPORT_CONTROL_AUTOFD); ctl | PARPORT_CONTROL_AUTOFD);
while (count < len) { while (count < len) {
long expire = jiffies + dev->timeout; unsigned long expire = jiffies + dev->timeout;
unsigned char byte; unsigned char byte;
int command; int command;
...@@ -668,7 +668,7 @@ size_t parport_ieee1284_ecp_write_addr (struct parport *port, ...@@ -668,7 +668,7 @@ size_t parport_ieee1284_ecp_write_addr (struct parport *port,
PARPORT_CONTROL_AUTOFD PARPORT_CONTROL_AUTOFD
| PARPORT_CONTROL_INIT); | PARPORT_CONTROL_INIT);
for (written = 0; written < len; written++, buf++) { for (written = 0; written < len; written++, buf++) {
long expire = jiffies + port->cad->timeout; unsigned long expire = jiffies + port->cad->timeout;
unsigned char byte; unsigned char byte;
byte = *buf; byte = *buf;
......
#ifndef _LINUX_JIFFIES_H #ifndef _LINUX_JIFFIES_H
#define _LINUX_JIFFIES_H #define _LINUX_JIFFIES_H
#include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/seqlock.h> #include <linux/seqlock.h>
...@@ -37,10 +38,16 @@ static inline u64 get_jiffies_64(void) ...@@ -37,10 +38,16 @@ static inline u64 get_jiffies_64(void)
* good compiler would generate better code (and a really good compiler * good compiler would generate better code (and a really good compiler
* wouldn't care). Gcc is currently neither. * wouldn't care). Gcc is currently neither.
*/ */
#define time_after(a,b) ((long)(b) - (long)(a) < 0) #define time_after(a,b) \
(typecheck(unsigned long, a) && \
typecheck(unsigned long, b) && \
((long)(b) - (long)(a) < 0))
#define time_before(a,b) time_after(b,a) #define time_before(a,b) time_after(b,a)
#define time_after_eq(a,b) ((long)(a) - (long)(b) >= 0) #define time_after_eq(a,b) \
(typecheck(unsigned long, a) && \
typecheck(unsigned long, b) && \
((long)(a) - (long)(b) >= 0))
#define time_before_eq(a,b) time_after_eq(b,a) #define time_before_eq(a,b) time_after_eq(b,a)
#endif #endif
...@@ -188,6 +188,17 @@ extern void dump_stack(void); ...@@ -188,6 +188,17 @@ extern void dump_stack(void);
const typeof( ((type *)0)->member ) *__mptr = (ptr); \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );}) (type *)( (char *)__mptr - offsetof(type,member) );})
/*
* Check at compile time that something is of a particular type.
* Always evaluates to 1 so you may use it easily in conparisons.
*/
#define typecheck(type,x) \
({ type __dummy; \
typeof(x) __dummy2; \
(void)(&__dummy == &__dummy2); \
1; \
})
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#define SI_LOAD_SHIFT 16 #define SI_LOAD_SHIFT 16
......
...@@ -1808,7 +1808,7 @@ static void snd_ac97_get_name(ac97_t *ac97, unsigned int id, char *name) ...@@ -1808,7 +1808,7 @@ static void snd_ac97_get_name(ac97_t *ac97, unsigned int id, char *name)
*/ */
static int ac97_reset_wait(ac97_t *ac97, int timeout, int with_modem) static int ac97_reset_wait(ac97_t *ac97, int timeout, int with_modem)
{ {
signed long end_time; unsigned long end_time;
end_time = jiffies + timeout; end_time = jiffies + timeout;
do { do {
unsigned short ext_mid; unsigned short ext_mid;
...@@ -1866,7 +1866,7 @@ int snd_ac97_mixer(snd_card_t * card, ac97_t * _ac97, ac97_t ** rac97) ...@@ -1866,7 +1866,7 @@ int snd_ac97_mixer(snd_card_t * card, ac97_t * _ac97, ac97_t ** rac97)
int err; int err;
ac97_t *ac97; ac97_t *ac97;
char name[64]; char name[64];
signed long end_time; unsigned long end_time;
static snd_device_ops_t ops = { static snd_device_ops_t ops = {
.dev_free = snd_ac97_dev_free, .dev_free = snd_ac97_dev_free,
}; };
......
...@@ -1741,7 +1741,7 @@ static void do_delay(intel8x0_t *chip) ...@@ -1741,7 +1741,7 @@ static void do_delay(intel8x0_t *chip)
static int snd_intel8x0_ich_chip_init(intel8x0_t *chip) static int snd_intel8x0_ich_chip_init(intel8x0_t *chip)
{ {
signed long end_time; unsigned long end_time;
unsigned int cnt, status, nstatus; unsigned int cnt, status, nstatus;
/* put logic to right state */ /* put logic to right state */
......
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