Commit 20fe9922 authored by Vandana BN's avatar Vandana BN Committed by Greg Kroah-Hartman

Staging: kpc2000: kpc_dma: Resolve space errors around pointers and function...

Staging: kpc2000: kpc_dma: Resolve space errors around pointers and function declarations reported by checkpatch.

This patch resolves below errors reported by checkpatch
ERROR: "(foo*)" should be "(foo *)"
ERROR: "foo * bar" should be "foo *bar"
ERROR: "foo __init  bar" should be "foo __init bar"
ERROR: "foo __exit  bar" should be "foo __exit bar"
Signed-off-by: default avatarVandana BN <bnvandana@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0f7aa9d2
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
static static
irqreturn_t ndd_irq_handler(int irq, void *dev_id) irqreturn_t ndd_irq_handler(int irq, void *dev_id)
{ {
struct kpc_dma_device *ldev = (struct kpc_dma_device*)dev_id; struct kpc_dma_device *ldev = (struct kpc_dma_device *)dev_id;
if ((GetEngineControl(ldev) & ENG_CTL_IRQ_ACTIVE) || (ldev->desc_completed->MyDMAAddr != GetEngineCompletePtr(ldev))) if ((GetEngineControl(ldev) & ENG_CTL_IRQ_ACTIVE) || (ldev->desc_completed->MyDMAAddr != GetEngineCompletePtr(ldev)))
schedule_work(&ldev->irq_work); schedule_work(&ldev->irq_work);
...@@ -85,8 +85,8 @@ void start_dma_engine(struct kpc_dma_device *eng) ...@@ -85,8 +85,8 @@ void start_dma_engine(struct kpc_dma_device *eng)
int setup_dma_engine(struct kpc_dma_device *eng, u32 desc_cnt) int setup_dma_engine(struct kpc_dma_device *eng, u32 desc_cnt)
{ {
u32 caps; u32 caps;
struct kpc_dma_descriptor * cur; struct kpc_dma_descriptor *cur;
struct kpc_dma_descriptor * next; struct kpc_dma_descriptor *next;
dma_addr_t next_handle; dma_addr_t next_handle;
dma_addr_t head_handle; dma_addr_t head_handle;
unsigned int i; unsigned int i;
...@@ -208,7 +208,7 @@ void stop_dma_engine(struct kpc_dma_device *eng) ...@@ -208,7 +208,7 @@ void stop_dma_engine(struct kpc_dma_device *eng)
void destroy_dma_engine(struct kpc_dma_device *eng) void destroy_dma_engine(struct kpc_dma_device *eng)
{ {
struct kpc_dma_descriptor * cur; struct kpc_dma_descriptor *cur;
dma_addr_t cur_handle; dma_addr_t cur_handle;
unsigned int i; unsigned int i;
......
...@@ -55,7 +55,7 @@ int kpc_dma_transfer(struct dev_private_data *priv, struct kiocb *kcb, unsigned ...@@ -55,7 +55,7 @@ int kpc_dma_transfer(struct dev_private_data *priv, struct kiocb *kcb, unsigned
ldev = priv->ldev; ldev = priv->ldev;
BUG_ON(ldev == NULL); BUG_ON(ldev == NULL);
dev_dbg(&priv->ldev->pldev->dev, "kpc_dma_transfer(priv = [%p], kcb = [%p], iov_base = [%p], iov_len = %ld) ldev = [%p]\n", priv, kcb, (void*)iov_base, iov_len, ldev); dev_dbg(&priv->ldev->pldev->dev, "kpc_dma_transfer(priv = [%p], kcb = [%p], iov_base = [%p], iov_len = %ld) ldev = [%p]\n", priv, kcb, (void *)iov_base, iov_len, ldev);
acd = kzalloc(sizeof(*acd), GFP_KERNEL); acd = kzalloc(sizeof(*acd), GFP_KERNEL);
if (!acd){ if (!acd){
......
...@@ -21,7 +21,7 @@ static LIST_HEAD(kpc_dma_list); ...@@ -21,7 +21,7 @@ static LIST_HEAD(kpc_dma_list);
/********** kpc_dma_list list management **********/ /********** kpc_dma_list list management **********/
struct kpc_dma_device * kpc_dma_lookup_device(int minor) struct kpc_dma_device *kpc_dma_lookup_device(int minor)
{ {
struct kpc_dma_device *c; struct kpc_dma_device *c;
mutex_lock(&kpc_dma_mtx); mutex_lock(&kpc_dma_mtx);
...@@ -36,14 +36,14 @@ struct kpc_dma_device * kpc_dma_lookup_device(int minor) ...@@ -36,14 +36,14 @@ struct kpc_dma_device * kpc_dma_lookup_device(int minor)
return c; return c;
} }
void kpc_dma_add_device(struct kpc_dma_device * ldev) void kpc_dma_add_device(struct kpc_dma_device *ldev)
{ {
mutex_lock(&kpc_dma_mtx); mutex_lock(&kpc_dma_mtx);
list_add(&ldev->list, &kpc_dma_list); list_add(&ldev->list, &kpc_dma_list);
mutex_unlock(&kpc_dma_mtx); mutex_unlock(&kpc_dma_mtx);
} }
void kpc_dma_del_device(struct kpc_dma_device * ldev) void kpc_dma_del_device(struct kpc_dma_device *ldev)
{ {
mutex_lock(&kpc_dma_mtx); mutex_lock(&kpc_dma_mtx);
list_del(&ldev->list); list_del(&ldev->list);
...@@ -80,7 +80,7 @@ static ssize_t show_engine_regs(struct device *dev, struct device_attribute *at ...@@ -80,7 +80,7 @@ static ssize_t show_engine_regs(struct device *dev, struct device_attribute *at
} }
DEVICE_ATTR(engine_regs, 0444, show_engine_regs, NULL); DEVICE_ATTR(engine_regs, 0444, show_engine_regs, NULL);
static const struct attribute * ndd_attr_list[] = { static const struct attribute *ndd_attr_list[] = {
&dev_attr_engine_regs.attr, &dev_attr_engine_regs.attr,
NULL, NULL,
}; };
...@@ -203,7 +203,7 @@ struct platform_driver kpc_dma_plat_driver_i = { ...@@ -203,7 +203,7 @@ struct platform_driver kpc_dma_plat_driver_i = {
}; };
static static
int __init kpc_dma_driver_init(void) int __init kpc_dma_driver_init(void)
{ {
int err; int err;
...@@ -239,7 +239,7 @@ int __init kpc_dma_driver_init(void) ...@@ -239,7 +239,7 @@ int __init kpc_dma_driver_init(void)
module_init(kpc_dma_driver_init); module_init(kpc_dma_driver_init);
static static
void __exit kpc_dma_driver_exit(void) void __exit kpc_dma_driver_exit(void)
{ {
platform_driver_unregister(&kpc_dma_plat_driver_i); platform_driver_unregister(&kpc_dma_plat_driver_i);
class_destroy(kpc_dma_class); class_destroy(kpc_dma_class);
......
...@@ -56,7 +56,7 @@ struct dev_private_data { ...@@ -56,7 +56,7 @@ struct dev_private_data {
u64 user_sts; u64 user_sts;
}; };
struct kpc_dma_device * kpc_dma_lookup_device(int minor); struct kpc_dma_device *kpc_dma_lookup_device(int minor);
extern struct file_operations kpc_dma_fops; extern struct file_operations kpc_dma_fops;
...@@ -172,12 +172,12 @@ void SetClearEngineControl(struct kpc_dma_device *eng, u32 set_bits, u32 clear_ ...@@ -172,12 +172,12 @@ void SetClearEngineControl(struct kpc_dma_device *eng, u32 set_bits, u32 clear_
} }
static inline static inline
void SetEngineNextPtr(struct kpc_dma_device *eng, struct kpc_dma_descriptor * desc) void SetEngineNextPtr(struct kpc_dma_device *eng, struct kpc_dma_descriptor *desc)
{ {
writel(desc->MyDMAAddr, eng->eng_regs + 2); writel(desc->MyDMAAddr, eng->eng_regs + 2);
} }
static inline static inline
void SetEngineSWPtr(struct kpc_dma_device *eng, struct kpc_dma_descriptor * desc) void SetEngineSWPtr(struct kpc_dma_device *eng, struct kpc_dma_descriptor *desc)
{ {
writel(desc->MyDMAAddr, eng->eng_regs + 3); writel(desc->MyDMAAddr, eng->eng_regs + 3);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment