* [PATCH 0/1] Fixing coding guidelines in drivers/staging/android/ion
@ 2017-02-26 16:54 pjambhlekar
2017-02-26 16:54 ` [PATCH 1/1] Fixing coding guidelines in drivers/staging/android/ion/* pjambhlekar
0 siblings, 1 reply; 3+ messages in thread
From: pjambhlekar @ 2017-02-26 16:54 UTC (permalink / raw)
To: Laura Abbott, Sumit Semwal, Greg Kroah-Hartman,
Arve Hjønnevåg, Riley Andrews
Cc: linux-kernel
Coding guidelines are fixed by running checkpatch.pl
pjambhlekar (1):
Fixing coding guidelines in drivers/staging/android/ion/*
drivers/staging/android/ion/ion-ioctl.c | 2 +-
drivers/staging/android/ion/ion.c | 8 ++++----
drivers/staging/android/ion/ion_cma_heap.c | 3 +--
drivers/staging/android/ion/ion_dummy_driver.c | 2 +-
drivers/staging/android/ion/ion_system_heap.c | 2 --
5 files changed, 7 insertions(+), 10 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] Fixing coding guidelines in drivers/staging/android/ion/*
2017-02-26 16:54 [PATCH 0/1] Fixing coding guidelines in drivers/staging/android/ion pjambhlekar
@ 2017-02-26 16:54 ` pjambhlekar
2017-02-26 17:06 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: pjambhlekar @ 2017-02-26 16:54 UTC (permalink / raw)
To: Laura Abbott, Sumit Semwal, Greg Kroah-Hartman,
Arve Hjønnevåg, Riley Andrews
Cc: linux-kernel
Signed-off-by: pjambhlekar <pushkar.iit@gmail.com>
---
drivers/staging/android/ion/ion-ioctl.c | 2 +-
drivers/staging/android/ion/ion.c | 8 ++++----
drivers/staging/android/ion/ion_cma_heap.c | 3 +--
drivers/staging/android/ion/ion_dummy_driver.c | 2 +-
drivers/staging/android/ion/ion_system_heap.c | 2 --
5 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/android/ion/ion-ioctl.c b/drivers/staging/android/ion/ion-ioctl.c
index 9ff815a..4435a95 100644
--- a/drivers/staging/android/ion/ion-ioctl.c
+++ b/drivers/staging/android/ion/ion-ioctl.c
@@ -95,7 +95,7 @@ long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
struct ion_handle *handle;
handle = ion_alloc(client, data.allocation.len,
- data.allocation.align,
+ data.allocation.align,
data.allocation.heap_id_mask,
data.allocation.flags);
if (IS_ERR(handle))
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 2c3ffbc..c24795d 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -131,7 +131,7 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap,
goto err2;
}
- if (buffer->sg_table == NULL) {
+ if (!buffer->sg_table) {
WARN_ONCE(1, "This heap needs to set the sgtable");
ret = -EINVAL;
goto err1;
@@ -350,7 +350,7 @@ struct ion_handle *ion_handle_get_by_id_nolock(struct ion_client *client,
}
struct ion_handle *ion_handle_get_by_id(struct ion_client *client,
- int id)
+ int id)
{
struct ion_handle *handle;
@@ -433,7 +433,7 @@ struct ion_handle *ion_alloc(struct ion_client *client, size_t len,
}
up_read(&dev->lock);
- if (buffer == NULL)
+ if (!buffer)
return ERR_PTR(-ENODEV);
if (IS_ERR(buffer))
@@ -491,7 +491,7 @@ static void *ion_buffer_kmap_get(struct ion_buffer *buffer)
return buffer->vaddr;
}
vaddr = buffer->heap->ops->map_kernel(buffer->heap, buffer);
- if (WARN_ONCE(vaddr == NULL,
+ if (WARN_ONCE(!vaddr,
"heap->ops->map_kernel should return ERR_PTR on error"))
return ERR_PTR(-EINVAL);
if (IS_ERR(vaddr))
diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c
index 6c40685..13e8031 100644
--- a/drivers/staging/android/ion/ion_cma_heap.c
+++ b/drivers/staging/android/ion/ion_cma_heap.c
@@ -37,7 +37,6 @@ struct ion_cma_buffer_info {
struct sg_table *table;
};
-
/* ION CMA heap operations functions */
static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
unsigned long len, unsigned long align,
@@ -59,7 +58,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
if (!info)
return -ENOMEM;
- info->cpu_addr = dma_alloc_coherent(dev, len, &(info->handle),
+ info->cpu_addr = dma_alloc_coherent(dev, len, &info->handle,
GFP_HIGHUSER | __GFP_ZERO);
if (!info->cpu_addr) {
diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c
index cf5c010..48913c7 100644
--- a/drivers/staging/android/ion/ion_dummy_driver.c
+++ b/drivers/staging/android/ion/ion_dummy_driver.c
@@ -75,7 +75,6 @@ static int __init ion_dummy_init(void)
if (!heaps)
return -ENOMEM;
-
/* Allocate a dummy carveout heap */
carveout_ptr = alloc_pages_exact(
dummy_heaps[ION_HEAP_TYPE_CARVEOUT].size,
@@ -153,4 +152,5 @@ static void __exit ion_dummy_exit(void)
chunk_ptr = NULL;
}
}
+
__exitcall(ion_dummy_exit);
diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c
index 3ebbb75..9416d82 100644
--- a/drivers/staging/android/ion/ion_system_heap.c
+++ b/drivers/staging/android/ion/ion_system_heap.c
@@ -102,7 +102,6 @@ static void free_buffer_page(struct ion_system_heap *heap,
ion_page_pool_free(pool, page);
}
-
static struct page *alloc_largest_available(struct ion_system_heap *heap,
struct ion_buffer *buffer,
unsigned long size,
@@ -263,7 +262,6 @@ static struct ion_heap_ops system_heap_ops = {
static int ion_system_heap_debug_show(struct ion_heap *heap, struct seq_file *s,
void *unused)
{
-
struct ion_system_heap *sys_heap = container_of(heap,
struct ion_system_heap,
heap);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Fixing coding guidelines in drivers/staging/android/ion/*
2017-02-26 16:54 ` [PATCH 1/1] Fixing coding guidelines in drivers/staging/android/ion/* pjambhlekar
@ 2017-02-26 17:06 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2017-02-26 17:06 UTC (permalink / raw)
To: pjambhlekar
Cc: Laura Abbott, Sumit Semwal, Arve Hjønnevåg,
Riley Andrews, linux-kernel
On Sun, Feb 26, 2017 at 10:24:02PM +0530, pjambhlekar wrote:
> Signed-off-by: pjambhlekar <pushkar.iit@gmail.com>
> ---
> drivers/staging/android/ion/ion-ioctl.c | 2 +-
> drivers/staging/android/ion/ion.c | 8 ++++----
> drivers/staging/android/ion/ion_cma_heap.c | 3 +--
> drivers/staging/android/ion/ion_dummy_driver.c | 2 +-
> drivers/staging/android/ion/ion_system_heap.c | 2 --
> 5 files changed, 7 insertions(+), 10 deletions(-)
How come you didn't read what my patch-bot sent you the last time you
sent me this patch? Please fix up the problems it found last time and
resend if you wish for us to be able to review this patch (hint, I can't
take a path with no changelog text, and you forgot to use
get_maintainer.pl to find the correct mailing list to cc:).
Also, I need a "full" name in your from and signed-off-by line, unless
you really only use one word for when you sign legal documents?
Take your time, relax, fix things up, resend it to yourself first to
verify you got it all correct, and then you can send it to us. Please
take at least a day to do this before resending, there is no rush.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-26 18:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-26 16:54 [PATCH 0/1] Fixing coding guidelines in drivers/staging/android/ion pjambhlekar
2017-02-26 16:54 ` [PATCH 1/1] Fixing coding guidelines in drivers/staging/android/ion/* pjambhlekar
2017-02-26 17:06 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox