Re: [PATCH] Drivers: ps3: ps3av.c: fixed checkpatch warnings

2012-04-18 Thread Jesper Juhl
On Wed, 18 Apr 2012, Valentin Ilie wrote:

 Fixed some checkpatch warnings. (review)
 Last patch didn't compile.
 
 Signed-off-by: Valentin Ilie valentin.i...@gmail.com

I'm wondering why you don't address the last 4 warnings and 2 errors from 
checkpatch while you are at it...

But, the changes you make here look fine to me in any case.

Reviewed-by: Jesper Juhl j...@chaosbits.net


-- 
Jesper Juhl j...@chaosbits.net   http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] MPC5200: Eliminate duplicate include of of_device.h

2010-11-22 Thread Jesper Juhl

Eliminate duplicate  #include linux/of_device.h  from 
sound/soc/fsl/mpc5200_dma.c

Signed-off-by: Jesper Juhl j...@chaosbits.net
---
 mpc5200_dma.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
index dce6b55..f92dca0 100644
--- a/sound/soc/fsl/mpc5200_dma.c
+++ b/sound/soc/fsl/mpc5200_dma.c
@@ -9,7 +9,6 @@
 #include linux/module.h
 #include linux/of_device.h
 #include linux/slab.h
-#include linux/of_device.h
 #include linux/of_platform.h
 
 #include sound/soc.h



-- 
Jesper Juhl j...@chaosbits.nethttp://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2] iSeries: Remove unused mf_getSrcHistory function and caller.

2010-11-18 Thread Jesper Juhl
On Fri, 5 Nov 2010, Jesper Juhl wrote:

 On Tue, 2 Nov 2010, Michael Ellerman wrote:
 
  On Mon, 2010-11-01 at 22:20 +0100, Jesper Juhl wrote:
   Hi Stephen,
   
   On Tue, 2 Nov 2010, Stephen Rothwell wrote:
   
On Mon, 1 Nov 2010 21:06:23 +0100 (CET) Jesper Juhl 
j...@chaosbits.net wrote:

 Remove unused function 'mf_getSrcHistory' (that will never be used 
 ever 
 according to Stephen Rothwell).
 
 Signed-off-by: Jesper Juhl j...@chaosbits.net

Acked-by: Stephen Rothwell s...@canb.auug.org.au

   
   Ok, so if you are the (unofficial) iSeries maintainer and you don't merge 
   the patch somewhere that'll eventually go up-stream, but just ACK it 
   (thank you for that btw), then where do I send it to get it merged?
  
  Here. ie. linuxppc-dev.
  
  But, while you're removing it you should remove the #if 0'ed callsite as
  well, see mf_src_proc_show() in that file. :)
  
 Done. See patch below.
 
 
 Remove unused function 'mf_getSrcHistory' (that will never be used 
 ever according to Stephen Rothwell) and also remove most of (under 'if 
 0') code from mf_src_proc_show() where the function was called.
 
 Signed-off-by: Jesper Juhl j...@chaosbits.net
 ---
  mf.c |   62 
 --
  1 file changed, 62 deletions(-)
 
 diff --git a/arch/powerpc/platforms/iseries/mf.c 
 b/arch/powerpc/platforms/iseries/mf.c
 index 42d0a88..b5e026b 100644
 --- a/arch/powerpc/platforms/iseries/mf.c
 +++ b/arch/powerpc/platforms/iseries/mf.c
 @@ -1045,71 +1045,9 @@ static const struct file_operations mf_side_proc_fops 
 = {
   .write  = mf_side_proc_write,
  };
  
 -#if 0
 -static void mf_getSrcHistory(char *buffer, int size)
 -{
 - struct IplTypeReturnStuff return_stuff;
 - struct pending_event *ev = new_pending_event();
 - int rc = 0;
 - char *pages[4];
 -
 - pages[0] = kmalloc(4096, GFP_ATOMIC);
 - pages[1] = kmalloc(4096, GFP_ATOMIC);
 - pages[2] = kmalloc(4096, GFP_ATOMIC);
 - pages[3] = kmalloc(4096, GFP_ATOMIC);
 - if ((ev == NULL) || (pages[0] == NULL) || (pages[1] == NULL)
 -  || (pages[2] == NULL) || (pages[3] == NULL))
 - return -ENOMEM;
 -
 - return_stuff.xType = 0;
 - return_stuff.xRc = 0;
 - return_stuff.xDone = 0;
 - ev-event.hp_lp_event.xSubtype = 6;
 - ev-event.hp_lp_event.x.xSubtypeData =
 - subtype_data('M', 'F', 'V', 'I');
 - ev-event.data.vsp_cmd.xEvent = return_stuff;
 - ev-event.data.vsp_cmd.cmd = 4;
 - ev-event.data.vsp_cmd.lp_index = HvLpConfig_getLpIndex();
 - ev-event.data.vsp_cmd.result_code = 0xFF;
 - ev-event.data.vsp_cmd.reserved = 0;
 - ev-event.data.vsp_cmd.sub_data.page[0] = iseries_hv_addr(pages[0]);
 - ev-event.data.vsp_cmd.sub_data.page[1] = iseries_hv_addr(pages[1]);
 - ev-event.data.vsp_cmd.sub_data.page[2] = iseries_hv_addr(pages[2]);
 - ev-event.data.vsp_cmd.sub_data.page[3] = iseries_hv_addr(pages[3]);
 - mb();
 - if (signal_event(ev) != 0)
 - return;
 -
 - while (return_stuff.xDone != 1)
 - udelay(10);
 - if (return_stuff.xRc == 0)
 - memcpy(buffer, pages[0], size);
 - kfree(pages[0]);
 - kfree(pages[1]);
 - kfree(pages[2]);
 - kfree(pages[3]);
 -}
 -#endif
 -
  static int mf_src_proc_show(struct seq_file *m, void *v)
  {
 -#if 0
 - int len;
 -
 - mf_getSrcHistory(page, count);
 - len = count;
 - len -= off;
 - if (len  count) {
 - *eof = 1;
 - if (len = 0)
 - return 0;
 - } else
 - len = count;
 - *start = page + off;
 - return len;
 -#else
   return 0;
 -#endif
  }
  
  static int mf_src_proc_open(struct inode *inode, struct file *file)
 
 
 
 

PING.

Is this going to get merged somewhere or is there a problem?


-- 
Jesper Juhl j...@chaosbits.nethttp://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2] iSeries: Remove unused mf_getSrcHistory function and caller.

2010-11-18 Thread Jesper Juhl
On Fri, 19 Nov 2010, Michael Ellerman wrote:

 On Thu, 2010-11-18 at 20:45 +0100, Jesper Juhl wrote:
  On Fri, 5 Nov 2010, Jesper Juhl wrote:

static int mf_src_proc_open(struct inode *inode, struct file *file)
 
  PING.
  
  Is this going to get merged somewhere or is there a problem?
 
 Yes, no.
 
 It won't get lost:
 http://patchwork.ozlabs.org/patch/70201/
 
Ok. Thank you for that bit of information. That was one place that I had 
no knowledge about what-so-ever, so I didn't look.

I will now rest happily in the knowledge that the patch is in good hands. 
Thanks.


-- 
Jesper Juhl j...@chaosbits.nethttp://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 01/17][trivial] powerpc: Remove unnecessary casts of void ptr returning alloc function return values

2010-11-08 Thread Jesper Juhl
Hi,

The [vk][cmz]alloc(_node) family of functions return void pointers which
it's completely unnecessary/pointless to cast to other pointer types since
that happens implicitly.

This patch removes such casts from arch/powerpc/


Signed-off-by: Jesper Juhl j...@chaosbits.net
---
 pgtable_32.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index a87ead0..d1833ed 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -78,7 +78,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
 
/* pgdir take page or two with 4K pages and a page fraction otherwise */
 #ifndef CONFIG_PPC_4K_PAGES
-   ret = (pgd_t *)kzalloc(1  PGDIR_ORDER, GFP_KERNEL);
+   ret = kzalloc(1  PGDIR_ORDER, GFP_KERNEL);
 #else
ret = (pgd_t *)__get_free_pages(GFP_KERNEL|__GFP_ZERO,
PGDIR_ORDER - PAGE_SHIFT);



-- 
Jesper Juhl j...@chaosbits.net http://www.chaosbits.net/
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v2] iSeries: Remove unused mf_getSrcHistory function and caller.

2010-11-04 Thread Jesper Juhl
On Tue, 2 Nov 2010, Michael Ellerman wrote:

 On Mon, 2010-11-01 at 22:20 +0100, Jesper Juhl wrote:
  Hi Stephen,
  
  On Tue, 2 Nov 2010, Stephen Rothwell wrote:
  
   On Mon, 1 Nov 2010 21:06:23 +0100 (CET) Jesper Juhl j...@chaosbits.net 
   wrote:
   
Remove unused function 'mf_getSrcHistory' (that will never be used ever 
according to Stephen Rothwell).

Signed-off-by: Jesper Juhl j...@chaosbits.net
   
   Acked-by: Stephen Rothwell s...@canb.auug.org.au
   
  
  Ok, so if you are the (unofficial) iSeries maintainer and you don't merge 
  the patch somewhere that'll eventually go up-stream, but just ACK it 
  (thank you for that btw), then where do I send it to get it merged?
 
 Here. ie. linuxppc-dev.
 
 But, while you're removing it you should remove the #if 0'ed callsite as
 well, see mf_src_proc_show() in that file. :)
 
Done. See patch below.


Remove unused function 'mf_getSrcHistory' (that will never be used 
ever according to Stephen Rothwell) and also remove most of (under 'if 
0') code from mf_src_proc_show() where the function was called.

Signed-off-by: Jesper Juhl j...@chaosbits.net
---
 mf.c |   62 
--
 1 file changed, 62 deletions(-)

diff --git a/arch/powerpc/platforms/iseries/mf.c 
b/arch/powerpc/platforms/iseries/mf.c
index 42d0a88..b5e026b 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -1045,71 +1045,9 @@ static const struct file_operations mf_side_proc_fops = {
.write  = mf_side_proc_write,
 };
 
-#if 0
-static void mf_getSrcHistory(char *buffer, int size)
-{
-   struct IplTypeReturnStuff return_stuff;
-   struct pending_event *ev = new_pending_event();
-   int rc = 0;
-   char *pages[4];
-
-   pages[0] = kmalloc(4096, GFP_ATOMIC);
-   pages[1] = kmalloc(4096, GFP_ATOMIC);
-   pages[2] = kmalloc(4096, GFP_ATOMIC);
-   pages[3] = kmalloc(4096, GFP_ATOMIC);
-   if ((ev == NULL) || (pages[0] == NULL) || (pages[1] == NULL)
-|| (pages[2] == NULL) || (pages[3] == NULL))
-   return -ENOMEM;
-
-   return_stuff.xType = 0;
-   return_stuff.xRc = 0;
-   return_stuff.xDone = 0;
-   ev-event.hp_lp_event.xSubtype = 6;
-   ev-event.hp_lp_event.x.xSubtypeData =
-   subtype_data('M', 'F', 'V', 'I');
-   ev-event.data.vsp_cmd.xEvent = return_stuff;
-   ev-event.data.vsp_cmd.cmd = 4;
-   ev-event.data.vsp_cmd.lp_index = HvLpConfig_getLpIndex();
-   ev-event.data.vsp_cmd.result_code = 0xFF;
-   ev-event.data.vsp_cmd.reserved = 0;
-   ev-event.data.vsp_cmd.sub_data.page[0] = iseries_hv_addr(pages[0]);
-   ev-event.data.vsp_cmd.sub_data.page[1] = iseries_hv_addr(pages[1]);
-   ev-event.data.vsp_cmd.sub_data.page[2] = iseries_hv_addr(pages[2]);
-   ev-event.data.vsp_cmd.sub_data.page[3] = iseries_hv_addr(pages[3]);
-   mb();
-   if (signal_event(ev) != 0)
-   return;
-
-   while (return_stuff.xDone != 1)
-   udelay(10);
-   if (return_stuff.xRc == 0)
-   memcpy(buffer, pages[0], size);
-   kfree(pages[0]);
-   kfree(pages[1]);
-   kfree(pages[2]);
-   kfree(pages[3]);
-}
-#endif
-
 static int mf_src_proc_show(struct seq_file *m, void *v)
 {
-#if 0
-   int len;
-
-   mf_getSrcHistory(page, count);
-   len = count;
-   len -= off;
-   if (len  count) {
-   *eof = 1;
-   if (len = 0)
-   return 0;
-   } else
-   len = count;
-   *start = page + off;
-   return len;
-#else
return 0;
-#endif
 }
 
 static int mf_src_proc_open(struct inode *inode, struct file *file)



-- 
Jesper Juhl j...@chaosbits.net http://www.chaosbits.net/
Plain text mails only, please  http://www.expita.com/nomime.html
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] iSeries: Remove unused mf_getSrcHistory function.

2010-11-01 Thread Jesper Juhl
On Tue, 2 Nov 2010, Stephen Rothwell wrote:

 Hi Jesper,
 
 On Mon, 01 Nov 2010 22:10:42 +1100 Michael Ellerman mich...@ellerman.id.au 
 wrote:
 
  On Sat, 2010-10-30 at 19:20 +0200, Jesper Juhl wrote:
   
   If memory is tight and a dynamic allocation fails there's no reason to 
   make a bad situation worse by leaking memory.
   
   mf_getSrcHistory potentially leaks pages[0-3]. I believe the right thing 
   to do is to free that memory again before returning -ENOMEM - which is 
   what this patch does.
   
   I realize that the function is under '#if 0' so this probably doesn't 
   matter much, but I assume that the function is still there for a reason 
   (but I could be wrong, I don't know the powerpc code).
   Anyway, I suggest we remove the leak.
  
  Stephen is the iSeries maintainer, and I think he #if 0'ed the code. But
  I don't think it will ever be un-ifdef'ed, so should probably just be
  removed.
 
 Well, only unofficially iseries maintainer :-)
 
 Yes, just remove the whole function ... it was never used and never will
 be.
 

Done.

Remove unused function 'mf_getSrcHistory' (that will never be used ever 
according to Stephen Rothwell).

Signed-off-by: Jesper Juhl j...@chaosbits.net
---
 mf.c |   46 --
 1 file changed, 46 deletions(-)

diff --git a/arch/powerpc/platforms/iseries/mf.c 
b/arch/powerpc/platforms/iseries/mf.c
index 42d0a88..56cfd8c 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -1045,52 +1045,6 @@ static const struct file_operations mf_side_proc_fops = {
.write  = mf_side_proc_write,
 };
 
-#if 0
-static void mf_getSrcHistory(char *buffer, int size)
-{
-   struct IplTypeReturnStuff return_stuff;
-   struct pending_event *ev = new_pending_event();
-   int rc = 0;
-   char *pages[4];
-
-   pages[0] = kmalloc(4096, GFP_ATOMIC);
-   pages[1] = kmalloc(4096, GFP_ATOMIC);
-   pages[2] = kmalloc(4096, GFP_ATOMIC);
-   pages[3] = kmalloc(4096, GFP_ATOMIC);
-   if ((ev == NULL) || (pages[0] == NULL) || (pages[1] == NULL)
-|| (pages[2] == NULL) || (pages[3] == NULL))
-   return -ENOMEM;
-
-   return_stuff.xType = 0;
-   return_stuff.xRc = 0;
-   return_stuff.xDone = 0;
-   ev-event.hp_lp_event.xSubtype = 6;
-   ev-event.hp_lp_event.x.xSubtypeData =
-   subtype_data('M', 'F', 'V', 'I');
-   ev-event.data.vsp_cmd.xEvent = return_stuff;
-   ev-event.data.vsp_cmd.cmd = 4;
-   ev-event.data.vsp_cmd.lp_index = HvLpConfig_getLpIndex();
-   ev-event.data.vsp_cmd.result_code = 0xFF;
-   ev-event.data.vsp_cmd.reserved = 0;
-   ev-event.data.vsp_cmd.sub_data.page[0] = iseries_hv_addr(pages[0]);
-   ev-event.data.vsp_cmd.sub_data.page[1] = iseries_hv_addr(pages[1]);
-   ev-event.data.vsp_cmd.sub_data.page[2] = iseries_hv_addr(pages[2]);
-   ev-event.data.vsp_cmd.sub_data.page[3] = iseries_hv_addr(pages[3]);
-   mb();
-   if (signal_event(ev) != 0)
-   return;
-
-   while (return_stuff.xDone != 1)
-   udelay(10);
-   if (return_stuff.xRc == 0)
-   memcpy(buffer, pages[0], size);
-   kfree(pages[0]);
-   kfree(pages[1]);
-   kfree(pages[2]);
-   kfree(pages[3]);
-}
-#endif
-
 static int mf_src_proc_show(struct seq_file *m, void *v)
 {
 #if 0
 

-- 
Jesper Juhl j...@chaosbits.net http://www.chaosbits.net/
Plain text mails only, please  http://www.expita.com/nomime.html
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] iSeries: Remove unused mf_getSrcHistory function.

2010-11-01 Thread Jesper Juhl
Hi Stephen,

On Tue, 2 Nov 2010, Stephen Rothwell wrote:

 On Mon, 1 Nov 2010 21:06:23 +0100 (CET) Jesper Juhl j...@chaosbits.net 
 wrote:
 
  Remove unused function 'mf_getSrcHistory' (that will never be used ever 
  according to Stephen Rothwell).
  
  Signed-off-by: Jesper Juhl j...@chaosbits.net
 
 Acked-by: Stephen Rothwell s...@canb.auug.org.au
 

Ok, so if you are the (unofficial) iSeries maintainer and you don't merge 
the patch somewhere that'll eventually go up-stream, but just ACK it 
(thank you for that btw), then where do I send it to get it merged?

-- 
Jesper Juhl j...@chaosbits.net http://www.chaosbits.net/
Plain text mails only, please  http://www.expita.com/nomime.html
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] iSeries: Don't leak if allocations fail in mf_getSrcHistory

2010-10-30 Thread Jesper Juhl
Hi,

If memory is tight and a dynamic allocation fails there's no reason to 
make a bad situation worse by leaking memory.

mf_getSrcHistory potentially leaks pages[0-3]. I believe the right thing 
to do is to free that memory again before returning -ENOMEM - which is 
what this patch does.

I realize that the function is under '#if 0' so this probably doesn't 
matter much, but I assume that the function is still there for a reason 
(but I could be wrong, I don't know the powerpc code).
Anyway, I suggest we remove the leak.

Please keep me on CC when replying.


Signed-off-by: Jesper Juhl j...@chaosbits.net
---
 mf.c |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/iseries/mf.c 
b/arch/powerpc/platforms/iseries/mf.c
index 42d0a88..f67522a 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -1058,8 +1058,13 @@ static void mf_getSrcHistory(char *buffer, int size)
pages[2] = kmalloc(4096, GFP_ATOMIC);
pages[3] = kmalloc(4096, GFP_ATOMIC);
if ((ev == NULL) || (pages[0] == NULL) || (pages[1] == NULL)
-|| (pages[2] == NULL) || (pages[3] == NULL))
+|| (pages[2] == NULL) || (pages[3] == NULL)) {
+   kfree(pages[3]);
+   kfree(pages[2]);
+   kfree(pages[1]);
+   kfree(pages[0]);
return -ENOMEM;
+   }
 
return_stuff.xType = 0;
return_stuff.xRc = 0;


-- 
Jesper Juhl j...@chaosbits.net http://www.chaosbits.net/
Plain text mails only, please  http://www.expita.com/nomime.html
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] PowerPC/Cell: use vzalloc rather than vmalloc and memset in spu_alloc_lscsa_std

2010-10-30 Thread Jesper Juhl
Hi,

We can get rid of a memset in 
arch/powerpc/platforms/cell/spufs/lscsa_alloc.c::spu_alloc_lscsa_std() by 
using vzalloc() rather than vmalloc()+memset().

Completely untested patch below since I have no hardware nor tools to 
compile this.


Signed-off-by: Jesper Juhl j...@chaosbits.net
---
 lscsa_alloc.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c 
b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
index a101abf..3b894f5 100644
--- a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
+++ b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
@@ -36,10 +36,9 @@ static int spu_alloc_lscsa_std(struct spu_state *csa)
struct spu_lscsa *lscsa;
unsigned char *p;
 
-   lscsa = vmalloc(sizeof(struct spu_lscsa));
+   lscsa = vzalloc(sizeof(struct spu_lscsa));
if (!lscsa)
return -ENOMEM;
-   memset(lscsa, 0, sizeof(struct spu_lscsa));
csa-lscsa = lscsa;
 
/* Set LS pages reserved to allow for user-space mapping. */


-- 
Jesper Juhl j...@chaosbits.net http://www.chaosbits.net/
Plain text mails only, please  http://www.expita.com/nomime.html
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 04/30] powerpc: Don't cast kmalloc return value in ibmebus.c

2007-08-23 Thread Jesper Juhl
kmalloc() returns a void pointer so there is absolutely no need to
cast it in ibmebus_chomp().

Signed-off-by: Jesper Juhl [EMAIL PROTECTED]
---
 arch/powerpc/kernel/ibmebus.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 9a8c9af..9514e66 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -383,7 +383,8 @@ static int ibmebus_match_path(struct device *dev, void 
*data)
 
 static char *ibmebus_chomp(const char *in, size_t count)
 {
-   char *out = (char*)kmalloc(count + 1, GFP_KERNEL);
+   char *out = kmalloc(count + 1, GFP_KERNEL);
+
if (!out)
return NULL;
 
-- 
1.5.2.2

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] powerpc: clean out a bunch of duplicate includes

2007-07-29 Thread Jesper Juhl
Hi,

Here's a patch to clean out a bunch of duplicate includes from 
arch/powerpc/

Please consider for inclusion.


Signed-off-by: Jesper Juhl [EMAIL PROTECTED]
---

 arch/powerpc/kernel/btext.c|1 -
 arch/powerpc/kernel/crash.c|1 -
 arch/powerpc/kernel/iommu.c|1 -
 arch/powerpc/kernel/prom.c |1 -
 arch/powerpc/kernel/time.c |1 -
 arch/powerpc/mm/hash_utils_64.c|1 -
 arch/powerpc/mm/hugetlbpage.c  |3 ---
 arch/powerpc/mm/init_32.c  |1 -
 arch/powerpc/mm/mem.c  |1 -
 arch/powerpc/platforms/52xx/mpc52xx_pic.c  |1 -
 arch/powerpc/platforms/chrp/setup.c|1 -
 arch/powerpc/platforms/chrp/smp.c  |1 -
 arch/powerpc/platforms/iseries/setup.c |1 -
 arch/powerpc/platforms/powermac/low_i2c.c  |1 -
 arch/powerpc/platforms/powermac/udbg_adb.c |1 -
 arch/powerpc/platforms/pseries/lpar.c  |1 -
 16 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index e7b6846..3ef51fb 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -11,7 +11,6 @@
 #include asm/sections.h
 #include asm/prom.h
 #include asm/btext.h
-#include asm/prom.h
 #include asm/page.h
 #include asm/mmu.h
 #include asm/pgtable.h
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 37658ea..77c749a 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -24,7 +24,6 @@
 #include linux/init.h
 #include linux/irq.h
 #include linux/types.h
-#include linux/irq.h
 
 #include asm/processor.h
 #include asm/machdep.h
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index c08ceca..e4ec6ee 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -30,7 +30,6 @@
 #include linux/spinlock.h
 #include linux/string.h
 #include linux/dma-mapping.h
-#include linux/init.h
 #include linux/bitops.h
 #include asm/io.h
 #include asm/prom.h
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index a38197b..0028fe6 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -52,7 +52,6 @@
 #include asm/pSeries_reconfig.h
 #include asm/pci-bridge.h
 #include asm/kexec.h
-#include asm/system.h
 
 #ifdef DEBUG
 #define DBG(fmt...) printk(KERN_ERR fmt)
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 727a669..c85d9b0 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -72,7 +72,6 @@
 #include asm/iseries/it_lp_queue.h
 #include asm/iseries/hv_call_xm.h
 #endif
-#include asm/smp.h
 
 /* keep track of when we need to update the rtc */
 time_t last_rtc_update;
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index bc7b0ce..c2bf404 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -49,7 +49,6 @@
 #include asm/tlb.h
 #include asm/cacheflush.h
 #include asm/cputable.h
-#include asm/abs_addr.h
 #include asm/sections.h
 #include asm/spu.h
 
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 4835f73..ba5f12a 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -22,11 +22,8 @@
 #include asm/mmu_context.h
 #include asm/machdep.h
 #include asm/cputable.h
-#include asm/tlb.h
 #include asm/spu.h
 
-#include linux/sysctl.h
-
 #define NUM_LOW_AREAS  (0x1UL  SID_SHIFT)
 #define NUM_HIGH_AREAS (PGTABLE_RANGE  HTLB_AREA_SHIFT)
 
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index e1f5ded..d65995a 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -41,7 +41,6 @@
 #include asm/machdep.h
 #include asm/btext.h
 #include asm/tlb.h
-#include asm/prom.h
 #include asm/lmb.h
 #include asm/sections.h
 
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index f0e7eed..32dcfc9 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -42,7 +42,6 @@
 #include asm/machdep.h
 #include asm/btext.h
 #include asm/tlb.h
-#include asm/prom.h
 #include asm/lmb.h
 #include asm/sections.h
 #include asm/vdso.h
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c 
b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index fbfff95..8c464c5 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -22,7 +22,6 @@
 #include linux/init.h
 #include linux/sched.h
 #include linux/signal.h
-#include linux/stddef.h
 #include linux/delay.h
 #include linux/irq.h
 #include linux/hardirq.h
diff --git a/arch/powerpc/platforms/chrp/setup.c 
b/arch/powerpc/platforms/chrp/setup.c
index 373de4c..dde5ef4 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -32,7 +32,6 @@
 #include linux/seq_file.h
 #include linux/root_dev.h
 #include linux/initrd.h
-#include linux/module.h
 #include linux/timer.h

Re: [PATCH][36/37] Clean up duplicate includes in sound/ppc/

2007-07-23 Thread Jesper Juhl
On 23/07/07, Takashi Iwai [EMAIL PROTECTED] wrote:
 At Sat, 21 Jul 2007 17:04:07 +0200,
 Jesper Juhl wrote:
 
  Hi,
 
  This patch cleans up duplicate includes in
/

 sound/ppc?  :)


Hehe, yup. Seems I forgot to edit my mail template for that one :)

 
 
  Signed-off-by: Jesper Juhl [EMAIL PROTECTED]

 Now applied to ALSA tree.  Thanks.


Thanks a lot.


-- 
Jesper Juhl [EMAIL PROTECTED]
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please  http://www.expita.com/nomime.html
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev