From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bird.elm.relay.mailchannels.net (bird.elm.relay.mailchannels.net [23.83.212.17]) by sourceware.org (Postfix) with ESMTPS id 83E40398EC17 for ; Wed, 10 Feb 2021 13:56:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 83E40398EC17 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A4A4C543C07 for ; Wed, 10 Feb 2021 13:56:53 +0000 (UTC) Received: from pdx1-sub0-mail-a29.g.dreamhost.com (100-96-16-13.trex.outbound.svc.cluster.local [100.96.16.13]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4348D543C97 for ; Wed, 10 Feb 2021 13:56:53 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a29.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.16.13 (trex/6.0.2); Wed, 10 Feb 2021 13:56:53 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Harmony-Drop: 575bc6dc55337a28_1612965413480_2798663409 X-MC-Loop-Signature: 1612965413480:2308942293 X-MC-Ingress-Time: 1612965413480 Received: from pdx1-sub0-mail-a29.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a29.g.dreamhost.com (Postfix) with ESMTP id 07E6A7F177 for ; Wed, 10 Feb 2021 05:56:53 -0800 (PST) Received: from rhbox.redhat.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a29.g.dreamhost.com (Postfix) with ESMTPSA id DA4787F182 for ; Wed, 10 Feb 2021 05:56:51 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a29 From: Siddhesh Poyarekar To: libc-stable@sourceware.org Subject: [COMMITTED/2.33 2/3] x86: Use SIZE_MAX instead of (long int)-1 for tunable range value Date: Wed, 10 Feb 2021 19:26:03 +0530 Message-Id: <20210210135604.445223-2-siddhesh@sourceware.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210210135604.445223-1-siddhesh@sourceware.org> References: <20210210135604.445223-1-siddhesh@sourceware.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3495.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2021 13:56:56 -0000 The tunable types are SIZE_T, so set the ranges to the correct maximum value, i.e. SIZE_MAX. (cherry picked from commit a1b8b06a55c1ee581d5ef860cec214b0c27a66f0) --- sysdeps/x86/dl-cacheinfo.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h index e0a72568d8..6f91651f0d 100644 --- a/sysdeps/x86/dl-cacheinfo.h +++ b/sysdeps/x86/dl-cacheinfo.h @@ -917,14 +917,14 @@ dl_init_cacheinfo (struct cpu_features *cpu_feature= s) rep_stosb_threshold =3D TUNABLE_GET (x86_rep_stosb_threshold, long int, NULL); =20 - TUNABLE_SET_WITH_BOUNDS (x86_data_cache_size, data, 0, (long int) -1); - TUNABLE_SET_WITH_BOUNDS (x86_shared_cache_size, shared, 0, (long int) = -1); + TUNABLE_SET_WITH_BOUNDS (x86_data_cache_size, data, 0, SIZE_MAX); + TUNABLE_SET_WITH_BOUNDS (x86_shared_cache_size, shared, 0, SIZE_MAX); TUNABLE_SET_WITH_BOUNDS (x86_non_temporal_threshold, non_temporal_thre= shold, - 0, (long int) -1); + 0, SIZE_MAX); TUNABLE_SET_WITH_BOUNDS (x86_rep_movsb_threshold, rep_movsb_threshold, - minimum_rep_movsb_threshold, (long int) -1); + minimum_rep_movsb_threshold, SIZE_MAX); TUNABLE_SET_WITH_BOUNDS (x86_rep_stosb_threshold, rep_stosb_threshold,= 1, - (long int) -1); + SIZE_MAX); #endif =20 cpu_features->data_cache_size =3D data; --=20 2.29.2