From patchwork Wed Aug 31 18:14:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 57213 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5CADD385803E for ; Wed, 31 Aug 2022 18:14:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5CADD385803E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1661969667; bh=bbIp3DLiDIuyIF4dcWwmfnuewFrG2RyMc4k7HniEESQ=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=g0fc8r9h3L8i5zrMubhfYX9AQJCiq/d1laWq6fD8nm8tJb1BTXB6r3zNWd11ZDnQG ZcnJdJ+PBEjoQsWMhcaQBCoVaBdQJ9oeWe+37F1ZcH7bgdrCtSQsLzgv6dTsSVad+U ATDI8q1EGDoa7vg9cYtxfoLBf9PCd262NmtJBBcA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by sourceware.org (Postfix) with ESMTPS id C2C4B3858413 for ; Wed, 31 Aug 2022 18:14:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C2C4B3858413 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-1225219ee46so1335152fac.2 for ; Wed, 31 Aug 2022 11:14:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc; bh=bbIp3DLiDIuyIF4dcWwmfnuewFrG2RyMc4k7HniEESQ=; b=aKIA3aLoShla6ysHudOMpQwJJRLULrLbHeA7rBV5yah3jVhGXY32xwXJbhNqRSZBgm W22tJlpCMkjLFnYnh5l3sdaf8oJ3hUiACcZ4f6GYmWgIZl4k0rmduvmjtR8Z74Lse0oK +jy6SdrFlo43Vx92MKRLHIvdv9JhLhohFtGRdfNQF0itpqh16v8tHqwWTZC+KrPCWyiN nagoHP5RfEZhEulkauj5+e/LbhPZB0bi68466ON7ahCdT+IWvQN2vfMrsxcJyUG87ztE uv5MAeG+x5jd/WhBk5j0oChA2rEt6jec6efNmwGFtHwZf6E892w6YrTlzpu1SMA6OvmF XtlA== X-Gm-Message-State: ACgBeo1u18HXUiyhXpldDF6bpZF8XUmBEBbmZT3VihSw21Bb0Dp6ZKv2 cbQdYeqjvmWrUm2ifujUx7r5V4ytQgVSeA== X-Google-Smtp-Source: AA6agR7W3RMSHEOVUZIRfco7Y9W078y8zQEpxX8URavMUSWC/NKQp/WMEMddp4FOWw+yXiKmTYky/Q== X-Received: by 2002:a05:6808:23cd:b0:345:efa:2a40 with SMTP id bq13-20020a05680823cd00b003450efa2a40mr1752266oib.294.1661969644881; Wed, 31 Aug 2022 11:14:04 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:745e:a396:a3e3:72c0:b7c7]) by smtp.gmail.com with ESMTPSA id n14-20020a056870034e00b0010e046491f8sm7259195oaf.57.2022.08.31.11.14.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 11:14:03 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH] linux: Use same type for MMAP2_PAGE_UNIT Date: Wed, 31 Aug 2022 15:14:00 -0300 Message-Id: <20220831181400.3875516-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" It avoid a possible compiler warning where right size of operator is converted from a negative value to unsigned. Reviewed-by: Florian Weimer --- sysdeps/unix/sysv/linux/arc/mmap_internal.h | 2 +- sysdeps/unix/sysv/linux/ia64/mmap_internal.h | 2 +- sysdeps/unix/sysv/linux/m68k/mmap_internal.h | 2 +- sysdeps/unix/sysv/linux/mmap_internal.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arc/mmap_internal.h b/sysdeps/unix/sysv/linux/arc/mmap_internal.h index d8bbcab0a1..59e8260b5c 100644 --- a/sysdeps/unix/sysv/linux/arc/mmap_internal.h +++ b/sysdeps/unix/sysv/linux/arc/mmap_internal.h @@ -20,7 +20,7 @@ #define MMAP_ARC_INTERNAL_H /* 8K is default but determine the shift dynamically with getpagesize. */ -#define MMAP2_PAGE_UNIT -1 +#define MMAP2_PAGE_UNIT -1ULL #include_next diff --git a/sysdeps/unix/sysv/linux/ia64/mmap_internal.h b/sysdeps/unix/sysv/linux/ia64/mmap_internal.h index 0c0a0ced99..465d589281 100644 --- a/sysdeps/unix/sysv/linux/ia64/mmap_internal.h +++ b/sysdeps/unix/sysv/linux/ia64/mmap_internal.h @@ -22,7 +22,7 @@ /* Linux allows PAGE_SHIFT in range of [12-16] and expect mmap2 offset to be provided in based on the configured pagesize. Determine the shift dynamically with getpagesize. */ -#define MMAP2_PAGE_UNIT -1 +#define MMAP2_PAGE_UNIT -1ULL #include_next diff --git a/sysdeps/unix/sysv/linux/m68k/mmap_internal.h b/sysdeps/unix/sysv/linux/m68k/mmap_internal.h index 8e6f1ed84c..9330edfc05 100644 --- a/sysdeps/unix/sysv/linux/m68k/mmap_internal.h +++ b/sysdeps/unix/sysv/linux/m68k/mmap_internal.h @@ -22,7 +22,7 @@ /* ColdFire and Sun 3 kernels have PAGE_SHIFT set to 13 and expect mmap2 offset to be provided in 8K pages. Determine the shift dynamically with getpagesize. */ -#define MMAP2_PAGE_UNIT -1 +#define MMAP2_PAGE_UNIT -1ULL #include_next diff --git a/sysdeps/unix/sysv/linux/mmap_internal.h b/sysdeps/unix/sysv/linux/mmap_internal.h index aebf97d064..2d118b0d8a 100644 --- a/sysdeps/unix/sysv/linux/mmap_internal.h +++ b/sysdeps/unix/sysv/linux/mmap_internal.h @@ -28,7 +28,7 @@ # define MMAP2_PAGE_UNIT 4096ULL #endif -#if MMAP2_PAGE_UNIT == -1 +#if MMAP2_PAGE_UNIT == -1ULL static uint64_t page_unit; # define MMAP_CHECK_PAGE_UNIT() \ if (page_unit == 0) \