# Re: \[PATCH\] fbdev: omapfb: panel-sony-acx565akm: Simplify show\_cabc\_available\_modes()

- From: Andi Shyti \<hidden\>
- Date: 2024-08-08 10:25:23 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2024/08/2700634
- Thread: https://ratatoskr.run/kernel-janitors/2024/08/2700569/t.md

```text
Hi Christophe,

On Thu, Aug 08, 2024 at 11:46:11AM +0200, Christophe JAILLET wrote:
> Use sysfs_emit_at() instead of snprintf() + custom logic.
> Using sysfs_emit_at() is much more simple.
> 
> Also, sysfs_emit() is already used in this function, so using
> sysfs_emit_at() is more consistent.
> 
> Also simplify the logic:
>   - always add a space after an entry
>   - change the last space into a '\n'
> 
> Finally it is easy to see that, given the size of cabc_modes, PAGE_SIZE
> can not be reached.
> So better keep everything simple (and correct).
> 
> Signed-off-by: Christophe JAILLET <redacted>

neat!

Reviewed-by: Andi Shyti <redacted>

Andi
```
