Re: [PATCH] Bluetooth: hci_conn: clean up some casts

From: Dan Carpenter
Date: Wed Jul 19 2023 - 04:02:12 EST


On Tue, Jul 18, 2023 at 12:30:57PM -0700, Luiz Augusto von Dentz wrote:
> Hi Dan,
>
> On Mon, Jul 17, 2023 at 3:20 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> >
> > The ERR_PTR/PTR_ERR() functions are only for error pointers. They're
> > not a generic way to cast pointers to int.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > ---
> > We should really create INT_PTR/PTR_INT() functions. But this is a
> > cleanup until someone creates those.
>
> Is there any reason you didn't create such macros? I mean we could
> have it local first, or perhaps we just do HANDLE_PTR/PTR_HANDLE to
> avoid any confusion.
>

Yeah. I can do that.

regards,
dan carpenter