Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2161672rdb; Thu, 7 Dec 2023 23:01:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcgGiwheq6ZSLTBR6wp0O9NN68QCG12fsP/IW+8yCVLE7MTbhZM635bUkfd1xduOj7LQ+k X-Received: by 2002:a05:6a20:da82:b0:18f:fc47:5dec with SMTP id iy2-20020a056a20da8200b0018ffc475decmr2077016pzb.31.1702018901870; Thu, 07 Dec 2023 23:01:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702018901; cv=none; d=google.com; s=arc-20160816; b=H46AmMMSzLmfLhsiLIz84LB/p70esTfhPu/H5gxEjYz+B8+unAFLxj+zysucA1IOYL h+TCkxvsOLIq9ZkeZ9Ouyvza7ydrtQSkiwvSFM4xXoQIafWhunKzEHrnHS9zy5BbyTq3 gNhJm7tg8mYl3KjyT5iX02ox77MOEndt/F0qvy6xRd5N343JMjVcVD8OxYfPXonMnAVr cMLBgKylwEy/5B9XOAfeoLqtFCOSlyLfA7/L1phQdB6oRHZtXam+OBURBceeQCdRfEh2 RvS0JDdPIV2BIDsovm4rirQA2bFT2p3uYoad1turdsEfDWKpRWNkSUjOxpb/NS3gj5Ai JrQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LGLbsXXGOS5hXbJdfbXpRGohhCcqKUKVxgEMXEAy08s=; fh=3M/8bTCRB16Lsc02X7bSCpILCqUt5UU6Z9lIcVlF+qQ=; b=lYIPVuOFzEe0w/bIvr+wwvonM5trI/WWTzphfJMSaDNWMSxKlg0ymCXM18j3t5V4Mu wwVMqhEjKs8zN7XbwF4XXCFADxrrGNw7EjYJNVIOb4xA2IL1B42psZuJsiHDpiyy4lK5 ZgNb5Gx+6ThdXVTHx3Qm/Bwh/CVfzE/N6UtH8OinSn4ZgJTRhUl/i5x/XwKtzLPAtsUw 6aQzoKHYOwTyx282I3RxW32/JNviMhK+unJurTUMEzQkmsSQPXTLD9m+UWHvrK0daBvu XAzrAJDNz04vjvehg/3Rhbz9yr0gNGAG2lTZ1BniXD4IzGLBKGCW2CZ0XpCoqA4AtVhw NN9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YeyAgzSG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id o12-20020a170902bccc00b001cc692bf120si1077155pls.61.2023.12.07.23.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:01:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YeyAgzSG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6B2718705E96; Thu, 7 Dec 2023 23:01:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235829AbjLHHAs (ORCPT + 99 others); Fri, 8 Dec 2023 02:00:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573236AbjLHHAP (ORCPT ); Fri, 8 Dec 2023 02:00:15 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 035C8173F for ; Thu, 7 Dec 2023 23:00:22 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1d06fffdb65so13715735ad.2 for ; Thu, 07 Dec 2023 23:00:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702018821; x=1702623621; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LGLbsXXGOS5hXbJdfbXpRGohhCcqKUKVxgEMXEAy08s=; b=YeyAgzSGcDH+2e7mqUPgeHxqYUjbbNguQ3NgSgLy8KXb37NZm2krkB/+f9OXYjUqMK sEXsPwQzfm+uGCGugVgye7qgyHpoIzFi30oGTubgjjR0Zb8aaZ0KMwJR9dGmm56SqqUu /PAijbv9nP/ZhIk4Lz2utUCTppKLSyXOX3Vnk/nIBpa1NGVPbMrBA04ecUlpVuXFjhHu JP2mo+qGTG4ljzQyXS279N6RjvkcSP+2IErsnn6ErgYnFc0H6HHYA/3SWJpTgMVMB9qP 8o0frzK1OfXLKkrwI4GsYdojndt1+IH2U3HGknpFhmBlzlG6oo39RQvQXbx2z2mqXxsT 73cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702018821; x=1702623621; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LGLbsXXGOS5hXbJdfbXpRGohhCcqKUKVxgEMXEAy08s=; b=eWAAwf1ZLCq1qdJO35QA9D/9UooxBaVAXtjdXUYcs7ut1+zeDuSrWSbpgw6ZejFXnM xztfyiC9Q4VpzB/a32ijMFJA5ABDr6tx/GaNvkRkxf+04K8lXj6aUZr5g1AZX7nwtVXT omMKa9SXC5fkHXx5OzIIO94jYizs/KKRs5RHd2xu2TBYXi25eS1EJhvJTJwZAyh+jJpo JdGHPxSd49YdQ5SW8zcoFXkkn0Qb8gFzmZPFypaBLCd8U5IDzz6tdb9I4pA/Q7YHpkEU AxXUsuZRId5r4Cfi45JK+Yv8z7yXdbj+SVgFV/J8DntRmlHkRuPW4aT4dnSJ5BWq6ZRj HYuQ== X-Gm-Message-State: AOJu0YwQ7jZNPZfewrn002JwjlYdq0kHlYTLZP6OfzF+VFS/W4ltfsEa Fa3WOcTnObPaZHCckHFnYXsR X-Received: by 2002:a17:902:b70d:b0:1d0:8c3c:a123 with SMTP id d13-20020a170902b70d00b001d08c3ca123mr3278106pls.38.1702018821392; Thu, 07 Dec 2023 23:00:21 -0800 (PST) Received: from localhost.localdomain ([117.216.123.142]) by smtp.gmail.com with ESMTPSA id n8-20020a170902e54800b001b03f208323sm934263plf.64.2023.12.07.23.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:00:20 -0800 (PST) From: Manivannan Sadhasivam To: martin.petersen@oracle.com, jejb@linux.ibm.com Cc: andersson@kernel.org, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, quic_cang@quicinc.com, ahalaney@redhat.com, quic_nitirawa@quicinc.com, Manivannan Sadhasivam Subject: [PATCH v2 13/17] scsi: ufs: qcom: Initialize cycles_in_1us variable in ufs_qcom_set_core_clk_ctrl() Date: Fri, 8 Dec 2023 12:28:58 +0530 Message-Id: <20231208065902.11006-14-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231208065902.11006-1-manivannan.sadhasivam@linaro.org> References: <20231208065902.11006-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 07 Dec 2023 23:01:24 -0800 (PST) In case the "core_clk_unipro" clock is not provided, "cycles_in_1us" variable will be used as uninitialized. So initialize it with 0. Issue reported by Smatch tool: drivers/ufs/host/ufs-qcom.c:1336 ufs_qcom_set_core_clk_ctrl() error: uninitialized symbol 'cycles_in_1us'. drivers/ufs/host/ufs-qcom.c:1341 ufs_qcom_set_core_clk_ctrl() error: uninitialized symbol 'cycles_in_1us'. Reviewed-by: Nitin Rawat Signed-off-by: Manivannan Sadhasivam --- drivers/ufs/host/ufs-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 7fbd35a3eb81..9b3d6d3609c9 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -1298,7 +1298,7 @@ static int ufs_qcom_set_core_clk_ctrl(struct ufs_hba *hba, bool is_scale_up) struct ufs_qcom_host *host = ufshcd_get_variant(hba); struct list_head *head = &hba->clk_list_head; struct ufs_clk_info *clki; - u32 cycles_in_1us; + u32 cycles_in_1us = 0; u32 core_clk_ctrl_reg; int err; -- 2.25.1