forked from Minki/linux
sh: Various cosmetic cleanups.
We had quite a bit of whitespace damage, clean most of it up.. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
a56d276c05
commit
e4c2cfee5d
@ -26,10 +26,10 @@
|
||||
event.
|
||||
|
||||
There are three 32-bit ESRs located at 0xa05f8900 - 0xa05f6908. Event
|
||||
types can be found in include/asm-sh/dc_sysasic.h. There are three groups
|
||||
of EMRs that parallel the ESRs. Each EMR group corresponds to an IRQ, so
|
||||
0xa05f6910 - 0xa05f6918 triggers IRQ 13, 0xa05f6920 - 0xa05f6928 triggers
|
||||
IRQ 11, and 0xa05f6930 - 0xa05f6938 triggers IRQ 9.
|
||||
types can be found in include/asm-sh/dreamcast/sysasic.h. There are three
|
||||
groups of EMRs that parallel the ESRs. Each EMR group corresponds to an
|
||||
IRQ, so 0xa05f6910 - 0xa05f6918 triggers IRQ 13, 0xa05f6920 - 0xa05f6928
|
||||
triggers IRQ 11, and 0xa05f6930 - 0xa05f6938 triggers IRQ 9.
|
||||
|
||||
In the kernel, these events are mapped to virtual IRQs so that drivers can
|
||||
respond to them as they would a normal interrupt. In order to keep this
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* arch/sh/kernel/rtc-aica.c
|
||||
/*
|
||||
* arch/sh/boards/dreamcast/rtc.c
|
||||
*
|
||||
* Dreamcast AICA RTC routines.
|
||||
*
|
||||
@ -10,15 +11,12 @@
|
||||
*/
|
||||
|
||||
#include <linux/time.h>
|
||||
|
||||
#include <asm/rtc.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
extern void (*rtc_get_time)(struct timespec *);
|
||||
extern int (*rtc_set_time)(const time_t);
|
||||
|
||||
/* The AICA RTC has an Epoch of 1/1/1950, so we must subtract 20 years (in
|
||||
seconds to get the standard Unix Epoch when getting the time, and add 20
|
||||
years when setting the time. */
|
||||
seconds) to get the standard Unix Epoch when getting the time, and add
|
||||
20 years when setting the time. */
|
||||
#define TWENTY_YEARS ((20 * 365LU + 5) * 86400)
|
||||
|
||||
/* The AICA RTC is represented by a 32-bit seconds counter stored in 2 16-bit
|
||||
@ -32,7 +30,8 @@ extern int (*rtc_set_time)(const time_t);
|
||||
*
|
||||
* Grabs the current RTC seconds counter and adjusts it to the Unix Epoch.
|
||||
*/
|
||||
void aica_rtc_gettimeofday(struct timespec *ts) {
|
||||
void aica_rtc_gettimeofday(struct timespec *ts)
|
||||
{
|
||||
unsigned long val1, val2;
|
||||
|
||||
do {
|
||||
@ -55,7 +54,8 @@ void aica_rtc_gettimeofday(struct timespec *ts) {
|
||||
*
|
||||
* Adjusts the given @tv to the AICA Epoch and sets the RTC seconds counter.
|
||||
*/
|
||||
int aica_rtc_settimeofday(const time_t secs) {
|
||||
int aica_rtc_settimeofday(const time_t secs)
|
||||
{
|
||||
unsigned long val1, val2;
|
||||
unsigned long adj = secs + TWENTY_YEARS;
|
||||
|
||||
|
@ -25,18 +25,16 @@
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/rtc.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/machvec_init.h>
|
||||
#include <asm/mach/sysasic.h>
|
||||
|
||||
extern struct hw_interrupt_type systemasic_int;
|
||||
/* XXX: Move this into it's proper header. */
|
||||
extern void (*board_time_init)(void);
|
||||
extern void aica_time_init(void);
|
||||
extern int gapspci_init(void);
|
||||
extern int systemasic_irq_demux(int);
|
||||
|
||||
void *dreamcast_consistent_alloc(struct device *, size_t, dma_addr_t *, int);
|
||||
void *dreamcast_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t);
|
||||
int dreamcast_consistent_free(struct device *, size_t, void *, dma_addr_t);
|
||||
|
||||
const char *get_system_type(void)
|
||||
|
@ -1,10 +1,6 @@
|
||||
#
|
||||
# Makefile for the EDOSK7705 specific parts of the kernel
|
||||
#
|
||||
# Note! Dependencies are done automagically by 'make dep', which also
|
||||
# removes any old dependencies. DON'T put your own dependencies here
|
||||
# unless it's something special (ie not a .c file).
|
||||
#
|
||||
|
||||
obj-y := setup.o io.o
|
||||
|
||||
|
@ -1,10 +1,6 @@
|
||||
#
|
||||
# Makefile for the HS7751RVoIP specific parts of the kernel
|
||||
#
|
||||
# Note! Dependencies are done automagically by 'make dep', which also
|
||||
# removes any old dependencies. DON'T put your own dependencies here
|
||||
# unless it's something special (ie not a .c file).
|
||||
#
|
||||
|
||||
obj-y := mach.o setup.o io.o irq.o led.o
|
||||
|
||||
|
@ -167,7 +167,7 @@ void hs7751rvoip_outb(unsigned char value, unsigned long port)
|
||||
*(volatile unsigned char *)port = value;
|
||||
#if defined(CONFIG_HS7751RVOIP_CODEC)
|
||||
else if (codec_port(port))
|
||||
*(volatile unsigned cjar *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value;
|
||||
*(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value;
|
||||
#endif
|
||||
else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
|
||||
*(unsigned char *)PCI_IOMAP(port) = value;
|
||||
@ -181,7 +181,7 @@ void hs7751rvoip_outb_p(unsigned char value, unsigned long port)
|
||||
*(volatile unsigned char *)port = value;
|
||||
#if defined(CONFIG_HS7751RVOIP_CODEC)
|
||||
else if (codec_port(port))
|
||||
*(volatile unsigned cjar *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value;
|
||||
*(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value;
|
||||
#endif
|
||||
else if (CHECK_SH7751_PCIIO(port) || shifted_port(port))
|
||||
*(unsigned char *)PCI_IOMAP(port) = value;
|
||||
|
@ -1,10 +1,6 @@
|
||||
#
|
||||
# Makefile for the RTS7751R2D specific parts of the kernel
|
||||
#
|
||||
# Note! Dependencies are done automagically by 'make dep', which also
|
||||
# removes any old dependencies. DON'T put your own dependencies here
|
||||
# unless it's something special (ie not a .c file).
|
||||
#
|
||||
|
||||
obj-y := mach.o setup.o io.o irq.o led.o
|
||||
|
||||
|
@ -12,8 +12,6 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/rts7751r2d/rts7751r2d.h>
|
||||
|
||||
extern unsigned int debug_counter;
|
||||
|
||||
#ifdef CONFIG_HEARTBEAT
|
||||
|
||||
#include <linux/sched.h>
|
||||
|
@ -14,8 +14,6 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/rts7751r2d/rts7751r2d.h>
|
||||
|
||||
unsigned int debug_counter;
|
||||
|
||||
const char *get_system_type(void)
|
||||
{
|
||||
return "RTS7751R2D";
|
||||
@ -34,5 +32,4 @@ void __init platform_setup(void)
|
||||
printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n");
|
||||
ctrl_outw(0x0000, PA_OUTPORT);
|
||||
pm_power_off = rts7751r2d_power_off;
|
||||
debug_counter = 0;
|
||||
}
|
||||
|
@ -18,8 +18,8 @@
|
||||
#include <asm/dma.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
static unsigned int xfer_complete = 0;
|
||||
static int count = 0;
|
||||
static unsigned int xfer_complete;
|
||||
static int count;
|
||||
|
||||
static irqreturn_t pvr2_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
||||
{
|
||||
@ -107,4 +107,3 @@ module_exit(pvr2_dma_exit);
|
||||
MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>");
|
||||
MODULE_DESCRIPTION("NEC PowerVR 2 DMA driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
|
@ -225,7 +225,7 @@ int __init clk_init(void)
|
||||
{
|
||||
int i, ret = 0;
|
||||
|
||||
BUG_ON(unlikely(!master_clk.rate));
|
||||
BUG_ON(!master_clk.rate);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(onchip_clocks); i++) {
|
||||
struct clk *clk = onchip_clocks[i];
|
||||
|
@ -24,9 +24,10 @@
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#include <linux/mm.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/cpu/sq.h>
|
||||
|
||||
|
@ -18,24 +18,6 @@
|
||||
#include <asm/cpu/mmu_context.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
#if !defined(CONFIG_NFSD) && !defined(CONFIG_NFSD_MODULE)
|
||||
#define sys_nfsservctl sys_ni_syscall
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_MMU)
|
||||
#define sys_madvise sys_ni_syscall
|
||||
#define sys_readahead sys_ni_syscall
|
||||
#define sys_mprotect sys_ni_syscall
|
||||
#define sys_msync sys_ni_syscall
|
||||
#define sys_mlock sys_ni_syscall
|
||||
#define sys_munlock sys_ni_syscall
|
||||
#define sys_mlockall sys_ni_syscall
|
||||
#define sys_munlockall sys_ni_syscall
|
||||
#define sys_mremap sys_ni_syscall
|
||||
#define sys_mincore sys_ni_syscall
|
||||
#define sys_remap_file_pages sys_ni_syscall
|
||||
#endif
|
||||
|
||||
! NOTE:
|
||||
! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address
|
||||
! to be jumped is too far, but it causes illegal slot exception.
|
||||
|
@ -224,7 +224,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
||||
|
||||
case PTRACE_SETDSPREGS: {
|
||||
unsigned long dp;
|
||||
int i;
|
||||
|
||||
ret = -EIO;
|
||||
dp = ((unsigned long) child) + THREAD_SIZE -
|
||||
|
@ -117,6 +117,8 @@ EXPORT_SYMBOL(synchronize_irq);
|
||||
#endif
|
||||
|
||||
EXPORT_SYMBOL(csum_partial);
|
||||
#ifdef CONFIG_IPV6
|
||||
EXPORT_SYMBOL(csum_ipv6_magic);
|
||||
#endif
|
||||
EXPORT_SYMBOL(consistent_sync);
|
||||
EXPORT_SYMBOL(clear_page);
|
||||
|
@ -125,7 +125,6 @@ static void sh_wdt_start(void)
|
||||
|
||||
/**
|
||||
* sh_wdt_stop - Stop the Watchdog
|
||||
*
|
||||
* Stops the watchdog.
|
||||
*/
|
||||
static void sh_wdt_stop(void)
|
||||
@ -141,22 +140,20 @@ static void sh_wdt_stop(void)
|
||||
|
||||
/**
|
||||
* sh_wdt_keepalive - Keep the Userspace Watchdog Alive
|
||||
*
|
||||
* The Userspace watchdog got a KeepAlive: schedule the next heartbeat.
|
||||
*/
|
||||
static void sh_wdt_keepalive(void)
|
||||
static inline void sh_wdt_keepalive(void)
|
||||
{
|
||||
next_heartbeat = jiffies + (heartbeat * HZ);
|
||||
}
|
||||
|
||||
/**
|
||||
* sh_wdt_set_heartbeat - Set the Userspace Watchdog heartbeat
|
||||
*
|
||||
* Set the Userspace Watchdog heartbeat
|
||||
*/
|
||||
static int sh_wdt_set_heartbeat(int t)
|
||||
{
|
||||
if ((t < 1) || (t > 3600)) /* arbitrary upper limit */
|
||||
if (unlikely((t < 1) || (t > 3600))) /* arbitrary upper limit */
|
||||
return -EINVAL;
|
||||
|
||||
heartbeat = t;
|
||||
@ -165,7 +162,6 @@ static int sh_wdt_set_heartbeat(int t)
|
||||
|
||||
/**
|
||||
* sh_wdt_ping - Ping the Watchdog
|
||||
*
|
||||
* @data: Unused
|
||||
*
|
||||
* Clears overflow bit, resets timer counter.
|
||||
@ -182,14 +178,13 @@ static void sh_wdt_ping(unsigned long data)
|
||||
sh_wdt_write_cnt(0);
|
||||
|
||||
mod_timer(&timer, next_ping_period(clock_division_ratio));
|
||||
} else {
|
||||
printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n");
|
||||
}
|
||||
} else
|
||||
printk(KERN_WARNING PFX "Heartbeat lost! Will not ping "
|
||||
"the watchdog\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* sh_wdt_open - Open the Device
|
||||
*
|
||||
* @inode: inode of device
|
||||
* @file: file handle of device
|
||||
*
|
||||
@ -209,7 +204,6 @@ static int sh_wdt_open(struct inode *inode, struct file *file)
|
||||
|
||||
/**
|
||||
* sh_wdt_close - Close the Device
|
||||
*
|
||||
* @inode: inode of device
|
||||
* @file: file handle of device
|
||||
*
|
||||
@ -220,7 +214,8 @@ static int sh_wdt_close(struct inode *inode, struct file *file)
|
||||
if (shwdt_expect_close == 42) {
|
||||
sh_wdt_stop();
|
||||
} else {
|
||||
printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n");
|
||||
printk(KERN_CRIT PFX "Unexpected close, not "
|
||||
"stopping watchdog!\n");
|
||||
sh_wdt_keepalive();
|
||||
}
|
||||
|
||||
@ -232,7 +227,6 @@ static int sh_wdt_close(struct inode *inode, struct file *file)
|
||||
|
||||
/**
|
||||
* sh_wdt_write - Write to Device
|
||||
*
|
||||
* @file: file handle of device
|
||||
* @buf: buffer to write
|
||||
* @count: length of buffer
|
||||
@ -265,7 +259,6 @@ static ssize_t sh_wdt_write(struct file *file, const char *buf,
|
||||
|
||||
/**
|
||||
* sh_wdt_ioctl - Query Device
|
||||
*
|
||||
* @inode: inode of device
|
||||
* @file: file handle of device
|
||||
* @cmd: watchdog command
|
||||
@ -326,7 +319,6 @@ static int sh_wdt_ioctl(struct inode *inode, struct file *file,
|
||||
|
||||
/**
|
||||
* sh_wdt_notify_sys - Notifier Handler
|
||||
*
|
||||
* @this: notifier block
|
||||
* @code: notifier event
|
||||
* @unused: unused
|
||||
@ -337,9 +329,8 @@ static int sh_wdt_ioctl(struct inode *inode, struct file *file,
|
||||
static int sh_wdt_notify_sys(struct notifier_block *this,
|
||||
unsigned long code, void *unused)
|
||||
{
|
||||
if (code == SYS_DOWN || code == SYS_HALT) {
|
||||
if (code == SYS_DOWN || code == SYS_HALT)
|
||||
sh_wdt_stop();
|
||||
}
|
||||
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
@ -354,7 +345,8 @@ static const struct file_operations sh_wdt_fops = {
|
||||
};
|
||||
|
||||
static struct watchdog_info sh_wdt_info = {
|
||||
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
|
||||
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT |
|
||||
WDIOF_MAGICCLOSE,
|
||||
.firmware_version = 1,
|
||||
.identity = "SH WDT",
|
||||
};
|
||||
@ -371,7 +363,6 @@ static struct miscdevice sh_wdt_miscdev = {
|
||||
|
||||
/**
|
||||
* sh_wdt_init - Initialize module
|
||||
*
|
||||
* Registers the device and notifier handler. Actual device
|
||||
* initialization is handled by sh_wdt_open().
|
||||
*/
|
||||
@ -381,15 +372,15 @@ static int __init sh_wdt_init(void)
|
||||
|
||||
if ((clock_division_ratio < 0x5) || (clock_division_ratio > 0x7)) {
|
||||
clock_division_ratio = WTCSR_CKS_4096;
|
||||
printk(KERN_INFO PFX "clock_division_ratio value must be 0x5<=x<=0x7, using %d\n",
|
||||
clock_division_ratio);
|
||||
printk(KERN_INFO PFX "clock_division_ratio value must "
|
||||
"be 0x5<=x<=0x7, using %d\n", clock_division_ratio);
|
||||
}
|
||||
|
||||
if (sh_wdt_set_heartbeat(heartbeat))
|
||||
{
|
||||
rc = sh_wdt_set_heartbeat(heartbeat);
|
||||
if (unlikely(rc)) {
|
||||
heartbeat = WATCHDOG_HEARTBEAT;
|
||||
printk(KERN_INFO PFX "heartbeat value must be 1<=x<=3600, using %d\n",
|
||||
heartbeat);
|
||||
printk(KERN_INFO PFX "heartbeat value must "
|
||||
"be 1<=x<=3600, using %d\n", heartbeat);
|
||||
}
|
||||
|
||||
init_timer(&timer);
|
||||
@ -397,15 +388,16 @@ static int __init sh_wdt_init(void)
|
||||
timer.data = 0;
|
||||
|
||||
rc = register_reboot_notifier(&sh_wdt_notifier);
|
||||
if (rc) {
|
||||
printk(KERN_ERR PFX "Can't register reboot notifier (err=%d)\n", rc);
|
||||
if (unlikely(rc)) {
|
||||
printk(KERN_ERR PFX "Can't register reboot notifier (err=%d)\n",
|
||||
rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = misc_register(&sh_wdt_miscdev);
|
||||
if (rc) {
|
||||
printk(KERN_ERR PFX "Can't register miscdev on minor=%d (err=%d)\n",
|
||||
sh_wdt_miscdev.minor, rc);
|
||||
if (unlikely(rc)) {
|
||||
printk(KERN_ERR PFX "Can't register miscdev on "
|
||||
"minor=%d (err=%d)\n", sh_wdt_miscdev.minor, rc);
|
||||
unregister_reboot_notifier(&sh_wdt_notifier);
|
||||
return rc;
|
||||
}
|
||||
@ -418,7 +410,6 @@ static int __init sh_wdt_init(void)
|
||||
|
||||
/**
|
||||
* sh_wdt_exit - Deinitialize module
|
||||
*
|
||||
* Unregisters the device and notifier handler. Actual device
|
||||
* deinitialization is handled by sh_wdt_close().
|
||||
*/
|
||||
@ -434,14 +425,13 @@ MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
|
||||
|
||||
module_param(clock_division_ratio, int, 0);
|
||||
MODULE_PARM_DESC(clock_division_ratio, "Clock division ratio. Valid ranges are from 0x5 (1.31ms) to 0x7 (5.25ms). Defaults to 0x7.");
|
||||
MODULE_PARM_DESC(clock_division_ratio, "Clock division ratio. Valid ranges are from 0x5 (1.31ms) to 0x7 (5.25ms). (default=" __MODULE_STRING(clock_division_ratio) ")");
|
||||
|
||||
module_param(heartbeat, int, 0);
|
||||
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (1<=heartbeat<=3600, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
|
||||
|
||||
module_param(nowayout, int, 0);
|
||||
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
|
||||
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
|
||||
|
||||
module_init(sh_wdt_init);
|
||||
module_exit(sh_wdt_exit);
|
||||
|
||||
|
@ -14,6 +14,7 @@ typedef struct { volatile int counter; } atomic_t;
|
||||
#define atomic_read(v) ((v)->counter)
|
||||
#define atomic_set(v,i) ((v)->counter = (i))
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
/*
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* For __swab32 */
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
static __inline__ void set_bit(int nr, volatile void * addr)
|
||||
static inline void set_bit(int nr, volatile void * addr)
|
||||
{
|
||||
int mask;
|
||||
volatile unsigned int *a = addr;
|
||||
@ -24,7 +24,7 @@ static __inline__ void set_bit(int nr, volatile void * addr)
|
||||
*/
|
||||
#define smp_mb__before_clear_bit() barrier()
|
||||
#define smp_mb__after_clear_bit() barrier()
|
||||
static __inline__ void clear_bit(int nr, volatile void * addr)
|
||||
static inline void clear_bit(int nr, volatile void * addr)
|
||||
{
|
||||
int mask;
|
||||
volatile unsigned int *a = addr;
|
||||
@ -37,7 +37,7 @@ static __inline__ void clear_bit(int nr, volatile void * addr)
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static __inline__ void change_bit(int nr, volatile void * addr)
|
||||
static inline void change_bit(int nr, volatile void * addr)
|
||||
{
|
||||
int mask;
|
||||
volatile unsigned int *a = addr;
|
||||
@ -50,7 +50,7 @@ static __inline__ void change_bit(int nr, volatile void * addr)
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static __inline__ int test_and_set_bit(int nr, volatile void * addr)
|
||||
static inline int test_and_set_bit(int nr, volatile void * addr)
|
||||
{
|
||||
int mask, retval;
|
||||
volatile unsigned int *a = addr;
|
||||
@ -66,7 +66,7 @@ static __inline__ int test_and_set_bit(int nr, volatile void * addr)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static __inline__ int test_and_clear_bit(int nr, volatile void * addr)
|
||||
static inline int test_and_clear_bit(int nr, volatile void * addr)
|
||||
{
|
||||
int mask, retval;
|
||||
volatile unsigned int *a = addr;
|
||||
@ -82,7 +82,7 @@ static __inline__ int test_and_clear_bit(int nr, volatile void * addr)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static __inline__ int test_and_change_bit(int nr, volatile void * addr)
|
||||
static inline int test_and_change_bit(int nr, volatile void * addr)
|
||||
{
|
||||
int mask, retval;
|
||||
volatile unsigned int *a = addr;
|
||||
@ -100,7 +100,7 @@ static __inline__ int test_and_change_bit(int nr, volatile void * addr)
|
||||
|
||||
#include <asm-generic/bitops/non-atomic.h>
|
||||
|
||||
static __inline__ unsigned long ffz(unsigned long word)
|
||||
static inline unsigned long ffz(unsigned long word)
|
||||
{
|
||||
unsigned long result;
|
||||
|
||||
@ -120,7 +120,7 @@ static __inline__ unsigned long ffz(unsigned long word)
|
||||
*
|
||||
* Undefined if no bit exists, so code should check against 0 first.
|
||||
*/
|
||||
static __inline__ unsigned long __ffs(unsigned long word)
|
||||
static inline unsigned long __ffs(unsigned long word)
|
||||
{
|
||||
unsigned long result;
|
||||
|
||||
|
@ -159,6 +159,7 @@ static __inline__ unsigned short ip_compute_csum(unsigned char * buff, int len)
|
||||
}
|
||||
|
||||
#define _HAVE_ARCH_IPV6_CSUM
|
||||
#ifdef CONFIG_IPV6
|
||||
static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
|
||||
struct in6_addr *daddr,
|
||||
__u32 len,
|
||||
@ -194,6 +195,7 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
|
||||
|
||||
return csum_fold(sum);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copy and checksum to user
|
||||
|
@ -25,7 +25,7 @@
|
||||
* addresses. The point is to have a constant address at
|
||||
* compile time, but to set the physical address only
|
||||
* in the boot process. We allocate these special addresses
|
||||
* from the end of virtual memory (0xfffff000) backwards.
|
||||
* from the end of P3 backwards.
|
||||
* Also this lets us do fail-safe vmalloc(), we
|
||||
* can guarantee that these special addresses and
|
||||
* vmalloc()-ed addresses never overlap.
|
||||
|
@ -62,7 +62,6 @@
|
||||
|
||||
/**
|
||||
* sh_wdt_read_cnt - Read from Counter
|
||||
*
|
||||
* Reads back the WTCNT value.
|
||||
*/
|
||||
static inline __u8 sh_wdt_read_cnt(void)
|
||||
@ -72,7 +71,6 @@ static inline __u8 sh_wdt_read_cnt(void)
|
||||
|
||||
/**
|
||||
* sh_wdt_write_cnt - Write to Counter
|
||||
*
|
||||
* @val: Value to write
|
||||
*
|
||||
* Writes the given value @val to the lower byte of the timer counter.
|
||||
@ -95,7 +93,6 @@ static inline __u8 sh_wdt_read_csr(void)
|
||||
|
||||
/**
|
||||
* sh_wdt_write_csr - Write to Control/Status Register
|
||||
*
|
||||
* @val: Value to write
|
||||
*
|
||||
* Writes the given value @val to the lower byte of the control/status
|
||||
|
Loading…
Reference in New Issue
Block a user