Skip to content

Commit

Permalink
Blackfin arch: cleanup warnings from checkpatch -- no functional changes
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Jul 12, 2007
1 parent 669b792 commit 1f83b8f
Show file tree
Hide file tree
Showing 52 changed files with 321 additions and 375 deletions.
7 changes: 3 additions & 4 deletions arch/blackfin/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@
#include <linux/kernel_stat.h>
#include <linux/ptrace.h>
#include <linux/hardirq.h>
#include <asm/irq.h>
#include <asm/thread_info.h>
#include <linux/irq.h>
#include <linux/thread_info.h>

#define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
#define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val))

int main(void)
{
Expand Down
46 changes: 22 additions & 24 deletions arch/blackfin/kernel/bfin_dma_5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ set_bfin_dma_config(char direction, char flow_mode,
}
EXPORT_SYMBOL(set_bfin_dma_config);

void set_dma_sg(unsigned int channel, struct dmasg * sg, int nr_sg)
void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg)
{
BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
&& channel < MAX_BLACKFIN_DMA_CHANNEL));
Expand Down Expand Up @@ -401,7 +401,7 @@ static void *__dma_memcpy(void *dest, const void *src, size_t size)

if (size <= 0)
return NULL;

local_irq_save(flags);

if ((unsigned long)src < memory_end)
Expand Down Expand Up @@ -545,7 +545,6 @@ void *dma_memcpy(void *dest, const void *src, size_t size)
addr = __dma_memcpy(dest+bulk, src+bulk, rest);
return addr;
}

EXPORT_SYMBOL(dma_memcpy);

void *safe_dma_memcpy(void *dest, const void *src, size_t size)
Expand All @@ -558,14 +557,13 @@ EXPORT_SYMBOL(safe_dma_memcpy);

void dma_outsb(void __iomem *addr, const void *buf, unsigned short len)
{

unsigned long flags;

local_irq_save(flags);

blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);

bfin_write_MDMA_D0_START_ADDR(addr);
blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);

bfin_write_MDMA_D0_START_ADDR(addr);
bfin_write_MDMA_D0_X_COUNT(len);
bfin_write_MDMA_D0_X_MODIFY(0);
bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
Expand Down Expand Up @@ -593,9 +591,9 @@ EXPORT_SYMBOL(dma_outsb);
void dma_insb(const void __iomem *addr, void *buf, unsigned short len)
{
unsigned long flags;

local_irq_save(flags);
bfin_write_MDMA_D0_START_ADDR(buf);
bfin_write_MDMA_D0_START_ADDR(buf);
bfin_write_MDMA_D0_X_COUNT(len);
bfin_write_MDMA_D0_X_MODIFY(1);
bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
Expand Down Expand Up @@ -624,12 +622,12 @@ EXPORT_SYMBOL(dma_insb);
void dma_outsw(void __iomem *addr, const void *buf, unsigned short len)
{
unsigned long flags;

local_irq_save(flags);

blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);

bfin_write_MDMA_D0_START_ADDR(addr);
blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);

bfin_write_MDMA_D0_START_ADDR(addr);
bfin_write_MDMA_D0_X_COUNT(len);
bfin_write_MDMA_D0_X_MODIFY(0);
bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
Expand All @@ -656,10 +654,10 @@ EXPORT_SYMBOL(dma_outsw);
void dma_insw(const void __iomem *addr, void *buf, unsigned short len)
{
unsigned long flags;

local_irq_save(flags);
bfin_write_MDMA_D0_START_ADDR(buf);

bfin_write_MDMA_D0_START_ADDR(buf);
bfin_write_MDMA_D0_X_COUNT(len);
bfin_write_MDMA_D0_X_MODIFY(2);
bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
Expand Down Expand Up @@ -688,12 +686,12 @@ EXPORT_SYMBOL(dma_insw);
void dma_outsl(void __iomem *addr, const void *buf, unsigned short len)
{
unsigned long flags;

local_irq_save(flags);

blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);

bfin_write_MDMA_D0_START_ADDR(addr);
blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);

bfin_write_MDMA_D0_START_ADDR(addr);
bfin_write_MDMA_D0_X_COUNT(len);
bfin_write_MDMA_D0_X_MODIFY(0);
bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
Expand All @@ -720,10 +718,10 @@ EXPORT_SYMBOL(dma_outsl);
void dma_insl(const void __iomem *addr, void *buf, unsigned short len)
{
unsigned long flags;

local_irq_save(flags);
bfin_write_MDMA_D0_START_ADDR(buf);

bfin_write_MDMA_D0_START_ADDR(buf);
bfin_write_MDMA_D0_X_COUNT(len);
bfin_write_MDMA_D0_X_MODIFY(4);
bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
Expand Down
11 changes: 4 additions & 7 deletions arch/blackfin/kernel/bfin_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static void port_setup(unsigned short gpio, unsigned short usage)

static void default_gpio(unsigned short gpio)
{
unsigned short bank,bitmask;
unsigned short bank, bitmask;

bank = gpio_bank(gpio);
bitmask = gpio_bit(gpio);
Expand All @@ -183,7 +183,7 @@ static int __init bfin_gpio_init(void)

printk(KERN_INFO "Blackfin GPIO Controller\n");

for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE)
for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE)
reserved_map[gpio_bank(i)] = 0;

#if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE))
Expand Down Expand Up @@ -478,7 +478,7 @@ u32 gpio_pm_setup(void)
u32 sic_iwr = 0;
u16 bank, mask, i, gpio;

for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) {
for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
mask = wakeup_map[gpio_bank(i)];
bank = gpio_bank(i);

Expand Down Expand Up @@ -522,12 +522,11 @@ u32 gpio_pm_setup(void)
return IWR_ENABLE_ALL;
}


void gpio_pm_restore(void)
{
u16 bank, mask, i;

for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) {
for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
mask = wakeup_map[gpio_bank(i)];
bank = gpio_bank(i);

Expand Down Expand Up @@ -591,7 +590,6 @@ int gpio_request(unsigned short gpio, const char *label)
}
EXPORT_SYMBOL(gpio_request);


void gpio_free(unsigned short gpio)
{
unsigned long flags;
Expand All @@ -616,7 +614,6 @@ void gpio_free(unsigned short gpio)
}
EXPORT_SYMBOL(gpio_free);


void gpio_direction_input(unsigned short gpio)
{
unsigned long flags;
Expand Down
5 changes: 3 additions & 2 deletions arch/blackfin/kernel/bfin_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
*/

#include <linux/module.h>
#include <asm/irq.h>
#include <linux/irq.h>
#include <linux/uaccess.h>

#include <asm/checksum.h>
#include <asm/cacheflush.h>
#include <asm/uaccess.h>

/* platform dependent support */

Expand Down
2 changes: 1 addition & 1 deletion arch/blackfin/kernel/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#include <linux/spinlock.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <asm/cacheflush.h>
#include <asm/io.h>
#include <asm/bfin-global.h>

static spinlock_t dma_page_lock;
Expand Down
6 changes: 3 additions & 3 deletions arch/blackfin/kernel/dualcore_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
#include <linux/init.h>
#include <linux/module.h>

static int *testarg = (int*)0xfeb00000;
static int *testarg = (int *)0xfeb00000;

static int test_init(void)
{
*testarg = 1;
printk("Dual core test module inserted: set testarg = [%d]\n @ [%p]\n",
printk(KERN_INFO "Dual core test module inserted: set testarg = [%d]\n @ [%p]\n",
*testarg, testarg);
return 0;
}

static void test_exit(void)
{
printk("Dual core test module removed: testarg = [%d]\n", *testarg);
printk(KERN_INFO "Dual core test module removed: testarg = [%d]\n", *testarg);
}

module_init(test_init);
Expand Down
2 changes: 1 addition & 1 deletion arch/blackfin/kernel/fixed_code.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* BF561 SMP).
*/
#include <linux/linkage.h>
#include <linux/unistd.h>
#include <asm/entry.h>
#include <asm/unistd.h>

.text
ENTRY(_fixed_code_start)
Expand Down
55 changes: 26 additions & 29 deletions arch/blackfin/kernel/flat.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,22 @@ unsigned long bfin_get_addr_from_rp(unsigned long *ptr,
unsigned long val;

switch (type) {
case FLAT_BFIN_RELOC_TYPE_16_BIT:
case FLAT_BFIN_RELOC_TYPE_16H_BIT:
usptr = (unsigned short *)ptr;
pr_debug("*usptr = %x", get_unaligned(usptr));
val = get_unaligned(usptr);
val += *persistent;
break;
case FLAT_BFIN_RELOC_TYPE_16_BIT:
case FLAT_BFIN_RELOC_TYPE_16H_BIT:
usptr = (unsigned short *)ptr;
pr_debug("*usptr = %x", get_unaligned(usptr));
val = get_unaligned(usptr);
val += *persistent;
break;

case FLAT_BFIN_RELOC_TYPE_32_BIT:
pr_debug("*ptr = %lx", get_unaligned(ptr));
val = get_unaligned(ptr);
break;
case FLAT_BFIN_RELOC_TYPE_32_BIT:
pr_debug("*ptr = %lx", get_unaligned(ptr));
val = get_unaligned(ptr);
break;

default:
pr_debug("BINFMT_FLAT: Unknown relocation type %x\n",
type);

return 0;
default:
pr_debug("BINFMT_FLAT: Unknown relocation type %x\n", type);
return 0;
}

/*
Expand Down Expand Up @@ -81,21 +79,20 @@ void bfin_put_addr_at_rp(unsigned long *ptr, unsigned long addr,
int type = (relval >> 26) & 7;

switch (type) {
case FLAT_BFIN_RELOC_TYPE_16_BIT:
put_unaligned(addr, usptr);
pr_debug("new value %x at %p", get_unaligned(usptr),
usptr);
break;
case FLAT_BFIN_RELOC_TYPE_16_BIT:
put_unaligned(addr, usptr);
pr_debug("new value %x at %p", get_unaligned(usptr), usptr);
break;

case FLAT_BFIN_RELOC_TYPE_16H_BIT:
put_unaligned(addr >> 16, usptr);
pr_debug("new value %x", get_unaligned(usptr));
break;
case FLAT_BFIN_RELOC_TYPE_16H_BIT:
put_unaligned(addr >> 16, usptr);
pr_debug("new value %x", get_unaligned(usptr));
break;

case FLAT_BFIN_RELOC_TYPE_32_BIT:
put_unaligned(addr, ptr);
pr_debug("new ptr =%lx", get_unaligned(ptr));
break;
case FLAT_BFIN_RELOC_TYPE_32_BIT:
put_unaligned(addr, ptr);
pr_debug("new ptr =%lx", get_unaligned(ptr));
break;
}
}
EXPORT_SYMBOL(bfin_put_addr_at_rp);
2 changes: 1 addition & 1 deletion arch/blackfin/kernel/irqchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_printf(p, ", %s", action->name);

seq_putc(p, '\n');
unlock:
unlock:
spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) {
seq_printf(p, "Err: %10lu\n", irq_err_count);
Expand Down
Loading

0 comments on commit 1f83b8f

Please sign in to comment.