Re: [PATCH] gpio: sim: Remove intermediate pointer variable and harden function

From: Maxwell Doose

Date: Fri Apr 24 2026 - 09:05:41 EST


On Fri, Apr 24, 2026 at 2:54 AM Bartosz Golaszewski <brgl@xxxxxxxxxx> wrote:
>
> Do you believe the code looks better with more layered dereferences?
>

I think some people might value the more explicit dereferencing, and with this
we also won't need to handle the overhead of assigning another pointer, but if
you want this removed thats fine by me.

> sprintf() is safe here as we cannot possibly exceed PAGE_SIZE with
> this format but if you really want to do this, than please send a
> separate patch converting all configfs show callbacks in the driver.

I can do that, but I'd prefer to separate the functional changes with
this one, so
expect another patch that fixes these. I'll remove those sysfs_emit changes for
now so that the commit history will be clean for when I come back with this
second patch.

best regards,
maxwell