From owner-dev-commits-src-main@freebsd.org Fri Jun 11 20:30:47 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3E62664350; Fri, 11 Jun 2021 20:30:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1stH4Cjxz4fT5; Fri, 11 Jun 2021 20:30:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7931329615; Fri, 11 Jun 2021 20:30:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15BKUl7X026012; Fri, 11 Jun 2021 20:30:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BKUlMd026011; Fri, 11 Jun 2021 20:30:47 GMT (envelope-from git) Date: Fri, 11 Jun 2021 20:30:47 GMT Message-Id: <202106112030.15BKUlMd026011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 768787bee30d - main - mtk: Initialize mask correctly. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 768787bee30dd86f5060f1083745955e2cbcf28f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 20:30:47 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=768787bee30dd86f5060f1083745955e2cbcf28f commit 768787bee30dd86f5060f1083745955e2cbcf28f Author: Priit Trees AuthorDate: 2021-06-11 20:12:08 +0000 Commit: Warner Losh CommitDate: 2021-06-11 20:12:08 +0000 mtk: Initialize mask correctly. Initialization of mask is missing. Fixes a compile issue. Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/459 --- sys/mips/mediatek/mtk_clock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/mips/mediatek/mtk_clock.c b/sys/mips/mediatek/mtk_clock.c index 83433fbd8ff9..915207b755af 100644 --- a/sys/mips/mediatek/mtk_clock.c +++ b/sys/mips/mediatek/mtk_clock.c @@ -123,6 +123,8 @@ mtk_clock_get_info(device_t dev, int index, struct fdt_clock_info *info) if (index < 0 || index > 31 || info == NULL) return (EINVAL); + mask = (1u << index); + if (mtk_sysctl_get(SYSCTL_CLKCFG1) & mask) info->flags = FDT_CIFLAG_RUNNING; else