2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 18:23:53 +08:00

dmaengine/amba-pl08x: Resolve formatting issues

There were few formatting related issues in code. This patch fixes them.
Fixes include:
- Remove extra blank lines
- align code to 80 cols
- combine several lines to one line

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
Viresh Kumar 2011-08-05 15:32:27 +05:30 committed by Vinod Koul
parent 47850a2730
commit 3e27ee8448

View File

@ -125,7 +125,8 @@ struct pl08x_lli {
* @phy_chans: array of data for the physical channels * @phy_chans: array of data for the physical channels
* @pool: a pool for the LLI descriptors * @pool: a pool for the LLI descriptors
* @pool_ctr: counter of LLIs in the pool * @pool_ctr: counter of LLIs in the pool
* @lli_buses: bitmask to or in to LLI pointer selecting AHB port for LLI fetches * @lli_buses: bitmask to or in to LLI pointer selecting AHB port for LLI
* fetches
* @mem_buses: set to indicate memory transfers on AHB2. * @mem_buses: set to indicate memory transfers on AHB2.
* @lock: a spinlock for this struct * @lock: a spinlock for this struct
*/ */
@ -271,7 +272,6 @@ static void pl08x_resume_phy_chan(struct pl08x_phy_chan *ch)
writel(val, ch->base + PL080_CH_CONFIG); writel(val, ch->base + PL080_CH_CONFIG);
} }
/* /*
* pl08x_terminate_phy_chan() stops the channel, clears the FIFO and * pl08x_terminate_phy_chan() stops the channel, clears the FIFO and
* clears any pending interrupt status. This should not be used for * clears any pending interrupt status. This should not be used for
@ -546,7 +546,8 @@ static void pl08x_fill_lli_for_desc(struct pl08x_lli_build_data *bd,
llis_va[num_llis].cctl = cctl; llis_va[num_llis].cctl = cctl;
llis_va[num_llis].src = bd->srcbus.addr; llis_va[num_llis].src = bd->srcbus.addr;
llis_va[num_llis].dst = bd->dstbus.addr; llis_va[num_llis].dst = bd->dstbus.addr;
llis_va[num_llis].lli = llis_bus + (num_llis + 1) * sizeof(struct pl08x_lli); llis_va[num_llis].lli = llis_bus + (num_llis + 1) *
sizeof(struct pl08x_lli);
llis_va[num_llis].lli |= bd->lli_bus; llis_va[num_llis].lli |= bd->lli_bus;
if (cctl & PL080_CONTROL_SRC_INCR) if (cctl & PL080_CONTROL_SRC_INCR)
@ -583,12 +584,10 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
struct pl08x_lli_build_data bd; struct pl08x_lli_build_data bd;
int num_llis = 0; int num_llis = 0;
u32 cctl; u32 cctl;
size_t max_bytes_per_lli; size_t max_bytes_per_lli, total_bytes = 0;
size_t total_bytes = 0;
struct pl08x_lli *llis_va; struct pl08x_lli *llis_va;
txd->llis_va = dma_pool_alloc(pl08x->pool, GFP_NOWAIT, txd->llis_va = dma_pool_alloc(pl08x->pool, GFP_NOWAIT, &txd->llis_bus);
&txd->llis_bus);
if (!txd->llis_va) { if (!txd->llis_va) {
dev_err(&pl08x->adev->dev, "%s no memory for llis\n", __func__); dev_err(&pl08x->adev->dev, "%s no memory for llis\n", __func__);
return 0; return 0;
@ -779,7 +778,6 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
total_bytes += lli_len; total_bytes += lli_len;
} }
if (odd_bytes) { if (odd_bytes) {
/* /*
* Creep past the boundary, maintaining * Creep past the boundary, maintaining
@ -916,9 +914,7 @@ static int prep_phy_channel(struct pl08x_dma_chan *plchan,
* need, but for slaves the physical signals may be muxed! * need, but for slaves the physical signals may be muxed!
* Can the platform allow us to use this channel? * Can the platform allow us to use this channel?
*/ */
if (plchan->slave && if (plchan->slave && ch->signal < 0 && pl08x->pd->get_signal) {
ch->signal < 0 &&
pl08x->pd->get_signal) {
ret = pl08x->pd->get_signal(plchan); ret = pl08x->pd->get_signal(plchan);
if (ret < 0) { if (ret < 0) {
dev_dbg(&pl08x->adev->dev, dev_dbg(&pl08x->adev->dev,
@ -1007,10 +1003,8 @@ static struct dma_async_tx_descriptor *pl08x_prep_dma_interrupt(
* If slaves are relying on interrupts to signal completion this function * If slaves are relying on interrupts to signal completion this function
* must not be called with interrupts disabled. * must not be called with interrupts disabled.
*/ */
static enum dma_status static enum dma_status pl08x_dma_tx_status(struct dma_chan *chan,
pl08x_dma_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate)
dma_cookie_t cookie,
struct dma_tx_state *txstate)
{ {
struct pl08x_dma_chan *plchan = to_pl08x_chan(chan); struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
dma_cookie_t last_used; dma_cookie_t last_used;
@ -1588,8 +1582,8 @@ static void pl08x_tasklet(unsigned long data)
*/ */
list_for_each_entry(waiting, &pl08x->memcpy.channels, list_for_each_entry(waiting, &pl08x->memcpy.channels,
chan.device_node) { chan.device_node) {
if (waiting->state == PL08X_CHAN_WAITING && if (waiting->state == PL08X_CHAN_WAITING &&
waiting->waiting != NULL) { waiting->waiting != NULL) {
int ret; int ret;
/* This should REALLY not fail now */ /* This should REALLY not fail now */
@ -1684,9 +1678,7 @@ static void pl08x_dma_slave_init(struct pl08x_dma_chan *chan)
* Make a local wrapper to hold required data * Make a local wrapper to hold required data
*/ */
static int pl08x_dma_init_virtual_channels(struct pl08x_driver_data *pl08x, static int pl08x_dma_init_virtual_channels(struct pl08x_driver_data *pl08x,
struct dma_device *dmadev, struct dma_device *dmadev, unsigned int channels, bool slave)
unsigned int channels,
bool slave)
{ {
struct pl08x_dma_chan *chan; struct pl08x_dma_chan *chan;
int i; int i;
@ -1836,9 +1828,9 @@ static const struct file_operations pl08x_debugfs_operations = {
static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x) static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
{ {
/* Expose a simple debugfs interface to view all clocks */ /* Expose a simple debugfs interface to view all clocks */
(void) debugfs_create_file(dev_name(&pl08x->adev->dev), S_IFREG | S_IRUGO, (void) debugfs_create_file(dev_name(&pl08x->adev->dev),
NULL, pl08x, S_IFREG | S_IRUGO, NULL, pl08x,
&pl08x_debugfs_operations); &pl08x_debugfs_operations);
} }
#else #else
@ -1973,8 +1965,7 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
/* Register slave channels */ /* Register slave channels */
ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->slave, ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->slave,
pl08x->pd->num_slave_channels, pl08x->pd->num_slave_channels, true);
true);
if (ret <= 0) { if (ret <= 0) {
dev_warn(&pl08x->adev->dev, dev_warn(&pl08x->adev->dev,
"%s failed to enumerate slave channels - %d\n", "%s failed to enumerate slave channels - %d\n",