Skip to content

Commit

Permalink
Staging: sep: kick out various fields we can prove are not needed
Browse files Browse the repository at this point in the history
#1: sep->cache_addr is assigned to sep->rar_addr and never changed
    sep->rar_addr is never assigned after this point

#2: sep->cache_bus ditto for sep->rar_bus

#3  sep->rar_region_addr is assigned but necer used

#4  sep->io_addr is in fact private to the probe function and
    the same as the reg_addr

#5  The remainig sep->io fields are in fact function locals

#6  sep->message_shared_area is assigned once from sep->shared_area
    sep->shared_area does not then change

#7  sep->shared_addr and sep->shared_area_addr are the same thing, ditto
    for the bus addresses.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent 4c29e97 commit 70ae04e
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 101 deletions.
30 changes: 8 additions & 22 deletions drivers/staging/sep/sep_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,23 @@ struct sep_device {

unsigned long in_use;

unsigned long io_bus;
unsigned long io_end_bus;
unsigned long io_memory_size;
void __iomem *io_addr;
/* address of the shared memory allocated during init for SEP driver
(coherent alloc) */
void *shared_addr;
/* the physical address of the shared area */
dma_addr_t shared_bus;

/* restricted access region */
/* restricted access region (coherent alloc) */
dma_addr_t rar_bus;
void *rar_addr;

/* shared memory region */
dma_addr_t shared_bus;
void *shared_addr;

/* firmware regions */
dma_addr_t cache_bus;
/* firmware regions: cache is at rar_addr */
unsigned long cache_size;
void *cache_addr;

/* follows the cache */
dma_addr_t resident_bus;
unsigned long resident_size;
void *resident_addr;

void *rar_region_addr;

/* start address of the access to the SEP registers from driver */
void __iomem *reg_addr;
/* transaction counter that coordinates the transactions between SEP and HOST */
Expand Down Expand Up @@ -88,13 +81,6 @@ struct sep_device {
/* pointer to the workqueue that handles the flow done interrupts */
struct workqueue_struct *flow_wq;

/* address of the shared memory allocated during init for SEP driver */
void *shared_area;
/* the physical address of the shared area */
dma_addr_t shared_area_bus;

/* Message Shared Area start address - will be allocated during init */
void *message_shared_area_addr;
};

static struct sep_device *sep_dev;
Expand Down
Loading

0 comments on commit 70ae04e

Please sign in to comment.