public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: libc-alpha@sourceware.org
Subject: [PATCH] Remove _dl_platform_string
Date: Thu, 15 Dec 2016 11:49:00 -0000	[thread overview]
Message-ID: <mvmk2b11kfo.fsf@hawking.suse.de> (raw)

There are no non-trivial uses of _dl_platform_string.

Andreas.

	* sysdeps/generic/dl-procinfo.h (_dl_platform_string): Remove.
	* sysdeps/alpha/dl-procinfo.h (_dl_platform_string): Remove.
	(_dl_string_platform): Use GLRO(dl_alpha_platforms) directly.
	* sysdeps/i386/dl-procinfo.h (_dl_platform_string): Remove.
	* sysdeps/mips/dl-procinfo.h (_dl_platform_string): Remove.
	(_dl_string_platform): Use GLRO(dl_mips_platforms) directly.
	* sysdeps/s390/dl-procinfo.h (_dl_platform_string): Remove.
	* sysdeps/sparc/dl-procinfo.h (_dl_platform_string): Remove.
---
 sysdeps/alpha/dl-procinfo.h   | 9 +--------
 sysdeps/generic/dl-procinfo.h | 3 ---
 sysdeps/i386/dl-procinfo.h    | 7 -------
 sysdeps/mips/dl-procinfo.h    | 9 +--------
 sysdeps/s390/dl-procinfo.h    | 7 -------
 sysdeps/sparc/dl-procinfo.h   | 3 ---
 6 files changed, 2 insertions(+), 36 deletions(-)

diff --git a/sysdeps/alpha/dl-procinfo.h b/sysdeps/alpha/dl-procinfo.h
index 97d9d62df0..78d6752b33 100644
--- a/sysdeps/alpha/dl-procinfo.h
+++ b/sysdeps/alpha/dl-procinfo.h
@@ -28,13 +28,6 @@
 
 #define _DL_PLATFORMS_COUNT   5
 
-static inline const char *
-__attribute__ ((unused))
-_dl_platform_string (int idx)
-{
-  return GLRO(dl_alpha_platforms)[idx];
-};
-
 static inline int
 __attribute__ ((unused, always_inline))
 _dl_string_platform (const char *str)
@@ -44,7 +37,7 @@ _dl_string_platform (const char *str)
   if (str != NULL)
     for (i = 0; i < _DL_PLATFORMS_COUNT; ++i)
       {
-        if (strcmp (str, _dl_platform_string (i)) == 0)
+        if (strcmp (str, GLRO(dl_alpha_platforms)[i]) == 0)
           return i;
       }
   return -1;
diff --git a/sysdeps/generic/dl-procinfo.h b/sysdeps/generic/dl-procinfo.h
index 578a350627..effb75023e 100644
--- a/sysdeps/generic/dl-procinfo.h
+++ b/sysdeps/generic/dl-procinfo.h
@@ -26,9 +26,6 @@
 /* There are no hardware capabilities defined.  */
 #define _dl_hwcap_string(idx) ""
 
-/* There are no different platforms defined.  */
-#define _dl_platform_string(idx) ""
-
 /* By default there is no important hardware capability.  */
 #define HWCAP_IMPORTANT (0)
 
diff --git a/sysdeps/i386/dl-procinfo.h b/sysdeps/i386/dl-procinfo.h
index 9fbb58847e..9ec8592c89 100644
--- a/sysdeps/i386/dl-procinfo.h
+++ b/sysdeps/i386/dl-procinfo.h
@@ -70,13 +70,6 @@ _dl_hwcap_string (int idx)
   return GLRO(dl_x86_cap_flags)[idx];
 };
 
-static inline const char *
-__attribute__ ((unused))
-_dl_platform_string (int idx)
-{
-  return GLRO(dl_x86_platforms)[idx - _DL_FIRST_PLATFORM];
-};
-
 static inline int
 __attribute__ ((unused, always_inline))
 _dl_string_hwcap (const char *str)
diff --git a/sysdeps/mips/dl-procinfo.h b/sysdeps/mips/dl-procinfo.h
index d031b0c46f..95828a5bd2 100644
--- a/sysdeps/mips/dl-procinfo.h
+++ b/sysdeps/mips/dl-procinfo.h
@@ -28,13 +28,6 @@
 
 #define _DL_PLATFORMS_COUNT   4
 
-static inline const char *
-__attribute__ ((unused))
-_dl_platform_string (int idx)
-{
-  return GLRO(dl_mips_platforms)[idx];
-};
-
 static inline int
 __attribute__ ((unused, always_inline))
 _dl_string_platform (const char *str)
@@ -44,7 +37,7 @@ _dl_string_platform (const char *str)
   if (str != NULL)
     for (i = 0; i < _DL_PLATFORMS_COUNT; ++i)
       {
-        if (strcmp (str, _dl_platform_string (i)) == 0)
+        if (strcmp (str, GLRO(dl_mips_platforms)[i]) == 0)
           return i;
       }
   return -1;
diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h
index 4ae276e4ed..7145df8120 100644
--- a/sysdeps/s390/dl-procinfo.h
+++ b/sysdeps/s390/dl-procinfo.h
@@ -66,13 +66,6 @@ _dl_hwcap_string (int idx)
   return GLRO(dl_s390_cap_flags)[idx];
 };
 
-static inline const char *
-__attribute__ ((unused))
-_dl_platform_string (int idx)
-{
-  return GLRO(dl_s390_platforms)[idx - _DL_FIRST_PLATFORM];
-};
-
 static inline int
 __attribute__ ((unused, always_inline))
 _dl_string_hwcap (const char *str)
diff --git a/sysdeps/sparc/dl-procinfo.h b/sysdeps/sparc/dl-procinfo.h
index e187541590..d12feb843e 100644
--- a/sysdeps/sparc/dl-procinfo.h
+++ b/sysdeps/sparc/dl-procinfo.h
@@ -71,9 +71,6 @@ _dl_string_hwcap (const char *str)
 #define HWCAP_IMPORTANT		(HWCAP_IMPORTANT_V9 | HWCAP_SPARC_ULTRA3 \
 				 | HWCAP_SPARC_BLKINIT | HWCAP_SPARC_N2)
 
-/* There are no different platforms defined.  */
-#define _dl_platform_string(idx) ""
-
 /* There're no platforms to filter out.  */
 #define _DL_HWCAP_PLATFORM 0
 
-- 
2.11.0

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

             reply	other threads:[~2016-12-15 11:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15 11:49 Andreas Schwab [this message]
2016-12-16 22:20 ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mvmk2b11kfo.fsf@hawking.suse.de \
    --to=schwab@suse.de \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).