From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Date: Wed, 07 Jul 2004 10:09:53 +0000 Subject: [PATCH] __likely -> likely conversion Message-Id: <40EBCBF1.5050407@suse.de> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------040409080200070504050301" List-Id: To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --------------040409080200070504050301 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi hpa, the following patch corrects the usage of '__likely', which has been=20 replaced by 'likely()' in recent kernels. Plus it adds a missing include 'klibc/compiler.h' for sys/types.h as the=20 bitops on S/390 insist on using 'likely'. Please apply. THX, Hannes --=20 Dr. Hannes Reinecke hare@suse.de SuSE Linux AG S390 & zSeries Maxfeldstra=DFe 5 +49 911 74053 688 90409 N=FCrnberg http://www.suse.de --------------040409080200070504050301 Content-Type: text/x-patch; name="klibc-0.148.likely_unlikely.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="klibc-0.148.likely_unlikely.patch" --- klibc-0.148/klibc/include/klibc/compiler.h.orig 2004-07-07 11:50:33.894529463 +0200 +++ klibc-0.148/klibc/include/klibc/compiler.h 2004-07-07 11:51:19.393603586 +0200 @@ -94,11 +94,11 @@ /* likely/unlikely */ #if defined(__GNUC__) && (__GNUC_MAJOR__ > 2 || (__GNUC_MAJOR__ == 2 && __GNUC_MINOR__ >= 95)) -# define __likely(x) __builtin_expect((x), 1) -# define __unlikely(x) __builtin_expect((x), 0) +# define likely(x) __builtin_expect((x), 1) +# define unlikely(x) __builtin_expect((x), 0) #else -# define __likely(x) (x) -# define __unlikely(x) (x) +# define likely(x) (x) +# define unlikely(x) (x) #endif /* Possibly unused function */ --- klibc-0.148/klibc/getpagesize.c.orig 2004-07-07 11:56:04.315961696 +0200 +++ klibc-0.148/klibc/getpagesize.c 2004-07-07 11:56:31.849163813 +0200 @@ -13,7 +13,7 @@ struct sysinfo si; int rv; - if ( __likely(page_size) ) + if ( likely(page_size) ) return page_size; rv = sysinfo(&si); --- klibc-0.148/klibc/getpageshift.c.orig 2004-07-07 11:56:12.820479732 +0200 +++ klibc-0.148/klibc/getpageshift.c 2004-07-07 11:56:41.817426728 +0200 @@ -13,7 +13,7 @@ static int page_shift; int page_size; - if ( __likely(page_shift) ) + if ( likely(page_shift) ) return page_shift; page_size = getpagesize(); --- klibc-0.148/klibc/include/sys/types.h.orig 2004-07-07 11:59:00.005344115 +0200 +++ klibc-0.148/klibc/include/sys/types.h 2004-07-07 11:59:22.378444749 +0200 @@ -11,6 +11,7 @@ #define _SSIZE_T typedef ptrdiff_t ssize_t; +#include #include #include --------------040409080200070504050301-- ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel