From patchwork Wed Jul 27 10:00:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 12930294 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4735AC04A68 for ; Wed, 27 Jul 2022 10:01:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=CqcGCM2cyhaq9+a+5o3Pqiy+8ew4FS1jTUPGjirOycI=; b=PDqH5owqkgatUy qsFoH3CnbWKxz7PeV5dejId5XZsdPF86WnEdLPw8TDb16Zbya0tqC6kQ1LnH4X4vPo4PrdQE63+gs 0dBMKyduHuuxie1A/tqGUW1WkaQpyMXYY4Hk6IOjDcwl9IO3PH7eRR9Ox0o5gG/Z6kMSUCGXvpMqx 0bRFSO+YqMHrdTeXWF0dE09VihijO4Zw/iC0ijzJ7/vyDV47mZ7oW6pLfEzZ579RAQmIaaSJo5ekQ lKHMSDxu5b03qsoCIAA7xtdWeId5gibY3uVBQNk1UGej7EJlGUAoHmZQy/8qu3vlAsb0WwF/gHF7w 8FGnnN0pI6dci867PMjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGdqK-00C6iw-Fc; Wed, 27 Jul 2022 10:00:40 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGdqH-00C6b1-9A for linux-arm-kernel@lists.infradead.org; Wed, 27 Jul 2022 10:00:39 +0000 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id DB3FAC0010; Wed, 27 Jul 2022 10:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1658916030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gWGk3O/39jRyG70XEIs0yy+M6P6aC9SXYdCpOIcWGAc=; b=VzeFWcLZgtQVOgZZTgdNslvBz0tTb4PkXgvzp79bm+WUZwAwxigyk+Gr70ktpMtGBxLBAW wVaKQ3MhJqOO5XWky5ME9x2eVJe4k2FvdpDsJ0W/fXeD0ymDDGzy1K2ojjQZIBtQMIKnK5 dZBQnOMWfR7SxX/r+JuidExS6Z/I7gNpcL+5hJS7bPPH3ci2OmYaeNiY+6A0EAbRyM9Q+g p/uvbahz+PoW3R7eSve9Sw81m6nOEXqkf5mdmNLX6G5XygXIzPVTUuNo7LqZUSLNXjdG0s xGvorWSHiM9NKcWKhLZMpChqHnBl+NMGjylDalsOP31rrqDz79CCYwKvb8ltlg== From: alexandre.belloni@bootlin.com To: Alessandro Zummo , Alexandre Belloni , Michal Simek Cc: linux-rtc@vger.kernel.org, kernel test robot , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] rtc: zynqmp: initialize fract_tick Date: Wed, 27 Jul 2022 12:00:18 +0200 Message-Id: <20220727100018.3301470-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220727_030037_800707_67BF57DB X-CRM114-Status: GOOD ( 11.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Alexandre Belloni fract_tick is used uninitialized when fract_offset is 0 Reported-by: kernel test robot Signed-off-by: Alexandre Belloni Reviewed-by: Michal Simek Reviewed-by: Nathan Chancellor --- drivers/rtc/rtc-zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c index 1dd389b891fe..c9b85c838ebe 100644 --- a/drivers/rtc/rtc-zynqmp.c +++ b/drivers/rtc/rtc-zynqmp.c @@ -203,7 +203,7 @@ static int xlnx_rtc_set_offset(struct device *dev, long offset) struct xlnx_rtc_dev *xrtcdev = dev_get_drvdata(dev); unsigned long long rtc_ppb = RTC_PPB; unsigned int tick_mult = do_div(rtc_ppb, xrtcdev->freq); - unsigned char fract_tick; + unsigned char fract_tick = 0; unsigned int calibval; short int max_tick; int fract_offset;