Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2924410iob; Mon, 16 May 2022 09:06:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1jsZrpefjooArvvregabVA7rHBNeX5wkahyPglO3tKaaDcmdVCpmv6gAVEtqVUlZMfvs2 X-Received: by 2002:a17:907:7ea1:b0:6f4:82c9:c366 with SMTP id qb33-20020a1709077ea100b006f482c9c366mr16770605ejc.758.1652717197312; Mon, 16 May 2022 09:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652717197; cv=none; d=google.com; s=arc-20160816; b=UDPcVT4Y5t1OqOHNJd9pz4BSNJGpSi3+YyMtG7luO8B0xwvcNfhv+TGTA4uX6/lG9L CZ5fJY0wCYOySL4ulyNQjHvWLyH36O0xxNd7d+LixPM1TUiKloJJUh1PY6F8rLxYqM3I XSlUQJebKnqa21SQaJVF5DLwXiGFzNNBGcD/ewd3Ai9+k0tJX8AIbbryCiY8Jav7dB/D piTZKPHU+wnZwzBr1USOVk0VP2upPDwsBQe85zwFQIwxbLhO4skTSxM2yoKlBVwiR2rg ZjLJSj3hp08Q1zaB7k8Jp4dQZULg0L4jy5k7e0jdO6cqPXk+Bmsus1qBx8lO8bdHrIEG s6/A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=2uT7yQARA8zTV6HO5pae5HfOKv/Dq0SyPUtl99rYMNU=; b=Qg/mH0L2heCthwPHCI+bVf9ifTNumAKoh1M3pfKDGZGBbxXT5wIL7pcKAi23gu8dk4 X2nqrogyezx2+8qtbwmGVTcVcVLCOz8EFjd+AJOVWOsIE2WB5Zl5gzkd1ruyXAurBucA D7pkUG5VoCJNrKGa3n/5D20ULjCi2FhVzSiMqvez/Hp3nkOZ6zH/eSgkIf1XS0A2YRas AElI0kN9ar4GtmJb0WBNrsZdpcItJT6zj/HhU3YlRy19TEBdyDCJRB1hm6DtyuHEfeMF 2YaXWviIKf9DPgp8NiVxKGitRRWFpdpHX793Y+8OxFIerzlvGcjZeLvqS/8p8OVDjYyu on/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QIouniY+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du10-20020a17090772ca00b006f39b023480si145431ejc.415.2022.05.16.09.05.58; Mon, 16 May 2022 09:06:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QIouniY+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238310AbiEPNB3 (ORCPT + 99 others); Mon, 16 May 2022 09:01:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243713AbiEPNBT (ORCPT ); Mon, 16 May 2022 09:01:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B12339B8A for ; Mon, 16 May 2022 06:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652706075; 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=2uT7yQARA8zTV6HO5pae5HfOKv/Dq0SyPUtl99rYMNU=; b=QIouniY+Y6GwosInvf05bTZHmj1voz0EtwtVdap+zDyp2XVxVnCcpMLt9hCRKEQnatqvBH 4s6EYXskpMcG+WRNEEuURXAWgWAhdpa7G+PaMWNFoj2Oj6WVi1K5pECTcoTqn83+M25SF/ OleWOcefrTVII/IAXXaQM1kaylgI7Ws= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-154-ooSmTQ0YOBeuc8NlPJVJvA-1; Mon, 16 May 2022 09:00:53 -0400 X-MC-Unique: ooSmTQ0YOBeuc8NlPJVJvA-1 Received: by mail-qt1-f197.google.com with SMTP id o16-20020ac87c50000000b002f3b8cd6a7fso11375665qtv.13 for ; Mon, 16 May 2022 06:00:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2uT7yQARA8zTV6HO5pae5HfOKv/Dq0SyPUtl99rYMNU=; b=yCiyHmZ5pDd8/Oq+BjU+SfXZC1el8oyAKwVfR/Th7WCT/kuHsjkdUVqA0EsdVsF/Db i/5DavJfFMAJbcdy9Taik5M22mtKEGxyH0btZgGtPKY2dy8IG1OWNcDNAoDqDOdy0IcI NRw/egrM8wAYI35vnDlz7QrczyIbgfDBJhnYo/LY7hX/PY4XAK5J+1gZUNcAKYgI3Rdk 8NNjCGkH0V0DPuusquCfi5MJDX6DSbgn8h4tcpYiGMmIW4wO/NWwcYrRYmtGw6VMp0pd VkPoEp8roCHfEbRQEeXtERCOfY3WGhqX3isoZ/NfrRCtBSqjqJJqtAqXe16lnpzXyTNo LV2Q== X-Gm-Message-State: AOAM533IHoS60OnCYXrA7kRRCNnYCcmzYsiN8EXejhRmpE0pu+booq1J MesESAYOO1ScoSIt9A80jR6B1GWXb72UhOvNbHPbkE/NSdCMNbbGxoNtQZJHk8oUrzuV+gtdiw1 z2kR0YONtDpU15U9gDUaT4UbE X-Received: by 2002:a05:622a:1007:b0:2f3:ce52:25cb with SMTP id d7-20020a05622a100700b002f3ce5225cbmr14709121qte.575.1652706052250; Mon, 16 May 2022 06:00:52 -0700 (PDT) X-Received: by 2002:a05:622a:1007:b0:2f3:ce52:25cb with SMTP id d7-20020a05622a100700b002f3ce5225cbmr14709098qte.575.1652706051876; Mon, 16 May 2022 06:00:51 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id g18-20020a05620a13d200b0069fd9de088esm5485582qkl.93.2022.05.16.06.00.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 06:00:51 -0700 (PDT) From: Tom Rix To: arnd@arndb.de, gregkh@linuxfoundation.org, nathan@kernel.org, ndesaulniers@google.com, ricky_wu@realtek.com, kai.heng.feng@canonical.com Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Tom Rix Subject: [PATCH] misc: rtsx: Set setting_reg2 before use. Date: Mon, 16 May 2022 09:00:47 -0400 Message-Id: <20220516130047.3887590-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The clang build fails with rts5261.c:406:13: error: variable 'setting_reg2' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] } else if (efuse_valid == 0) { ^~~~~~~~~~~~~~~~ setting_reg2 is set in this block if (efuse_valid == 2 || efuse_valid == 3) { .. } else if (efuse_valid == 0) { // default .. } But efuse_valid can also have a value of 1. Change the 'else if' to 'else' to make the second block the default. Fixes: b1c5f3085149 ("misc: rtsx: add rts5261 efuse function") Signed-off-by: Tom Rix --- drivers/misc/cardreader/rts5261.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cardreader/rts5261.c b/drivers/misc/cardreader/rts5261.c index 749cc5a46d13..f22634b14dc8 100644 --- a/drivers/misc/cardreader/rts5261.c +++ b/drivers/misc/cardreader/rts5261.c @@ -403,7 +403,7 @@ static void rts5261_init_from_hw(struct rtsx_pcr *pcr) setting_reg1 = PCR_SETTING_REG4; setting_reg2 = PCR_SETTING_REG5; } - } else if (efuse_valid == 0) { + } else { // default setting_reg1 = PCR_SETTING_REG1; setting_reg2 = PCR_SETTING_REG2; -- 2.27.0