summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2005-06-04 06:14:58 +0000
committerDave Airlie <airlied@linux.ie>2005-06-04 06:14:58 +0000
commit83cb1504498ad2ca327bc8341bc21ed6cdb54756 (patch)
tree7d90cc2acf260a268743d10daaab0dee68214a25
parent1d678a518ee97fef3a3f9816cddf199ad7e37509 (diff)
Remove warnings about code mixed with declerations..
-rw-r--r--shared-core/savage_bci.c7
-rw-r--r--shared-core/savage_state.c14
2 files changed, 11 insertions, 10 deletions
diff --git a/shared-core/savage_bci.c b/shared-core/savage_bci.c
index ce7139ad..a288fee0 100644
--- a/shared-core/savage_bci.c
+++ b/shared-core/savage_bci.c
@@ -162,8 +162,8 @@ savage_bci_wait_event_reg(drm_savage_private_t *dev_priv, uint16_t e)
uint16_t savage_bci_emit_event(drm_savage_private_t *dev_priv,
unsigned int flags)
{
- BCI_LOCALS;
uint16_t count;
+ BCI_LOCALS;
if (dev_priv->status_ptr) {
/* coordinate with Xserver */
@@ -416,12 +416,12 @@ uint32_t *savage_dma_alloc(drm_savage_private_t *dev_priv, unsigned int n)
static void savage_dma_flush(drm_savage_private_t *dev_priv)
{
- BCI_LOCALS;
unsigned int first = dev_priv->first_dma_page;
unsigned int cur = dev_priv->current_dma_page;
uint16_t event;
unsigned int wrap, pad, align, len, i;
unsigned long phys_addr;
+ BCI_LOCALS;
if (first == cur &&
dev_priv->dma_pages[cur].used == dev_priv->dma_pages[cur].flushed)
@@ -501,8 +501,9 @@ static void savage_dma_flush(drm_savage_private_t *dev_priv)
static void savage_fake_dma_flush(drm_savage_private_t *dev_priv)
{
- BCI_LOCALS;
unsigned int i, j;
+ BCI_LOCALS;
+
if (dev_priv->first_dma_page == dev_priv->current_dma_page &&
dev_priv->dma_pages[dev_priv->current_dma_page].used == 0)
return;
diff --git a/shared-core/savage_state.c b/shared-core/savage_state.c
index 5fb07638..475695a0 100644
--- a/shared-core/savage_state.c
+++ b/shared-core/savage_state.c
@@ -194,12 +194,12 @@ static int savage_dispatch_state(drm_savage_private_t *dev_priv,
const drm_savage_cmd_header_t *cmd_header,
const uint32_t __user *regs)
{
- DMA_LOCALS;
unsigned int count = cmd_header->state.count;
unsigned int start = cmd_header->state.start;
unsigned int count2 = 0;
unsigned int bci_size;
int ret;
+ DMA_LOCALS;
if (!count)
return 0;
@@ -277,13 +277,13 @@ static int savage_dispatch_dma_prim(drm_savage_private_t *dev_priv,
const drm_savage_cmd_header_t *cmd_header,
const drm_buf_t *dmabuf)
{
- BCI_LOCALS;
unsigned char reorder = 0;
unsigned int prim = cmd_header->prim.prim;
unsigned int skip = cmd_header->prim.skip;
unsigned int n = cmd_header->prim.count;
unsigned int start = cmd_header->prim.start;
unsigned int i;
+ BCI_LOCALS;
if (!dmabuf) {
DRM_ERROR("called without dma buffers!\n");
@@ -419,7 +419,6 @@ static int savage_dispatch_vb_prim(drm_savage_private_t *dev_priv,
unsigned int vb_size,
unsigned int vb_stride)
{
- DMA_LOCALS;
unsigned char reorder = 0;
unsigned int prim = cmd_header->prim.prim;
unsigned int skip = cmd_header->prim.skip;
@@ -427,6 +426,7 @@ static int savage_dispatch_vb_prim(drm_savage_private_t *dev_priv,
unsigned int start = cmd_header->prim.start;
unsigned int vtx_size;
unsigned int i;
+ DMA_LOCALS;
if (!n)
return 0;
@@ -538,12 +538,12 @@ static int savage_dispatch_dma_idx(drm_savage_private_t *dev_priv,
const uint16_t __user *usr_idx,
const drm_buf_t *dmabuf)
{
- BCI_LOCALS;
unsigned char reorder = 0;
unsigned int prim = cmd_header->idx.prim;
unsigned int skip = cmd_header->idx.skip;
unsigned int n = cmd_header->idx.count;
unsigned int i;
+ BCI_LOCALS;
if (!dmabuf) {
DRM_ERROR("called without dma buffers!\n");
@@ -686,13 +686,13 @@ static int savage_dispatch_vb_idx(drm_savage_private_t *dev_priv,
unsigned int vb_size,
unsigned int vb_stride)
{
- DMA_LOCALS;
unsigned char reorder = 0;
unsigned int prim = cmd_header->idx.prim;
unsigned int skip = cmd_header->idx.skip;
unsigned int n = cmd_header->idx.count;
unsigned int vtx_size;
unsigned int i;
+ DMA_LOCALS;
if (!n)
return 0;
@@ -806,10 +806,10 @@ static int savage_dispatch_clear(drm_savage_private_t *dev_priv,
unsigned int nbox,
const drm_clip_rect_t __user *usr_boxes)
{
- DMA_LOCALS;
unsigned int flags = cmd_header->clear0.flags, mask, value;
unsigned int clear_cmd;
unsigned int i, nbufs;
+ DMA_LOCALS;
if (nbox == 0)
return 0;
@@ -884,9 +884,9 @@ static int savage_dispatch_swap(drm_savage_private_t *dev_priv,
unsigned int nbox,
const drm_clip_rect_t __user *usr_boxes)
{
- DMA_LOCALS;
unsigned int swap_cmd;
unsigned int i;
+ DMA_LOCALS;
if (nbox == 0)
return 0;