From patchwork Fri May 18 15:24:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Gasnier X-Patchwork-Id: 10411055 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5FA316037D for ; Fri, 18 May 2018 15:25:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B7CC289EF for ; Fri, 18 May 2018 15:25:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DEE1289FF; Fri, 18 May 2018 15:25:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 86DEE289EF for ; Fri, 18 May 2018 15:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=noJpIJi84wN/z9Rq7HUJ3k3sdXUUnIgjwwK+ezcOApE=; b=Qt0gJLkOPhMPOC XKBOZwmo/Ry8z5y2W63Q7AIM+MO6aDjoZjKSKDnYNxO84KrdL9K5neRe2MAbHz+XS/7bSQRspdYln VYF2YhZJSqIzkFRq+EYulGCYGlcIQwYuJKJyq7onMPrWSU8mfwBkLEwfpF9v60KSxn/eT2oRwmhH6 KgBMvkpwgoiGa+MEmoVB1uUKOnnELrdy3X99uiJYZpYK0+qwKmlEiLCtm+mHmYsWZPtp1FbHjUkw7 SI33FXcP1smJ8dElRn6U/7ucQptT3CbEXQWygMkBLoVCXuaFMT7vU7ZciV92F34/p8eDmHsh6Owq3 Jw4Log4GOGSBz3Z/Iq8w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJhG1-0000p0-V9; Fri, 18 May 2018 15:25:25 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJhFi-0007jk-MA for linux-arm-kernel@lists.infradead.org; Fri, 18 May 2018 15:25:08 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w4IFNfoh000543; Fri, 18 May 2018 17:24:29 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2j1e0cnfmj-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 18 May 2018 17:24:29 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D607131; Fri, 18 May 2018 15:24:28 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BA52D5207; Fri, 18 May 2018 15:24:28 +0000 (GMT) Received: from localhost (10.75.127.46) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 18 May 2018 17:24:28 +0200 From: Fabrice Gasnier To: , Subject: [PATCH 2/2] pwm: stm32: initialize raw local variables Date: Fri, 18 May 2018 17:24:04 +0200 Message-ID: <1526657044-14879-3-git-send-email-fabrice.gasnier@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1526657044-14879-1-git-send-email-fabrice.gasnier@st.com> References: <1526657044-14879-1-git-send-email-fabrice.gasnier@st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG1NODE3.st.com (10.75.127.3) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-18_06:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180518_082507_008529_C9A1E2F6 X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sfr@canb.auug.org.au, alexandre.torgue@st.com, linux-pwm@vger.kernel.org, rdunlap@infradead.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org, mcoquelin.stm32@gmail.com, gerald.baeza@st.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This removes build warning when COMPILE_TEST=y and MFD_STM32_TIMERS=n in drivers/pwm/pwm-stm32.c. In function 'stm32_pwm_capture' 'raw_prd' and 'raw_dty' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Fabrice Gasnier Tested-by: Randy Dunlap Acked-by: Thierry Reding --- drivers/pwm/pwm-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c index 60bfc07..09383c6 100644 --- a/drivers/pwm/pwm-stm32.c +++ b/drivers/pwm/pwm-stm32.c @@ -170,7 +170,7 @@ static int stm32_pwm_capture(struct pwm_chip *chip, struct pwm_device *pwm, unsigned long long prd, div, dty; unsigned long rate; unsigned int psc = 0, icpsc, scale; - u32 raw_prd, raw_dty; + u32 raw_prd = 0, raw_dty = 0; int ret = 0; mutex_lock(&priv->lock);