From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Vesely Subject: Re: [PATCH libdrm 1/8] Add static qualifier to local functions Date: Fri, 13 Mar 2015 20:08:54 -0400 Message-ID: <1426291734.3249.32.camel@rutgers.edu> References: <1425060448-5315-1-git-send-email-jan.vesely@rutgers.edu> <1425060448-5315-2-git-send-email-jan.vesely@rutgers.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0536629450==" Return-path: Received: from mail-qc0-f176.google.com (mail-qc0-f176.google.com [209.85.216.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 068C36E251 for ; Fri, 13 Mar 2015 17:08:57 -0700 (PDT) Received: by qcbkw5 with SMTP id kw5so2503281qcb.2 for ; Fri, 13 Mar 2015 17:08:56 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Emil Velikov Cc: ML dri-devel List-Id: dri-devel@lists.freedesktop.org --===============0536629450== Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-qKdX73jTbaX2ieW6oCjF" --=-qKdX73jTbaX2ieW6oCjF Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2015-03-13 at 23:07 +0000, Emil Velikov wrote: > On 27 February 2015 at 18:07, Jan Vesely wrote: > > Signed-off-by: Jan Vesely > > --- > > 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. >=20 > > -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 >=20 > ... > > 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 =3D 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. >=20 > Cheers, > Emil --=20 Jan Vesely --=-qKdX73jTbaX2ieW6oCjF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJVA3wWAAoJEDhUsXb6ZiH/CnQQAJh9iJk45E9DkkFYq9BKY2Tn t14BP1kv31iDb1RDQT4g+enZdy+8WsxDjCtwO429AljPlONszryZzIMH7lEZ7yF8 zRD8IF2mGeeY5rSwXEPJy9GS2JQekmAgI3ZQK4pXwPFpSor6g6UJzy6dcKula4Tg QRGKZjtW4eR7S0CLytUlkY9XOfyyPW93I/DtjqAv6s6pHl3ASnEWzJUf888kfKNo 1+7lex4MZ8sHRVW+KKOQq8Kc+zhdI6BuC9ONcE9vAl0R2wpBDLMttkGUNHi41P34 7bIt6M6rSZXMmJ4pMmoHD+XHaKI4ny4ZOGFweJGBkZXDp1XNWOIRLeKCNvY8vUgB Ceczn8SHYy2fFIQJ5OejqmFdRZUBByvFd5ayXjP5VpFwWDaywH/FQG+i5dLvi7qA WTdY8uVrnT/WzvaelVkRSPmtRiQRH7GTJlnK2bFY+p7ygo3EcasWgK0mS2KpWX7t XOvMx9Abp0kZQKMQGEkQfoGI5K7QgBayaL2qvlLiB122CocWL3PmEsB49Gfb9xII j7TIe6wQrP7226f/IWJIRLrwiTZsUqt1rldyH2FWfAfw2XK+TQqYLJNiPSCX58Y/ Mj+IcbW8UEoTilcI7Fm7ik5h5ecO5zX6ojpHgAqT66NxDZeeUYZ2e6j6qZ8e1bLu 176cQT1VLNLSY4khg2xy =Ea68 -----END PGP SIGNATURE----- --=-qKdX73jTbaX2ieW6oCjF-- --===============0536629450== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0536629450==--