* [net-next:master 1267/1290] net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types)
@ 2015-08-25 22:42 kbuild test robot
2015-08-25 22:55 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2015-08-25 22:42 UTC (permalink / raw)
To: santosh.shilimkar@oracle.com
Cc: kbuild-all, Ajaykumar Hotchandani, Santosh Shilimkar, netdev
tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 04e1b7341dc33abe4dd3f761e2e9137701e55684
commit: 73ce4317bf983282593aff710b112a7e705620c3 [1267/1290] RDS: make sure we post recv buffers
reproduce:
# apt-get install sparse
git checkout 73ce4317bf983282593aff710b112a7e705620c3
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types)
net/rds/ib_recv.c:382:28: expected int [signed] can_wait
net/rds/ib_recv.c:382:28: got restricted gfp_t
net/rds/ib_recv.c:828:23: sparse: cast to restricted __le64
vim +382 net/rds/ib_recv.c
366 }
367
368 /*
369 * This tries to allocate and post unused work requests after making sure that
370 * they have all the allocations they need to queue received fragments into
371 * sockets.
372 *
373 * -1 is returned if posting fails due to temporary resource exhaustion.
374 */
375 void rds_ib_recv_refill(struct rds_connection *conn, int prefill, gfp_t gfp)
376 {
377 struct rds_ib_connection *ic = conn->c_transport_data;
378 struct rds_ib_recv_work *recv;
379 struct ib_recv_wr *failed_wr;
380 unsigned int posted = 0;
381 int ret = 0;
> 382 int can_wait = gfp & __GFP_WAIT;
383 u32 pos;
384
385 /* the goal here is to just make sure that someone, somewhere
386 * is posting buffers. If we can't get the refill lock,
387 * let them do their thing
388 */
389 if (!acquire_refill(conn))
390 return;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net-next:master 1267/1290] net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types)
2015-08-25 22:42 [net-next:master 1267/1290] net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types) kbuild test robot
@ 2015-08-25 22:55 ` David Miller
2015-08-25 23:03 ` santosh.shilimkar
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2015-08-25 22:55 UTC (permalink / raw)
To: fengguang.wu
Cc: santosh.shilimkar, kbuild-all, ajaykumar.hotchandani, ssantosh,
netdev
From: kbuild test robot <fengguang.wu@intel.com>
Date: Wed, 26 Aug 2015 06:42:39 +0800
> sparse warnings: (new ones prefixed by >>)
>
>>> net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types)
> net/rds/ib_recv.c:382:28: expected int [signed] can_wait
> net/rds/ib_recv.c:382:28: got restricted gfp_t
> net/rds/ib_recv.c:828:23: sparse: cast to restricted __le64
Fixed by:
====================
[PATCH] rds: Fix improper gfp_t usage.
>> net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types)
net/rds/ib_recv.c:382:28: expected int [signed] can_wait
net/rds/ib_recv.c:382:28: got restricted gfp_t
net/rds/ib_recv.c:828:23: sparse: cast to restricted __le64
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/rds/ib_recv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index 3afdcbd..ed9b41e 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -379,7 +379,7 @@ void rds_ib_recv_refill(struct rds_connection *conn, int prefill, gfp_t gfp)
struct ib_recv_wr *failed_wr;
unsigned int posted = 0;
int ret = 0;
- int can_wait = gfp & __GFP_WAIT;
+ bool can_wait = !!(gfp & __GFP_WAIT);
u32 pos;
/* the goal here is to just make sure that someone, somewhere
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [net-next:master 1267/1290] net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types)
2015-08-25 22:55 ` David Miller
@ 2015-08-25 23:03 ` santosh.shilimkar
0 siblings, 0 replies; 3+ messages in thread
From: santosh.shilimkar @ 2015-08-25 23:03 UTC (permalink / raw)
To: David Miller, fengguang.wu
Cc: kbuild-all, ajaykumar.hotchandani, ssantosh, netdev
On 8/25/15 3:55 PM, David Miller wrote:
> From: kbuild test robot <fengguang.wu@intel.com>
> Date: Wed, 26 Aug 2015 06:42:39 +0800
>
>> sparse warnings: (new ones prefixed by >>)
>>
>>>> net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types)
>> net/rds/ib_recv.c:382:28: expected int [signed] can_wait
>> net/rds/ib_recv.c:382:28: got restricted gfp_t
>> net/rds/ib_recv.c:828:23: sparse: cast to restricted __le64
>
> Fixed by:
>
> ====================
> [PATCH] rds: Fix improper gfp_t usage.
>
>>> net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types)
> net/rds/ib_recv.c:382:28: expected int [signed] can_wait
> net/rds/ib_recv.c:382:28: got restricted gfp_t
> net/rds/ib_recv.c:828:23: sparse: cast to restricted __le64
>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
Thanks Dave. I was just creating the patch after noticing
the error from kbuild on my tree.
Regards,
Santosh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-25 23:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-25 22:42 [net-next:master 1267/1290] net/rds/ib_recv.c:382:28: sparse: incorrect type in initializer (different base types) kbuild test robot
2015-08-25 22:55 ` David Miller
2015-08-25 23:03 ` santosh.shilimkar
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.