Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3577482ioo; Wed, 25 May 2022 03:54:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2lDAT32qEqjos2uxM6Hop3LIteqcizps5kF2+nWx06pCaAne3GP/WI+tlJ/SFteNpHy3w X-Received: by 2002:a17:90b:17c4:b0:1df:a60b:1e28 with SMTP id me4-20020a17090b17c400b001dfa60b1e28mr9610313pjb.31.1653476040568; Wed, 25 May 2022 03:54:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653476040; cv=none; d=google.com; s=arc-20160816; b=m1cQFf4Vwc6fkBcWhzfm6JbfuQcHFi9OB5IiQ2lMacIixSLkRIiZ3MunRLGX0a3VNT V7FcXCugOH7FJxFp12CJ4wRRR3GOGHN7fkLK4Pd6Rkqv4N9nu+sa9V1sZjYHhQCMfaKS tIgqtsiZ8J1a2VsNFjnhU4szXVBpOXYeBEyeAngBnLQBliZMQE3dFjlmQtwfU5IlAu0H oW5L6BXk0UZSyr5GLr07Eetq1cNH4ARe29eXZB8bV6Ye3n3TUZ9IsEWNiB3ZGVi+OrGk CNlpY7jIvfxK56F0GQovrvtHfmmvG0sq71O/gX6nnrGoCq+tzdmUjw4K4kTm3F6UhSRa sLaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=s+X5OlRLHssNjprNZHgVhFJfx/3IswXiKttagJp4B+k=; b=N58082rCnv1gGVHVzNjQ1aD79y6l9gCd5Xg2BQOOE+9/dtaxwQoI8+oHXO5keyOEC9 Vss/aqT8aQFCuQ5W9MozeWkjZMXtW7lkKWORG/XabWKQyFksOxXlE6uwoRwTInCaU+C5 N5+Hx+Ow3YA9z8FZJaUeA+6JMqKD8MHHHOWKQg/b5QKCCAIksFlP5gPjPzlezh5BLg+W ascFCxJ4tvsZQ8ZWU1o/hrKGMqcqsjZwUKuH1v1b4FzR1l4UtMeM04MxLk/50ZWNNMC/ p9zYJi+80QeX5b2EZBNYhC9xAR+T+QHDXEzow+Ku6NpzgwT3ZU/ggjQMmtZj+sb6m4a0 N/xQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bg3-20020a17090b0d8300b001e09092c060si2410497pjb.169.2022.05.25.03.53.46; Wed, 25 May 2022 03:54:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237374AbiEXMbE (ORCPT + 99 others); Tue, 24 May 2022 08:31:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237363AbiEXMbA (ORCPT ); Tue, 24 May 2022 08:31:00 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F7E893981 for ; Tue, 24 May 2022 05:30:57 -0700 (PDT) Received: from mail-yw1-f174.google.com ([209.85.128.174]) by mrelayeu.kundenserver.de (mreue106 [213.165.67.113]) with ESMTPSA (Nemesis) id 1N2VKr-1ni0xs2gxD-013wib for ; Tue, 24 May 2022 14:30:55 +0200 Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-3003cb4e064so7202107b3.3 for ; Tue, 24 May 2022 05:30:55 -0700 (PDT) X-Gm-Message-State: AOAM531tW1o/6bFNEZqeIqsPuddbKsqLq5N56rSqs5iTFlUK3o+sJnSL QYZbHiQHSeGgf9lthGrU+/d/teLECLoovSk9UTk= X-Received: by 2002:a0d:efc2:0:b0:2fe:d2b7:da8 with SMTP id y185-20020a0defc2000000b002fed2b70da8mr27015519ywe.42.1653395454413; Tue, 24 May 2022 05:30:54 -0700 (PDT) MIME-Version: 1.0 References: <20220523150521.2947108-1-nathan@kernel.org> In-Reply-To: <20220523150521.2947108-1-nathan@kernel.org> From: Arnd Bergmann Date: Tue, 24 May 2022 14:30:36 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] misc: rtsx: Fix clang -Wsometimes-uninitialized in rts5261_init_from_hw() To: Nathan Chancellor Cc: Arnd Bergmann , Greg Kroah-Hartman , Nick Desaulniers , Linux Kernel Mailing List , clang-built-linux , patches@lists.linux.dev, Dan Carpenter , kernel test robot , Tom Rix , Ricky WU Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:IPfEqANCpeGQT4I5vvTVLwjtt85tkfqzHGY3tMxzRWCh5ngXDUe DadM6NPrHrtcI2dSaLUTDm3tdTMcWNpVI5q3qzsCa4ZzJBupDAjexnudS+HO+rd4xaswM8N v39ULvqvrcyBZEinxuJVPRS/gMFYIjRnFnvEpSo6VHguCeUdJr7hfQapmTbt7hHXps3Zgnx fAm9QYSUN5SebA1Cme/RQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:jJPvRkR6LOo=:iypfv15fbHOkvJP9Pg/ITk +igaoCxxIOlpraVfvuwTypCjPK/H+Sd4HK++Up4juj+JI6zKOc61RoE/uuyQjiMt6GtaQEF0V UdXTKXhoPTlUS/ZhY/cTpjNG5XvOIO3bk+L1Inib7LVGiOCrYebV7r4Lz5DVNEuF9ErObcbA7 IUzUGM3Q4fRwLVxuLsZ1IafyvRUemOxayRw+kefGuQofJETpqzcPzshf9V8lb+owGzclYsoKq NQw87Vp4osAS0pG+PQmN/UdNOper7JUYa9MlvuOyCLcCOJjwkC5hNtmlfFuvrdqa5Hz3k7MFG 9sLZBfvMjNFR8HPE4VbyfcDKtLdLhnzDnpHG25Wwsue3dU0lQjl6h6zTlsxH6Qo3KuCwc+NNc 6LtzY0hGfAPh0khgMQ8/md4QqMvL9XQj2FmO5jMI11s3BlZwC9JBTydhEHDCDjpJU98hwHAdk EZqcnMXRrztTBVw4G0l8cE5WFopIgLxqURvSsPA6Zu0GjKCTh9S08bhM6TSEHFljwx0rZLsCh guSV0uVtE6HQXVNZgfVxYUmwn10ng4pjkjWBHD4P+vw7MfNgIf56de5obKM9CNBTlKVqAP1L/ 3Zwgc2VFVVX3xuRRGZl4JpwC8/iAZqNuRI90rPtpSPCh2eMpid0AJ+zD8FBYxvLH86INCVkva F2txdwdKmqHsd4wlB0n0UE9kGcp3Gzk46ExiJJf4VkGYr1w3AnA+DdkiTO9QrGbxzT5zSyBqw ZdrayQBoHmXc08bp5K7Bcg3ZMx7qW2e+iCxEmFfKDP/Wh6XVEduq2AlgfK+8HmV0MnGsm3/yB 5loxqnDq+7o/xNzl8n/TeqHPuucHbXSQzT57TEubMzQTTggMlfMeiB3cGxJnDwNZkwzHSufN5 S/vYibcC2LsGKJP81EJA== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, 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 On Mon, May 23, 2022 at 5:05 PM Nathan Chancellor wrote: > > Clang warns: > > drivers/misc/cardreader/rts5261.c:406:13: error: variable 'setting_reg2' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] > } else if (efuse_valid == 0) { > ^~~~~~~~~~~~~~~~ > drivers/misc/cardreader/rts5261.c:412:30: note: uninitialized use occurs here > pci_read_config_dword(pdev, setting_reg2, &lval2); > ^~~~~~~~~~~~ > > efuse_valid == 1 is not a valid value so just return early from the > function to avoid using setting_reg2 uninitialized. > > Fixes: b1c5f3085149 ("misc: rtsx: add rts5261 efuse function") > Reported-by: Dan Carpenter > Reported-by: kernel test robot > Reported-by: Tom Rix > Suggested-by: Ricky WU > Signed-off-by: Nathan Chancellor Looks good to me, Acked-by: Arnd Bergmann