[PATCH weston 5/5] main: remove unused argument from backend loaders

Pekka Paalanen ppaalanen at gmail.com
Mon Jun 6 12:26:48 UTC 2016


On Sun, 5 Jun 2016 21:24:18 +0300
Giulio Camuffo <giuliocamuffo at gmail.com> wrote:

> Maybe it would make sense to squash this with the previous one?

Hi,

I don't think so. I can't write a commit summary that is both explicit
and not listing two different things at the same time, so they really
are two different changes.


Thanks,
pq

> 2016-06-03 15:41 GMT+03:00 Pekka Paalanen <ppaalanen at gmail.com>:
> > From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> >
> > There is no need to pass the backend name string to these functions
> > anymore.
> >
> > Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > ---
> >  src/main.c | 24 ++++++++++++------------
> >  1 file changed, 12 insertions(+), 12 deletions(-)
> >
> > diff --git a/src/main.c b/src/main.c
> > index 9e970d6..193a845 100644
> > --- a/src/main.c
> > +++ b/src/main.c
> > @@ -976,7 +976,7 @@ configure_input_device(struct weston_compositor *compositor,
> >  }
> >
> >  static int
> > -load_drm_backend(struct weston_compositor *c, const char *backend,
> > +load_drm_backend(struct weston_compositor *c,
> >                  int *argc, char **argv, struct weston_config *wc)
> >  {
> >         struct weston_drm_backend_config config = {{ 0, }};
> > @@ -1013,7 +1013,7 @@ load_drm_backend(struct weston_compositor *c, const char *backend,
> >  }
> >
> >  static int
> > -load_headless_backend(struct weston_compositor *c, char const * backend,
> > +load_headless_backend(struct weston_compositor *c,
> >                       int *argc, char **argv, struct weston_config *wc)
> >  {
> >         struct weston_headless_backend_config config = {{ 0, }};
> > @@ -1067,7 +1067,7 @@ weston_rdp_backend_config_init(struct weston_rdp_backend_config *config)
> >  }
> >
> >  static int
> > -load_rdp_backend(struct weston_compositor *c, char const * backend,
> > +load_rdp_backend(struct weston_compositor *c,
> >                 int *argc, char *argv[], struct weston_config *wc)
> >  {
> >         struct weston_rdp_backend_config config  = {{ 0, }};
> > @@ -1100,7 +1100,7 @@ load_rdp_backend(struct weston_compositor *c, char const * backend,
> >  }
> >
> >  static int
> > -load_fbdev_backend(struct weston_compositor *c, char const * backend,
> > +load_fbdev_backend(struct weston_compositor *c,
> >                       int *argc, char **argv, struct weston_config *wc)
> >  {
> >         struct weston_fbdev_backend_config config = {{ 0, }};
> > @@ -1160,7 +1160,7 @@ weston_x11_backend_config_append_output_config(struct weston_x11_backend_config
> >  }
> >
> >  static int
> > -load_x11_backend(struct weston_compositor *c, char const * backend,
> > +load_x11_backend(struct weston_compositor *c,
> >                  int *argc, char **argv, struct weston_config *wc)
> >  {
> >         struct weston_x11_backend_output_config default_output;
> > @@ -1475,7 +1475,7 @@ load_wayland_backend_config(struct weston_compositor *compositor, int *argc,
> >  }
> >
> >  static int
> > -load_wayland_backend(struct weston_compositor *c, char const * backend,
> > +load_wayland_backend(struct weston_compositor *c,
> >                      int *argc, char **argv, struct weston_config *wc)
> >  {
> >         struct weston_wayland_backend_config config = {{ 0, }};
> > @@ -1500,17 +1500,17 @@ load_backend(struct weston_compositor *compositor, const char *backend,
> >              int *argc, char **argv, struct weston_config *config)
> >  {
> >         if (strstr(backend, "headless-backend.so"))
> > -               return load_headless_backend(compositor, backend, argc, argv, config);
> > +               return load_headless_backend(compositor, argc, argv, config);
> >         else if (strstr(backend, "rdp-backend.so"))
> > -               return load_rdp_backend(compositor, backend, argc, argv, config);
> > +               return load_rdp_backend(compositor, argc, argv, config);
> >         else if (strstr(backend, "fbdev-backend.so"))
> > -               return load_fbdev_backend(compositor, backend, argc, argv, config);
> > +               return load_fbdev_backend(compositor, argc, argv, config);
> >         else if (strstr(backend, "drm-backend.so"))
> > -               return load_drm_backend(compositor, backend, argc, argv, config);
> > +               return load_drm_backend(compositor, argc, argv, config);
> >         else if (strstr(backend, "x11-backend.so"))
> > -               return load_x11_backend(compositor, backend, argc, argv, config);
> > +               return load_x11_backend(compositor, argc, argv, config);
> >         else if (strstr(backend, "wayland-backend.so"))
> > -               return load_wayland_backend(compositor, backend, argc, argv, config);
> > +               return load_wayland_backend(compositor, argc, argv, config);
> >
> >         weston_log("Error: unknown backend \"%s\"\n", backend);
> >         return -1;
> > --
> > 2.7.3
> >
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/wayland-devel  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160606/c6ab4eaf/attachment.sig>


More information about the wayland-devel mailing list