Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2021 20:30:47 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 768787bee30d - main - mtk: Initialize mask correctly.
Message-ID:  <202106112030.15BKUlMd026011@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=768787bee30dd86f5060f1083745955e2cbcf28f

commit 768787bee30dd86f5060f1083745955e2cbcf28f
Author:     Priit Trees <trees@neti.ee>
AuthorDate: 2021-06-11 20:12:08 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106112030.15BKUlMd026011>