From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH rdma-core 1/8] verbs: Annoate ibv_wc helpers with endian Date: Wed, 19 Jul 2017 10:53:51 -0600 Message-ID: <20170719165351.GA25714@obsidianresearch.com> References: <1499894262-10761-1-git-send-email-jgunthorpe@obsidianresearch.com> <1499894262-10761-2-git-send-email-jgunthorpe@obsidianresearch.com> <20170713065057.GH1528@mtr-leonro.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20170713065057.GH1528-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Leon Romanovsky Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Doug Ledford , Yishai Hadas List-Id: linux-rdma@vger.kernel.org On Thu, Jul 13, 2017 at 09:50:57AM +0300, Leon Romanovsky wrote: > > +static inline uint32_t ibv_wc_read_invalidated_rkey(struct ibv_cq_ex *cq) > > +{ > > +#ifdef __CHECKER__ > > + return (__attribute__((force)) uint32_t)cq->read_imm_data(cq); > > +#else > > + return cq->read_imm_data(cq); > > +#endif > > +} > > I don't think that those __CHECKER__ ifdefs should be part of the code. > They are part of infrastructure to support development of library, but > are not required for the user of that library. I don't see a way to get rid of it here and keep the ABI the same. __CHECKER__ is safe to use because we already rely on it being defined sensibly when we include linux/types.h and use __be32 in the public header. If we try and drop it post-install or something then we are really just blocking downstream projects from also using sparse, I don't see the point in doing that... Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html