Re: [PATCH resend 3/5] video: fbdev: ssd1307fb: Extract ssd1307fb_set_address_range()

Geert Uytterhoeven
2021-07-20T07:54:04Z

Hi Sam,

On Mon, Jul 19, 2021 at 9:07 PM Sam Ravnborg <sam@ravnborg.org> wrote:
> On Wed, Jul 14, 2021 at 04:58:02PM +0200, Geert Uytterhoeven wrote:
> > Extract the code to set the column and page ranges into a helper
> > function.
> >
> > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > ---
> > drivers/video/fbdev/ssd1307fb.c | 61 +++++++++++++++++++--------------
> > 1 file changed, 36 insertions(+), 25 deletions(-)
> >
> > diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
> > index 6d7bd025bca1a175..cfa27ea0feab4f01 100644
> > --- a/drivers/video/fbdev/ssd1307fb.c
> > +++ b/drivers/video/fbdev/ssd1307fb.c
> > @@ -152,6 +152,38 @@ static inline int ssd1307fb_write_cmd(struct i2c_client *client, u8 cmd)
> > return ret;
> > }
> >
> > +static int ssd1307fb_set_address_range(struct ssd1307fb_par *par, u8 col_start,
> > + u8 cols, u8 page_start, u8 pages)
> > +{
> Bikeshedding, but I think a dedicated function for col_range and another
> for page_range had been simpler to read.

I agree.
Originally, before I removed the call during initialization, there were
two calls to this function, so it made sense to have a single function.

> With or wihout this change:
> Acked-by: Sam Ravnborg <sam@ravnborg.org>

Thanks!