Re: [PATCH libdrm 1/8] Add static qualifier to local functions

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

 



On Fri, 2015-03-13 at 23:07 +0000, Emil Velikov wrote:
> On 27 February 2015 at 18:07, Jan Vesely <jan.vesely@xxxxxxxxxxx> wrote:
> > Signed-off-by: Jan Vesely <jan.vesely@xxxxxxxxxxx>
> > ---
> >  tests/drmstat.c             |  8 ++++----
> >  tests/kmstest/main.c        |  2 +-
> >  tests/modeprint/modeprint.c | 18 +++++++++---------
> >  tests/proptest/proptest.c   |  2 +-
> >  tests/radeon/radeon_ttm.c   |  4 ++--
> >  xf86drm.c                   |  2 +-
> >  xf86drmMode.c               |  2 +-
> >  7 files changed, 19 insertions(+), 19 deletions(-)
> >
> > diff --git a/tests/drmstat.c b/tests/drmstat.c
> > index 5935d07..36cc70d 100644
> > --- a/tests/drmstat.c
> > +++ b/tests/drmstat.c
> > @@ -81,13 +81,13 @@ static void getversion(int fd)
> >         printf( "No driver available\n" );
> >      }
> >  }
> > -
> > -void handler(int fd, void *oldctx, void *newctx)
> > +
> > +static void handler(int fd, void *oldctx, void *newctx)
> >  {
> >      printf("Got fd %d\n", fd);
> >  }
> >
> It's only "user" was commented out as a transition to libdrm2 afaict.
> Should be safe to nuke alongside the commented out caller.

This one got commented out in 8/8 if you prefer I can nuke it, and apply
8/8 before this one.

> 
> > -void process_sigio(char *device)
> > +static void process_sigio(char *device)
> >  {
> >      int              fd;
> >
> > @@ -427,7 +427,7 @@ int main(int argc, char **argv)
> >      return r;
> >  }
> >
> > -void DRM_PRINTFLIKE(4, 0)
> > +static void DRM_PRINTFLIKE(4, 0)
> >  xf86VDrvMsgVerb(int scrnIndex, int type, int verb, const char *format,
> >                  va_list args)
> Think don't need to bother making this static and just nuke it. It
> seems like it was added by mistake (commit c3092ead642) and never
> used.

same here. it is removed in 8/8 I can reorder the patches tog et rid of
this artifact

> 
> ...
> > diff --git a/xf86drm.c b/xf86drm.c
> > index e117bc6..016247f 100644
> > --- a/xf86drm.c
> > +++ b/xf86drm.c
> > @@ -131,7 +131,7 @@ drmMsg(const char *format, ...)
> >      }
> >  }
> >
> > -void
> > +static void
> >  drmSetDebugMsgFunction(debug_msg_func_t debug_msg_ptr)
> >  {
> >      drm_debug_print = debug_msg_ptr;
> > diff --git a/xf86drmMode.c b/xf86drmMode.c
> > index 9ea8fe7..1c06a19 100644
> > --- a/xf86drmMode.c
> > +++ b/xf86drmMode.c
> > @@ -76,7 +76,7 @@ static inline int DRM_IOCTL(int fd, unsigned long cmd, void *arg)
> >   * Util functions
> >   */
> >
> > -void* drmAllocCpy(void *array, int count, int entry_size)
> > +static void* drmAllocCpy(void *array, int count, int entry_size)
> Strictly speaking these could still be used, despite never being part
> of the API. Although my vote (fwiw) would be to that we're safe.

This one is heavily used in the same file.

> 
> Cheers,
> Emil

-- 
Jan Vesely <jan.vesely@xxxxxxxxxxx>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[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