Re: [PATCH 09/10] RDMA/bnxt_re: Use ib_respond_udata()

Leon Romanovsky
2026-02-13T15:39:23Z

On Fri, Feb 13, 2026 at 08:42:32AM -0400, Jason Gunthorpe wrote:
> On Fri, Feb 13, 2026 at 12:40:24PM +0200, Leon Romanovsky wrote:
>
> > > - rc = ib_copy_to_udata(udata, &resp, min(udata->outlen, sizeof(resp)));
> > > + rc = ib_respond_udata(udata, resp);
> > > if (rc) {
> > > ibdev_err(ibdev, "Failed to copy user context");
> >
> > Should we move the error message into ib_respond_udata() and remove all
> > the corresponding prints from the drivers?
>
> There shouldn't be an error message at all. I didn't try to remove
> that stuff.

Please clean this up. People will copy and paste this code, and it is better
to ensure it is properly prepared for future use.

Thanks

>
> Jason