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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sam,

On Mon, Jul 19, 2021 at 9:07 PM Sam Ravnborg <sam@xxxxxxxxxxxx> 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@xxxxxxxxxxxxxx>
> > ---
> >  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@xxxxxxxxxxxx>

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux