Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-09-01 Thread David Miller
From: YueHaibing Date: Tue, 1 Sep 2020 22:11:15 +0800 > Remove unneeded return value cast. > This is detected by coccinelle. > > Signed-off-by: YueHaibing Applied.

[PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-09-01 Thread YueHaibing
Remove unneeded return value cast. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_droq.c

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-30 Thread wanghai (M)
在 2020/7/28 23:54, Joe Perches 写道: On Tue, 2020-07-28 at 21:38 +0800, wanghai (M) wrote: Thanks for your explanation. I got it. Can it be modified like this? [] +++ b/drivers/net/ethernet/cavium/liquidio/octeon_device.c @@ -1152,11 +1152,8 @@ octeon_register_dispatch_fn(struct

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-28 Thread Derek Chickles
> From: Joe Perches > Subject: [EXT] Re: [PATCH net-next] liquidio: Remove unneeded cast from > memory allocation > > On Tue, 2020-07-28 at 15:39 +, Derek Chickles wrote: > > I think that is fine as well. We just used vmalloc since there is no > > need for a

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-28 Thread Joe Perches
On Tue, 2020-07-28 at 15:39 +, Derek Chickles wrote: > I think that is fine as well. We just used vmalloc since there is no need > for a physically contiguous piece of memory. Do any of the allocs in the driver actually need vmalloc?

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-28 Thread Joe Perches
On Tue, 2020-07-28 at 21:38 +0800, wanghai (M) wrote: > Thanks for your explanation. I got it. > > Can it be modified like this? [] > +++ b/drivers/net/ethernet/cavium/liquidio/octeon_device.c > @@ -1152,11 +1152,8 @@ octeon_register_dispatch_fn(struct octeon_device > *oct, > >

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-28 Thread Derek Chickles
> From: wanghai (M) > Subject: [EXT] Re: [PATCH net-next] liquidio: Remove unneeded cast from > memory allocation > > 在 2020/7/28 17:11, Joe Perches 写道: > > On Tue, 2020-07-28 at 16:42 +0800, wanghai (M) wrote: > >> 在 2020/7/25 5:29, Joe Perches 写道: > >>&g

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-28 Thread wanghai (M)
在 2020/7/28 17:11, Joe Perches 写道: On Tue, 2020-07-28 at 16:42 +0800, wanghai (M) wrote: 在 2020/7/25 5:29, Joe Perches 写道: On Fri, 2020-07-24 at 21:00 +0800, Wang Hai wrote: Remove casting the values returned by memory allocation function. Coccinelle emits WARNING:

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-28 Thread Joe Perches
On Tue, 2020-07-28 at 16:42 +0800, wanghai (M) wrote: > 在 2020/7/25 5:29, Joe Perches 写道: > > On Fri, 2020-07-24 at 21:00 +0800, Wang Hai wrote: > > > Remove casting the values returned by memory allocation function. > > > > > > Coccinelle emits WARNING: > > > > > >

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-28 Thread wanghai (M)
在 2020/7/25 5:29, Joe Perches 写道: On Fri, 2020-07-24 at 21:00 +0800, Wang Hai wrote: Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: ./drivers/net/ethernet/cavium/liquidio/octeon_device.c:1155:14-36: WARNING: casting value returned by memory

Re: [PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-24 Thread Joe Perches
On Fri, 2020-07-24 at 21:00 +0800, Wang Hai wrote: > Remove casting the values returned by memory allocation function. > > Coccinelle emits WARNING: > > ./drivers/net/ethernet/cavium/liquidio/octeon_device.c:1155:14-36: WARNING: > casting value returned by memory allocation function to (struct

[PATCH net-next] liquidio: Remove unneeded cast from memory allocation

2020-07-24 Thread Wang Hai
Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: ./drivers/net/ethernet/cavium/liquidio/octeon_device.c:1155:14-36: WARNING: casting value returned by memory allocation function to (struct octeon_dispatch *) is useless. Signed-off-by: Wang Hai ---