From patchwork Fri Nov 6 03:24:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 1395399 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=b/RbKWdO; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CS5Nc0XYpz9sTD for ; Fri, 6 Nov 2020 14:24:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ED68F3A4B015; Fri, 6 Nov 2020 03:24:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id EDD9339D1C14 for ; Fri, 6 Nov 2020 03:24:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EDD9339D1C14 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kito.cheng@sifive.com Received: by mail-pl1-x630.google.com with SMTP id 1so26803ple.2 for ; Thu, 05 Nov 2020 19:24:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OVmQZ9tTezXuTGAGUWt4thTCpRdKWNZBHa0kgabUu4w=; b=b/RbKWdOJ0byOslNGCLTkfZEUwcLjsWFwIx2UQRHmR8dxNqsiTaLpqCuX7wIDVOBae jC1s2yAohwgJ3w3zEqejTj9LIsYFyewfv8rNdByHh5ob/Lms0StDN6TN++kMmLp1mFH7 8OqJuWzixmOQ/hYBRgC0b5Cm1mQKxt9EbkuhvDMCOz3eTfPGGwj5dOKRKarT4f0+Tnzm 02C6Vo/eIs8Us7lkL8yTSxsp/RRMWzyGSGptwwa9SwFaI6J7F8blKTHrYUjq7CcjxGGY FdWX26oWzVo7laB1qnjZbrHnUDYiUPykx0sUiEoO9UV8IAA1d27Ba88h6Jztuvzvm9Zf wVxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OVmQZ9tTezXuTGAGUWt4thTCpRdKWNZBHa0kgabUu4w=; b=SvgmqNlUPzd91q0LGpnSbd9FZ3s8nFmrO35eQPqoqKj2wuzu6JqhBDRu4UTGKURnm4 1XIWG7hUf8mq3GL3GreGLrKRCnupI8ok1FG/fLh7mGkp6WqQy4SK5281+iLx5DqhIyPq Yv5TgbZAKWwUDc/EYhzfGmpbY3SzBjIMf9nfQI68wxNFkHbe5RJqcRPL1e58MgYe8y6I TYodOSIxb+8LvXy8Luz124JIKE5GN4PMVkGV3jJzOXlqCQvTpJTZrmAc2aB/4E6dxVNJ mj0eCIBiDOSd0V8r9po+Uyg7H3CHblLizq6gWm753NW94TX7i1LfZqHLlG07UldQ4Qjz tFIQ== X-Gm-Message-State: AOAM532rwh6DbLc851VXTz7ZpJD9GblS06Ah1Ino0bSa5U95FAt6Z1Z+ rlUCvxyRRKeNVwUr+uDx8683MGrOsga4LfZ7 X-Google-Smtp-Source: ABdhPJw4+4rSft4O2DrTU7oXq4ICMSLO6va1Hso5S1TWnf5601/S5JYZNfRSsqCJ1xcWsdF3R4TC4A== X-Received: by 2002:a17:902:9f98:b029:d6:f124:e297 with SMTP id g24-20020a1709029f98b02900d6f124e297mr127428plq.81.1604633080655; Thu, 05 Nov 2020 19:24:40 -0800 (PST) Received: from hsinchu02.internal.sifive.com (114-34-229-221.HINET-IP.hinet.net. [114.34.229.221]) by smtp.gmail.com with ESMTPSA id x30sm1495054pgc.86.2020.11.05.19.24.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 19:24:40 -0800 (PST) From: Kito Cheng To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com Subject: [committed] RISC-V: Mark non-export symbol static and const in riscv-common.c Date: Fri, 6 Nov 2020 11:24:36 +0800 Message-Id: <20201106032436.114928-1-kito.cheng@sifive.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Spam-Status: No, score=-14.3 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 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kito Cheng Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" gcc/ChangeLog: * common/config/riscv/riscv-common.c (riscv_implied_info): Add static and const. (riscv_subset_list::handle_implied_ext): Add const due to riscv_implied_info changed to const. --- gcc/common/config/riscv/riscv-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/common/config/riscv/riscv-common.c b/gcc/common/config/riscv/riscv-common.c index 84695a6ed1b..9a576eb689b 100644 --- a/gcc/common/config/riscv/riscv-common.c +++ b/gcc/common/config/riscv/riscv-common.c @@ -54,7 +54,7 @@ struct riscv_implied_info_t }; /* Implied ISA info, must end with NULL sentinel. */ -riscv_implied_info_t riscv_implied_info[] = +static const riscv_implied_info_t riscv_implied_info[] = { {"d", "f"}, {NULL, NULL} @@ -459,7 +459,7 @@ riscv_subset_list::handle_implied_ext (const char *ext, int minor_version, bool explicit_version_p) { - riscv_implied_info_t *implied_info; + const riscv_implied_info_t *implied_info; for (implied_info = &riscv_implied_info[0]; implied_info->ext; ++implied_info)