* [PATCH v2] Staging: dream: pmem: fix some code style issues
@ 2010-03-03 6:53 Chihau Chau
2010-03-03 6:55 ` Pavel Machek
2010-04-08 19:17 ` Greg KH
0 siblings, 2 replies; 3+ messages in thread
From: Chihau Chau @ 2010-03-03 6:53 UTC (permalink / raw)
To: gregkh; +Cc: pavel, devel, linux-kernel, Chihau Chau
From: Chihau Chau <chihau@gmail.com>
This fixes some code style issues like some braces {} deleted becouse
are not necessary for a single statement blocks and to include KERN_
facility level in the printk() functions.
Signed-off-by: Chihau Chau <chihau@gmail.com>
---
drivers/staging/dream/pmem.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/dream/pmem.c b/drivers/staging/dream/pmem.c
index def6468..950b5a1 100644
--- a/drivers/staging/dream/pmem.c
+++ b/drivers/staging/dream/pmem.c
@@ -708,9 +708,8 @@ int get_pmem_addr(struct file *file, unsigned long *start,
struct pmem_data *data;
int id;
- if (!is_pmem_file(file) || !has_allocation(file)) {
+ if (!is_pmem_file(file) || !has_allocation(file))
return -1;
- }
data = (struct pmem_data *)file->private_data;
if (data->index == -1) {
@@ -789,9 +788,8 @@ void flush_pmem_file(struct file *file, unsigned long offset, unsigned long len)
struct list_head *elt;
void *flush_start, *flush_end;
- if (!is_pmem_file(file) || !has_allocation(file)) {
+ if (!is_pmem_file(file) || !has_allocation(file))
return;
- }
id = get_id(file);
data = (struct pmem_data *)file->private_data;
@@ -833,7 +831,7 @@ static int pmem_connect(unsigned long connect, struct file *file)
src_file = fget_light(connect, &put_needed);
DLOG("connect %p to %p\n", file, src_file);
if (!src_file) {
- printk("pmem: src file not found!\n");
+ printk(KERN_ERR "pmem: src file not found!\n");
ret = -EINVAL;
goto err_no_file;
}
@@ -936,8 +934,8 @@ int pmem_remap(struct pmem_region *region, struct file *file,
if (unlikely(!PMEM_IS_PAGE_ALIGNED(region->offset) ||
!PMEM_IS_PAGE_ALIGNED(region->len))) {
#if PMEM_DEBUG
- printk("pmem: request for unaligned pmem suballocation "
- "%lx %lx\n", region->offset, region->len);
+ printk(KERN_DEBUG "pmem: request for unaligned pmem "
+ "suballocation %lx %lx\n", region->offset, region->len);
#endif
return -EINVAL;
}
--
1.5.6.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] Staging: dream: pmem: fix some code style issues
2010-03-03 6:53 [PATCH v2] Staging: dream: pmem: fix some code style issues Chihau Chau
@ 2010-03-03 6:55 ` Pavel Machek
2010-04-08 19:17 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2010-03-03 6:55 UTC (permalink / raw)
To: Chihau Chau; +Cc: gregkh, devel, linux-kernel
> From: Chihau Chau <chihau@gmail.com>
>
> This fixes some code style issues like some braces {} deleted becouse
> are not necessary for a single statement blocks and to include KERN_
> facility level in the printk() functions.
>
> Signed-off-by: Chihau Chau <chihau@gmail.com>
ACK.
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] Staging: dream: pmem: fix some code style issues
2010-03-03 6:53 [PATCH v2] Staging: dream: pmem: fix some code style issues Chihau Chau
2010-03-03 6:55 ` Pavel Machek
@ 2010-04-08 19:17 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2010-04-08 19:17 UTC (permalink / raw)
To: Chihau Chau; +Cc: gregkh, pavel, devel, linux-kernel
On Wed, Mar 03, 2010 at 03:53:11AM -0300, Chihau Chau wrote:
> From: Chihau Chau <chihau@gmail.com>
>
> This fixes some code style issues like some braces {} deleted becouse
> are not necessary for a single statement blocks and to include KERN_
> facility level in the printk() functions.
This is already in the tree :(
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-08 20:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 6:53 [PATCH v2] Staging: dream: pmem: fix some code style issues Chihau Chau
2010-03-03 6:55 ` Pavel Machek
2010-04-08 19:17 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.