From: Maxim Levitsky <maximlevitsky@gmail.com>
To: Alex Dubov <oakad@yahoo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Maxim Levitsky <maximlevitsky@gmail.com>
Subject: [PATCH 18/29] memstick: jmb38x_ms: rename functions
Date: Sat, 23 Oct 2010 01:53:46 +0200 [thread overview]
Message-ID: <1287791637-10329-19-git-send-email-maximlevitsky@gmail.com> (raw)
In-Reply-To: <1287791637-10329-1-git-send-email-maximlevitsky@gmail.com>
Give functions names that I hope will describe them better.
Its a matter of personal taste somewhat, I admit.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
---
drivers/memstick/host/jmb38x_ms.c | 38 ++++++++++++++++++------------------
drivers/memstick/host/jmb38x_ms.h | 4 +-
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c
index 2e10104..295f755 100644
--- a/drivers/memstick/host/jmb38x_ms.c
+++ b/drivers/memstick/host/jmb38x_ms.c
@@ -22,7 +22,7 @@
static int no_dma;
static int debug;
-static unsigned int j38ms_read_data(struct j38ms_host *host,
+static unsigned int j38ms_read_fifo_pio(struct j38ms_host *host,
unsigned char *buf, unsigned int length)
{
unsigned int off = 0;
@@ -60,7 +60,7 @@ static unsigned int j38ms_read_data(struct j38ms_host *host,
return off;
}
-static unsigned int j38ms_write_data(struct j38ms_host *host,
+static unsigned int j38ms_write_fifo_pio(struct j38ms_host *host,
unsigned char *buf,
unsigned int length)
{
@@ -149,12 +149,12 @@ static int j38ms_transfer_data(struct j38ms_host *host)
if (host->req->data_dir == WRITE)
t_size = !(host->cmd_flags & REG_DATA)
- ? j38ms_write_data(host, buf, p_cnt)
- : j38ms_write_reg_data(host, buf, p_cnt);
+ ? j38ms_write_fifo_pio(host, buf, p_cnt)
+ : j38ms_write_tpc_inline(host, buf, p_cnt);
else
t_size = !(host->cmd_flags & REG_DATA)
- ? j38ms_read_data(host, buf, p_cnt)
- : j38ms_read_reg_data(host, buf, p_cnt);
+ ? j38ms_read_fifo_pio(host, buf, p_cnt)
+ : j38ms_read_tpc_inline(host, buf, p_cnt);
if (host->req->long_data) {
kunmap_atomic(buf - p_off, KM_BIO_SRC_IRQ);
@@ -180,7 +180,7 @@ static int j38ms_transfer_data(struct j38ms_host *host)
return length;
}
-static unsigned int j38ms_read_reg_data(struct j38ms_host *host,
+static unsigned int j38ms_read_tpc_inline(struct j38ms_host *host,
unsigned char *buf,
unsigned int length)
{
@@ -206,7 +206,7 @@ static unsigned int j38ms_read_reg_data(struct j38ms_host *host,
return off;
}
-static unsigned int j38ms_write_reg_data(struct j38ms_host *host,
+static unsigned int j38ms_write_tpc_inline(struct j38ms_host *host,
unsigned char *buf,
unsigned int length)
{
@@ -232,7 +232,7 @@ static unsigned int j38ms_write_reg_data(struct j38ms_host *host,
return off;
}
-static int j38ms_issue_cmd(struct memstick_host *msh)
+static int j38ms_execute_tpc(struct memstick_host *msh)
{
struct j38ms_host *host = memstick_priv(msh);
unsigned char *data;
@@ -330,7 +330,7 @@ static int j38ms_issue_cmd(struct memstick_host *msh)
return 0;
}
-static void j38ms_complete_cmd(struct memstick_host *msh, int last)
+static void j38ms_complete_tpc(struct memstick_host *msh, int last)
{
struct j38ms_host *host = memstick_priv(msh);
unsigned int t_val = 0;
@@ -370,7 +370,7 @@ static void j38ms_complete_cmd(struct memstick_host *msh, int last)
if (!last) {
do {
rc = memstick_next_req(msh, &host->req);
- } while (!rc && j38ms_issue_cmd(msh));
+ } while (!rc && j38ms_execute_tpc(msh));
} else {
do {
rc = memstick_next_req(msh, &host->req);
@@ -446,13 +446,13 @@ static irqreturn_t j38ms_isr(int irq, void *dev_id)
&& (((host->cmd_flags & CMD_READY)
&& (host->cmd_flags & FIFO_READY))
|| host->req->error))
- j38ms_complete_cmd(msh, 0);
+ j38ms_complete_tpc(msh, 0);
spin_unlock(&host->lock);
return IRQ_HANDLED;
}
-static void j38ms_abort(unsigned long data)
+static void j38ms_irq_timeout(unsigned long data)
{
struct memstick_host *msh = (struct memstick_host *)data;
struct j38ms_host *host = memstick_priv(msh);
@@ -462,12 +462,12 @@ static void j38ms_abort(unsigned long data)
spin_lock_irqsave(&host->lock, flags);
if (host->req) {
host->req->error = -ETIME;
- j38ms_complete_cmd(msh, 0);
+ j38ms_complete_tpc(msh, 0);
}
spin_unlock_irqrestore(&host->lock, flags);
}
-static void j38ms_req_tasklet(unsigned long data)
+static void j38ms_submit_tasklet(unsigned long data)
{
struct memstick_host *msh = (struct memstick_host *)data;
struct j38ms_host *host = memstick_priv(msh);
@@ -479,7 +479,7 @@ static void j38ms_req_tasklet(unsigned long data)
do {
rc = memstick_next_req(msh, &host->req);
dev_dbg(&host->chip->pdev->dev, "tasklet req %d\n", rc);
- } while (!rc && j38ms_issue_cmd(msh));
+ } while (!rc && j38ms_execute_tpc(msh));
}
spin_unlock_irqrestore(&host->lock, flags);
}
@@ -713,13 +713,13 @@ static struct memstick_host *j38ms_alloc_host(struct j38ms *jm, int cnt)
host->irq = jm->pdev->irq;
host->timeout_jiffies = msecs_to_jiffies(1000);
- tasklet_init(&host->notify, j38ms_req_tasklet, (unsigned long)msh);
+ tasklet_init(&host->notify, j38ms_submit_tasklet, (unsigned long)msh);
msh->request = j38ms_submit_req;
msh->set_param = j38ms_set_param;
msh->caps = MEMSTICK_CAP_PAR4 | MEMSTICK_CAP_PAR8;
- setup_timer(&host->timer, j38ms_abort, (unsigned long)msh);
+ setup_timer(&host->timer, j38ms_irq_timeout, (unsigned long)msh);
if (!request_irq(host->irq, j38ms_isr, IRQF_SHARED, host->host_id,
msh))
@@ -835,7 +835,7 @@ static void j38ms_remove(struct pci_dev *dev)
spin_lock_irqsave(&host->lock, flags);
if (host->req) {
host->req->error = -ETIME;
- j38ms_complete_cmd(jm->hosts[cnt], 1);
+ j38ms_complete_tpc(jm->hosts[cnt], 1);
}
spin_unlock_irqrestore(&host->lock, flags);
diff --git a/drivers/memstick/host/jmb38x_ms.h b/drivers/memstick/host/jmb38x_ms.h
index a940b5d..44e1fc1 100644
--- a/drivers/memstick/host/jmb38x_ms.h
+++ b/drivers/memstick/host/jmb38x_ms.h
@@ -187,10 +187,10 @@ enum {
#define dbg_v(host, format, ...) __dbg(host, 2, format, ## __VA_ARGS__)
#define dbg_reg(host, format, ...) __dbg(host, 3, format, ## __VA_ARGS__)
-static unsigned int j38ms_read_reg_data(struct j38ms_host *host,
+static unsigned int j38ms_read_tpc_inline(struct j38ms_host *host,
unsigned char *buf,
unsigned int length);
-static unsigned int j38ms_write_reg_data(struct j38ms_host *host,
+static unsigned int j38ms_write_tpc_inline(struct j38ms_host *host,
unsigned char *buf,
unsigned int length);
--
1.7.1
next prev parent reply other threads:[~2010-10-22 23:57 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 23:53 [PATCH 0/29] My patch queue for memorystick subsystem Maxim Levitsky
2010-10-22 23:53 ` [PATCH 01/29] memstick: core: header cleanups Maxim Levitsky
2010-10-25 14:44 ` Alex Dubov
2010-10-26 1:10 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 02/29] memstick: core: reorder functions This patch just reorders functions in memstick.c So that host specific and card driver specific functions are now grouped together. This makes it easier to understand the code Maxim Levitsky
2010-10-25 14:50 ` Alex Dubov
2010-10-26 1:14 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 03/29] memstick: core: add new functions Maxim Levitsky
2010-10-25 14:56 ` Alex Dubov
2010-10-26 1:20 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 04/29] memstick: core: rework state machines Maxim Levitsky
2010-10-25 15:01 ` Alex Dubov
2010-10-26 1:34 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 05/29] memstick: mspro_block: move declarations to header and refactor things a bit Maxim Levitsky
2010-10-25 15:07 ` Alex Dubov
2010-10-26 1:46 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 06/29] memstick: mspro: kill the BKL Maxim Levitsky
2010-10-25 15:12 ` Alex Dubov
2010-10-26 1:50 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 07/29] memstick: mspro: two fixes Maxim Levitsky
2010-10-25 15:13 ` Alex Dubov
2010-10-26 1:51 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 08/29] memstick: mspro: add comments to few functions Maxim Levitsky
2010-10-25 15:18 ` Alex Dubov
2010-10-26 1:54 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 09/29] memstick: rework state machines + attribute read function Maxim Levitsky
2010-10-25 15:23 ` Alex Dubov
2010-10-26 1:57 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 10/29] memstick: mspro: create _setup_io helper Maxim Levitsky
2010-10-25 15:25 ` Alex Dubov
2010-10-26 1:58 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 11/29] memstick: mspro: use MS_TPC_EX_SET_CMD Maxim Levitsky
2010-10-25 15:27 ` Alex Dubov
2010-10-26 2:00 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 12/29] memstick: mspro: rework interface switch Maxim Levitsky
2010-10-25 15:28 ` Alex Dubov
2010-10-26 2:01 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 13/29] memstick: core: stop passing pointer to card->current_mrq Maxim Levitsky
2010-10-25 15:41 ` Alex Dubov
2010-10-26 2:04 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 14/29] memstick: remove the memstick_set_rw_addr Maxim Levitsky
2010-10-25 15:55 ` Alex Dubov
2010-10-26 2:08 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 15/29] memstick: jmb38x_ms: Create header Maxim Levitsky
2010-10-25 15:56 ` Alex Dubov
2010-10-26 2:10 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 16/29] memstick: jmb38x_ms: s/jmb38x_ms/j38ms/g Maxim Levitsky
2010-10-25 15:58 ` Alex Dubov
2010-10-26 2:13 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 17/29] memstick: jmb38x_ms: move "reg_data" functions together Maxim Levitsky
2010-10-25 16:00 ` Alex Dubov
2010-10-26 2:14 ` Maxim Levitsky
2010-10-22 23:53 ` Maxim Levitsky [this message]
2010-10-25 16:00 ` [PATCH 18/29] memstick: jmb38x_ms: rename functions Alex Dubov
2010-10-26 2:17 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 19/29] memstick: jmb38x_ms: add register read/write functions Maxim Levitsky
2010-10-25 16:03 ` Alex Dubov
2010-10-26 2:19 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 20/29] memstick: jmb38x_ms: rework PIO Maxim Levitsky
2010-10-25 16:05 ` Alex Dubov
2010-10-26 2:21 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 21/29] memstick: jmb38x_ms: rework TPC execution Maxim Levitsky
2010-10-25 16:08 ` Alex Dubov
2010-10-26 2:22 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 22/29] memstick: jmb38x_ms: rework ISR Maxim Levitsky
2010-10-25 16:11 ` Alex Dubov
2010-10-26 2:23 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 23/29] memstick: jmb38x_ms: use DMA for all TPCs with len greater that 8 by default Maxim Levitsky
2010-10-25 16:12 ` Alex Dubov
2010-10-26 2:29 ` Maxim Levitsky
2010-10-22 23:53 ` [PATCH 24/29] memstick: jmb38x_ms: rework processing of the TPC one after another Maxim Levitsky
2010-10-25 16:14 ` Alex Dubov
2010-10-22 23:53 ` [PATCH 25/29] memstick: jmb38x_ms: pass j38ms_host to few functions instead of memstick_host Maxim Levitsky
2010-10-22 23:53 ` [PATCH 26/29] memstick: jmb38x_ms: rework hardware setup/reset Maxim Levitsky
2010-10-25 16:17 ` Alex Dubov
2010-10-22 23:53 ` [PATCH 27/29] memstick: jmb38x_ms: minor additions Maxim Levitsky
2010-10-22 23:53 ` [PATCH 28/29] memstick: add support for legacy memorysticks Maxim Levitsky
2010-10-22 23:53 ` [PATCH 29/29] memstick: Add driver for Ricoh R5C592 Card reader Maxim Levitsky
2010-10-25 2:01 ` [PATCH 0/29] My patch queue for memorystick subsystem Maxim Levitsky
2010-10-25 14:39 ` Alex Dubov
2010-10-25 16:07 ` Andrew Morton
2010-10-25 16:10 ` Alex Dubov
2010-10-26 2:32 ` Maxim Levitsky
2010-10-25 16:25 ` Alex Dubov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1287791637-10329-19-git-send-email-maximlevitsky@gmail.com \
--to=maximlevitsky@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oakad@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome