# Re: \[RFC PATCH\] video: Use fb\_sys\_write rather than open-coding in drivers

- From: Tomi Valkeinen \<hidden\>
- Date: 2014-02-12 08:17:10 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2014/02/4197909
- Thread: https://ratatoskr.run/linux-fbdev/2013/09/4119614/t.md

```text
On 12/02/14 07:02, Ryan Mallon wrote:

> Well, the alternative is to supply an fb_write() implementation for each
> driver that calls fb_sys_write(), and then updates the display. The
> fb_sync() additions can be removed. That would cut down the boiler-plate
> code, and should keep the behaviour the same.
> 
> If you don't think it is worth the effort, then the patch can just be
> dropped.

I'd be very cautious about doing cleanups on drivers that you cannot
test. Small innocent looking changes can break them.

For example, your patch sets info->screen_size, which is not set
currently. Does the fbdev framework use screen_size somewhere
differently than smem_len? I don't know, but that could lead to small
difference in operation. However, in this case, fb_sys_write() actually
uses smem_len if screen_size is 0, so that change is not even needed.

ssd1307fb_write() looks a bit different than fb_sys_write. I don't know
if the differences could cause issues. The other ones look copy-pasted
from fb_sys_write (but I didn't look at them carefully), so perhaps
those could be cleaned up safely.

 Tomi


```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-fbdev/2014/02/4197909/attachment/0) (application/pgp-signature, 901 bytes)
