Re: [PATCH v7 13/13] xen: introduce a Kconfig option to enable the pvcalls frontend

From: Stefano Stabellini
Date: Mon Oct 30 2017 - 15:48:39 EST


On Mon, 30 Oct 2017, Boris Ostrovsky wrote:
> On 10/26/2017 04:45 PM, Boris Ostrovsky wrote:
> > On 10/26/2017 04:16 PM, Stefano Stabellini wrote:
> >> On Thu, 26 Oct 2017, Boris Ostrovsky wrote:
> >>> On 10/26/2017 03:11 PM, Stefano Stabellini wrote:
> >>>> Also add pvcalls-front to the Makefile.
> >>>>
> >>>> Signed-off-by: Stefano Stabellini <stefano@xxxxxxxxxxx>
> >>>> CC: boris.ostrovsky@xxxxxxxxxx
> >>>> CC: jgross@xxxxxxxx
> >>> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> >> Thank you!!
> >>
> >> The series is fully acked now. I guess it could be added to xentip?
> >> Maybe for v4.15?
> >
> > Yes, that's the plan unless other reviews come in. I will probably
> > create the branch on Monday (assuming rc7 will be the last rc for 4.14).
> > It's later than usual but we haven't had anything for 4.15.
> >
> > -boris
>
> Build warnings (gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1))

Hi Boris, I am trying to repro the warnings below. I have been
unsuccessful so far. What system are you using? Fedora? CentOS? Do have
any specific CFLAGS settings?


> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> â__write_ringâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:459:3: warning:
> ignoring return value of âcopy_from_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_from_iter(data->out + masked_prod, len, msg_iter);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:462:4: warning:
> ignoring return value of âcopy_from_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_from_iter(data->out + masked_prod,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> array_size - masked_prod, msg_iter);
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:464:4: warning:
> ignoring return value of âcopy_from_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_from_iter(data->out,
> ^~~~~~~~~~~~~~~~~~~~~~~~~
> len - (array_size - masked_prod),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> msg_iter);
> ~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:468:4: warning:
> ignoring return value of âcopy_from_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_from_iter(data->out + masked_prod, len, msg_iter);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> â__read_ringâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:560:3: warning:
> ignoring return value of âcopy_to_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_to_iter(data->in + masked_cons, len, msg_iter);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:563:4: warning:
> ignoring return value of âcopy_to_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_to_iter(data->in + masked_cons,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> array_size - masked_cons, msg_iter);
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:565:4: warning:
> ignoring return value of âcopy_to_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_to_iter(data->in,
> ^~~~~~~~~~~~~~~~~~~~~~
> len - (array_size - masked_cons),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> msg_iter);
> ~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:569:4: warning:
> ignoring return value of âcopy_to_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_to_iter(data->in + masked_cons, len, msg_iter);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>
> Slightly different on 32 bit:
>
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> âpvcalls_front_event_handlerâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:160:31: warning:
> cast to pointer from integer of different size [-Wint-to-pointer-cast]
> struct sock_mapping *map = (struct sock_mapping *)
> ^
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> âpvcalls_front_socketâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:283:21: warning:
> cast from pointer to integer of different size [-Wpointer-to-int-cast]
> req->u.socket.id = (uint64_t) map;
> ^
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> âpvcalls_front_connectâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:405:22: warning:
> cast from pointer to integer of different size [-Wpointer-to-int-cast]
> req->u.connect.id = (uint64_t)map;
> ^
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> âpvcalls_front_bindâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:660:19: warning:
> cast from pointer to integer of different size [-Wpointer-to-int-cast]
> req->u.bind.id = (uint64_t)map;
> ^
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> âpvcalls_front_listenâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:722:21: warning:
> cast from pointer to integer of different size [-Wpointer-to-int-cast]
> req->u.listen.id = (uint64_t) map;
> ^
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> âpvcalls_front_acceptâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:826:21: warning:
> cast from pointer to integer of different size [-Wpointer-to-int-cast]
> req->u.accept.id = (uint64_t) map;
> ^
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:828:25: warning:
> cast from pointer to integer of different size [-Wpointer-to-int-cast]
> req->u.accept.id_new = (uint64_t) map2;
> ^
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> âpvcalls_front_poll_passiveâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:922:19: warning:
> cast from pointer to integer of different size [-Wpointer-to-int-cast]
> req->u.poll.id = (uint64_t) map;
> ^
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> âpvcalls_front_releaseâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:1020:22: warning:
> cast from pointer to integer of different size [-Wpointer-to-int-cast]
> req->u.release.id = (uint64_t)map;
> ^
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> â__write_ringâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:459:3: warning:
> ignoring return value of âcopy_from_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_from_iter(data->out + masked_prod, len, msg_iter);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:462:4: warning:
> ignoring return value of âcopy_from_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_from_iter(data->out + masked_prod,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> array_size - masked_prod, msg_iter);
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:464:4: warning:
> ignoring return value of âcopy_from_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_from_iter(data->out,
> ^~~~~~~~~~~~~~~~~~~~~~~~~
> len - (array_size - masked_prod),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> msg_iter);
> ~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:468:4: warning:
> ignoring return value of âcopy_from_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_from_iter(data->out + masked_prod, len, msg_iter);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c: In function
> â__read_ringâ:
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:560:3: warning:
> ignoring return value of âcopy_to_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_to_iter(data->in + masked_cons, len, msg_iter);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:563:4: warning:
> ignoring return value of âcopy_to_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_to_iter(data->in + masked_cons,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> array_size - masked_cons, msg_iter);
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:565:4: warning:
> ignoring return value of âcopy_to_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_to_iter(data->in,
> ^~~~~~~~~~~~~~~~~~~~~~
> len - (array_size - masked_cons),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> msg_iter);
> ~~~~~~~~~
> /data/upstream/linux-xen/drivers/xen/pvcalls-front.c:569:4: warning:
> ignoring return value of âcopy_to_iterâ, declared with attribute
> warn_unused_result [-Wunused-result]
> copy_to_iter(data->in + masked_cons, len, msg_iter);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> -boris
>