* [PATCH 4/5] arm: msm: smd: remove unneeded predefines
@ 2010-04-19 18:03 Daniel Walker
2010-04-20 13:37 ` Pavel Machek
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Walker @ 2010-04-19 18:03 UTC (permalink / raw)
To: linux-arm-msm; +Cc: dima, Daniel Walker
This just removed some unneeded predefines. One needed a whole
function moved down further. The others could just be deleted.
No functional changes.
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
---
arch/arm/mach-msm/smd.c | 77 ++++++++++++++++++++++-------------------------
1 files changed, 36 insertions(+), 41 deletions(-)
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index 4dd0d08..2fa567e 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -64,9 +64,6 @@ static struct shared_info smd_info = {
module_param_named(debug_mask, msm_smd_debug_mask,
int, S_IRUGO | S_IWUSR | S_IWGRP);
-void *smem_item(unsigned id, unsigned *size);
-static void smd_diag(void);
-
static unsigned last_heap_free = 0xffffffff;
#define MSM_A2M_INT(n) (MSM_CSR_BASE + 0x400 + (n) * 4)
@@ -154,44 +151,6 @@ LIST_HEAD(smd_ch_list_dsp);
static unsigned char smd_ch_allocated[64];
static struct work_struct probe_work;
-static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type);
-
-static void smd_channel_probe_worker(struct work_struct *work)
-{
- struct smd_alloc_elm *shared;
- unsigned ctype;
- unsigned type;
- unsigned n;
-
- shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64);
- if (!shared) {
- pr_err("smd: cannot find allocation table\n");
- return;
- }
- for (n = 0; n < 64; n++) {
- if (smd_ch_allocated[n])
- continue;
- if (!shared[n].ref_count)
- continue;
- if (!shared[n].name[0])
- continue;
- ctype = shared[n].ctype;
- type = ctype & SMD_TYPE_MASK;
-
- /* DAL channels are stream but neither the modem,
- * nor the DSP correctly indicate this. Fixup manually.
- */
- if (!memcmp(shared[n].name, "DAL", 3))
- ctype = (ctype & (~SMD_KIND_MASK)) | SMD_KIND_STREAM;
-
- type = shared[n].ctype & SMD_TYPE_MASK;
- if ((type == SMD_TYPE_APPS_MODEM) ||
- (type == SMD_TYPE_APPS_DSP))
- if (!smd_alloc_channel(shared[n].name, shared[n].cid, ctype))
- smd_ch_allocated[n] = 1;
- }
-}
-
/* how many bytes are available for reading */
static int smd_stream_read_avail(struct smd_channel *ch)
{
@@ -658,6 +617,42 @@ static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
return 0;
}
+static void smd_channel_probe_worker(struct work_struct *work)
+{
+ struct smd_alloc_elm *shared;
+ unsigned ctype;
+ unsigned type;
+ unsigned n;
+
+ shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64);
+ if (!shared) {
+ pr_err("smd: cannot find allocation table\n");
+ return;
+ }
+ for (n = 0; n < 64; n++) {
+ if (smd_ch_allocated[n])
+ continue;
+ if (!shared[n].ref_count)
+ continue;
+ if (!shared[n].name[0])
+ continue;
+ ctype = shared[n].ctype;
+ type = ctype & SMD_TYPE_MASK;
+
+ /* DAL channels are stream but neither the modem,
+ * nor the DSP correctly indicate this. Fixup manually.
+ */
+ if (!memcmp(shared[n].name, "DAL", 3))
+ ctype = (ctype & (~SMD_KIND_MASK)) | SMD_KIND_STREAM;
+
+ type = shared[n].ctype & SMD_TYPE_MASK;
+ if ((type == SMD_TYPE_APPS_MODEM) ||
+ (type == SMD_TYPE_APPS_DSP))
+ if (!smd_alloc_channel(shared[n].name, shared[n].cid, ctype))
+ smd_ch_allocated[n] = 1;
+ }
+}
+
static void do_nothing_notify(void *priv, unsigned flags)
{
}
--
1.6.2.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 4/5] arm: msm: smd: remove unneeded predefines
2010-04-19 18:03 [PATCH 4/5] arm: msm: smd: remove unneeded predefines Daniel Walker
@ 2010-04-20 13:37 ` Pavel Machek
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2010-04-20 13:37 UTC (permalink / raw)
To: Daniel Walker; +Cc: linux-arm-msm, dima
On Mon 2010-04-19 11:03:08, Daniel Walker wrote:
> This just removed some unneeded predefines. One needed a whole
> function moved down further. The others could just be deleted.
>
> No functional changes.
>
> Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
ack.
> ---
> arch/arm/mach-msm/smd.c | 77 ++++++++++++++++++++++-------------------------
> 1 files changed, 36 insertions(+), 41 deletions(-)
>
> diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
> index 4dd0d08..2fa567e 100644
> --- a/arch/arm/mach-msm/smd.c
> +++ b/arch/arm/mach-msm/smd.c
> @@ -64,9 +64,6 @@ static struct shared_info smd_info = {
> module_param_named(debug_mask, msm_smd_debug_mask,
> int, S_IRUGO | S_IWUSR | S_IWGRP);
>
> -void *smem_item(unsigned id, unsigned *size);
> -static void smd_diag(void);
> -
> static unsigned last_heap_free = 0xffffffff;
>
> #define MSM_A2M_INT(n) (MSM_CSR_BASE + 0x400 + (n) * 4)
> @@ -154,44 +151,6 @@ LIST_HEAD(smd_ch_list_dsp);
> static unsigned char smd_ch_allocated[64];
> static struct work_struct probe_work;
>
> -static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type);
> -
> -static void smd_channel_probe_worker(struct work_struct *work)
> -{
> - struct smd_alloc_elm *shared;
> - unsigned ctype;
> - unsigned type;
> - unsigned n;
> -
> - shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64);
> - if (!shared) {
> - pr_err("smd: cannot find allocation table\n");
> - return;
> - }
> - for (n = 0; n < 64; n++) {
> - if (smd_ch_allocated[n])
> - continue;
> - if (!shared[n].ref_count)
> - continue;
> - if (!shared[n].name[0])
> - continue;
> - ctype = shared[n].ctype;
> - type = ctype & SMD_TYPE_MASK;
> -
> - /* DAL channels are stream but neither the modem,
> - * nor the DSP correctly indicate this. Fixup manually.
> - */
> - if (!memcmp(shared[n].name, "DAL", 3))
> - ctype = (ctype & (~SMD_KIND_MASK)) | SMD_KIND_STREAM;
> -
> - type = shared[n].ctype & SMD_TYPE_MASK;
> - if ((type == SMD_TYPE_APPS_MODEM) ||
> - (type == SMD_TYPE_APPS_DSP))
> - if (!smd_alloc_channel(shared[n].name, shared[n].cid, ctype))
> - smd_ch_allocated[n] = 1;
> - }
> -}
> -
> /* how many bytes are available for reading */
> static int smd_stream_read_avail(struct smd_channel *ch)
> {
> @@ -658,6 +617,42 @@ static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
> return 0;
> }
>
> +static void smd_channel_probe_worker(struct work_struct *work)
> +{
> + struct smd_alloc_elm *shared;
> + unsigned ctype;
> + unsigned type;
> + unsigned n;
> +
> + shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64);
> + if (!shared) {
> + pr_err("smd: cannot find allocation table\n");
> + return;
> + }
> + for (n = 0; n < 64; n++) {
> + if (smd_ch_allocated[n])
> + continue;
> + if (!shared[n].ref_count)
> + continue;
> + if (!shared[n].name[0])
> + continue;
> + ctype = shared[n].ctype;
> + type = ctype & SMD_TYPE_MASK;
> +
> + /* DAL channels are stream but neither the modem,
> + * nor the DSP correctly indicate this. Fixup manually.
> + */
> + if (!memcmp(shared[n].name, "DAL", 3))
> + ctype = (ctype & (~SMD_KIND_MASK)) | SMD_KIND_STREAM;
> +
> + type = shared[n].ctype & SMD_TYPE_MASK;
> + if ((type == SMD_TYPE_APPS_MODEM) ||
> + (type == SMD_TYPE_APPS_DSP))
> + if (!smd_alloc_channel(shared[n].name, shared[n].cid, ctype))
> + smd_ch_allocated[n] = 1;
> + }
> +}
> +
> static void do_nothing_notify(void *priv, unsigned flags)
> {
> }
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-20 13:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-19 18:03 [PATCH 4/5] arm: msm: smd: remove unneeded predefines Daniel Walker
2010-04-20 13:37 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).