netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s2io: Remove unnecessary casts
@ 2009-08-14  2:03 Davidlohr Bueso
  2009-08-14  3:14 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Davidlohr Bueso @ 2009-08-14  2:03 UTC (permalink / raw)
  To: ram.vepa, santosh.rastapur, sivakumar.subramani,
	sreenivasa.honnur, anil.murthy
  Cc: netdev, kernel-janitors


No need to cast kmalloc.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>

---
 drivers/net/s2io.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 458daa0..43a5abf 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -870,8 +870,7 @@ static int init_shared_mem(struct s2io_nic *nic)
                                while (k != rxd_count[nic->rxd_mode]) {
                                        ba = &mac_control->rings[i].ba[j][k];
 
-                                       ba->ba_0_org = (void *) kmalloc
-                                           (BUF0_LEN + ALIGN_SIZE, GFP_KERNEL);
+                                       ba->ba_0_org = kmalloc(BUF0_LEN + ALIGN_SIZE, GFP_KERNEL);
                                        if (!ba->ba_0_org)
                                                return -ENOMEM;
                                        mem_allocated +=
@@ -881,8 +880,7 @@ static int init_shared_mem(struct s2io_nic *nic)
                                        tmp &= ~((unsigned long) ALIGN_SIZE);
                                        ba->ba_0 = (void *) tmp;
 
-                                       ba->ba_1_org = (void *) kmalloc
-                                           (BUF1_LEN + ALIGN_SIZE, GFP_KERNEL);
+                                       ba->ba_1_org = kmalloc(BUF1_LEN + ALIGN_SIZE, GFP_KERNEL);
                                        if (!ba->ba_1_org)
                                                return -ENOMEM;
                                        mem_allocated

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] s2io: Remove unnecessary casts
  2009-08-14  2:03 [PATCH] s2io: Remove unnecessary casts Davidlohr Bueso
@ 2009-08-14  3:14 ` David Miller
  2009-08-14  3:57   ` Davidlohr Bueso
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2009-08-14  3:14 UTC (permalink / raw)
  To: dave
  Cc: ram.vepa, santosh.rastapur, sivakumar.subramani,
	sreenivasa.honnur, anil.murthy, netdev, kernel-janitors

From: Davidlohr Bueso <dave@gnu.org>
Date: Thu, 13 Aug 2009 22:03:28 -0400

> 
> No need to cast kmalloc.
> 
> Signed-off-by: Davidlohr Bueso <dave@gnu.org>

Yeah but:

>  
> -                                       ba->ba_0_org = (void *) kmalloc
> -                                           (BUF0_LEN + ALIGN_SIZE, GFP_KERNEL);
> +                                       ba->ba_0_org = kmalloc(BUF0_LEN + ALIGN_SIZE, GFP_KERNEL);

Now the code line extends way over 80 columns.

Please fix this up and resubmit.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] s2io: Remove unnecessary casts
  2009-08-14  3:14 ` David Miller
@ 2009-08-14  3:57   ` Davidlohr Bueso
  2009-08-14 23:38     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Davidlohr Bueso @ 2009-08-14  3:57 UTC (permalink / raw)
  To: David Miller
  Cc: ram.vepa, santosh.rastapur, sivakumar.subramani,
	sreenivasa.honnur, anil.murthy, netdev, kernel-janitors

On Thu, Aug 13, 2009 at 08:14:52PM -0700, David Miller wrote:
> From: Davidlohr Bueso <dave@gnu.org>
> Date: Thu, 13 Aug 2009 22:03:28 -0400
> 
> > 
> > No need to cast kmalloc.
> > 
> > Signed-off-by: Davidlohr Bueso <dave@gnu.org>
> 
> Yeah but:
> 
> >  
> > -                                       ba->ba_0_org = (void *) kmalloc
> > -                                           (BUF0_LEN + ALIGN_SIZE, GFP_KERNEL);
> > +                                       ba->ba_0_org = kmalloc(BUF0_LEN + ALIGN_SIZE, GFP_KERNEL);
> 
> Now the code line extends way over 80 columns.
Ok, resubmitting and verified by checkpatch.pl

Thanks.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>

---
 drivers/net/s2io.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 458daa0..2bc62d3 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -870,8 +870,10 @@ static int init_shared_mem(struct s2io_nic *nic)
                                while (k != rxd_count[nic->rxd_mode]) {
                                        ba = &mac_control->rings[i].ba[j][k];
 
-                                       ba->ba_0_org = (void *) kmalloc
-                                           (BUF0_LEN + ALIGN_SIZE, GFP_KERNEL);
+                                       ba->ba_0_org = kmalloc
+                                               (BUF0_LEN + ALIGN_SIZE,
+                                                GFP_KERNEL);
+
                                        if (!ba->ba_0_org)
                                                return -ENOMEM;
                                        mem_allocated +=
@@ -881,8 +883,10 @@ static int init_shared_mem(struct s2io_nic *nic)
                                        tmp &= ~((unsigned long) ALIGN_SIZE);
                                        ba->ba_0 = (void *) tmp;
 
-                                       ba->ba_1_org = (void *) kmalloc
-                                           (BUF1_LEN + ALIGN_SIZE, GFP_KERNEL);
+                                       ba->ba_1_org = kmalloc
+                                               (BUF1_LEN + ALIGN_SIZE,
+                                                GFP_KERNEL);
+
                                        if (!ba->ba_1_org)
                                                return -ENOMEM;
                                        mem_allocated

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] s2io: Remove unnecessary casts
  2009-08-14  3:57   ` Davidlohr Bueso
@ 2009-08-14 23:38     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-08-14 23:38 UTC (permalink / raw)
  To: dave
  Cc: ram.vepa, santosh.rastapur, sivakumar.subramani,
	sreenivasa.honnur, anil.murthy, netdev, kernel-janitors

From: Davidlohr Bueso <dave@gnu.org>
Date: Thu, 13 Aug 2009 23:57:33 -0400

> Ok, resubmitting and verified by checkpatch.pl
> 
> Thanks.
> 
> Signed-off-by: Davidlohr Bueso <dave@gnu.org>

Your email client has corrupted the patch, turning tab
characters into spaces and whatnot.

Please correct this and make a fresh, formal, resubmission
(fresh subject, commit message, and all).

Thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-14 23:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-14  2:03 [PATCH] s2io: Remove unnecessary casts Davidlohr Bueso
2009-08-14  3:14 ` David Miller
2009-08-14  3:57   ` Davidlohr Bueso
2009-08-14 23:38     ` David Miller

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).