On Tue, Sep 13, 2016 at 09:58:56PM +0000, Hefty, Sean wrote: > > It used to be you could suppress this with (void), however the gcc > > developers have decided to get rid of that. > > > > So, look closely at each occurrence and decide what to do: > > - *pingpong: Join the error handling with the if statement directly > > above > > - niegh: read on a timer_fd should never fail, so just use assert. > > The assert is compiled out for Release builds so this is no-change > > - acm: Failure of ucma_set_server_port is detected by a 0 return > > so check fscanf and return appropriately. This is no change since > > fscanf failure was assumed to have left server_port as 0 (though > > I doubt the standard supports that usage) > > - rsocket: This looks super sketchy. At least lets make the intent > > clear > > with a read_all/write_all wrapper that calls assert. Most likely > > this code is wrong.. > > Mangle the code with failable_fscanf to make it clear, but as with > > acm, I don't think the standard supports this usage. > > > > Signed-off-by: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx> > > For my parts > > Acked-by: Sean Hefty <sean.hefty@xxxxxxxxx> Thanks > The rsocket code is sending a small message between a socketpair to > notify a service thread that it needs to add a new rsocket to its > processing. It could probably check for a failure on the write > calls and report that back to the caller. If the read fails, I'm > not sure what the service thread could do. In these situations I usually use close on the fd as a synchronous way to ask the worker thread to exit.. But my comments about being 'wrong' are more to do with not handling EINTR. If you are not reading from a file, and are doing blocking reads, then you have to deal with it in the general library case. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html