Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3257907iob; Mon, 16 May 2022 17:22:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3avmI7z+6MjnDOc7Wpr/toy/5WcHLzB1ym5C2I0qEEHTF/PFo9PuKubf643w7am3zdKdu X-Received: by 2002:a17:907:11c7:b0:6f3:941a:83c2 with SMTP id va7-20020a17090711c700b006f3941a83c2mr17476264ejb.33.1652746928465; Mon, 16 May 2022 17:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652746928; cv=none; d=google.com; s=arc-20160816; b=mqfoqcsEvTKetsIJBL0uO372lA6RDSy+5i1yMYL5KKiIt6vlpvnBSzf3R4cmMHSQNt xcwn0QegNr6c7BKp/8qss9iaKZH453oUNlrUPv1WAk7IyPt6Oo/33E34CQW/aJSMIaUz IzWTBnc1wnUSyXGYI75gNiAJ6lJqIyCzq7b/+squzscju079fZJpKdOkOYWgXgdovFMD v3m0VYB8kEGb44/IOB4wDmJUVUlOm+cz/xvTBkkvIO2Yz23/adIqX6Jn7BRlaRjAH3eR kuxDWH/O1cMp93eCx/i89br649cBhd/m8BzBQF5nkxHsN7joRHWzHHkJ5E/uriTfuEoi IM3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MzWMwgX3oT9Ct7NIuUtorWY8G1Q8t/bTWzCjRcKkcc0=; b=p7W5KKFj6DboDOLa4nhBF3bwnr9BLnG8CZAfrAQaobWxS2N0gCkUfPkbZwyZR9r0e/ h3Mcq0WLzSAhfcPn8hmox/Bgu6XGQ3cS6TWDvpR5F3Dzq9or4RYva2HTGniM2vJfwdNN mTHsRLTWRXqhZ9W3orRNh3Of2abi/t9WEJvlhyflfO0mLHomc/Obk6AlHPnqsCriOeqm CgSoJfCWr6HyJuHq7CGb1KgpkaTGL9PrYrMkMfd4bD9NmpbHyvP3Y1oLcbKqKiyfqH6P U7KTLctxPTnVDIVBdRqt6gkSsc/hzpjLW4RTajp6TsqFZM3VrEH+ENooQMv4qsGGsS3y aUSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JDmKHFOu; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e17-20020a17090658d100b006fde12d505bsi980466ejs.406.2022.05.16.17.21.42; Mon, 16 May 2022 17:22:08 -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=@kernel.org header.s=k20201202 header.b=JDmKHFOu; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349513AbiEPV5W (ORCPT + 99 others); Mon, 16 May 2022 17:57:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348377AbiEPV5S (ORCPT ); Mon, 16 May 2022 17:57:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37EC046153 for ; Mon, 16 May 2022 14:57:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BBAADB8167C for ; Mon, 16 May 2022 21:57:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E395AC385AA; Mon, 16 May 2022 21:57:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652738234; bh=2UX7VEgWXWplRyuYdw1siYA11iPaD+OUY4Jd+8EeMa0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JDmKHFOu9IFpLO2Wyz/Hx0s2TDB4CJS6B9cKO7EHAKBz4GNJR5e2sVf3Tr2akBjcE Uq0qyjaONDDsWYkqLqXBmqNQSV5HWBokg53FFZ1c6vbv9aJReqfGhHoJsGOxNF0+w+ lMEoq/gnk2V2gy96ns7i1qVlD0o5c7rL3hR7snvS36rgKB2qTye7gyLaBDrBOX370U M93q7aT4S/Ul5BiaGn9Wzm+PguIGzQe/OsoHps0RFkXCizs8niVZ0urQHuqFg0rueq 53xB1n+amXVZy9Soj4spMPxkwVXo2IbR5ZH83Fcx+b/Gn3JBUgx2Yzpqyqhtv5tnaS Q81R7FbGnXhIw== Date: Mon, 16 May 2022 14:57:12 -0700 From: Nathan Chancellor To: Nick Desaulniers Cc: Tom Rix , Stephen Rothwell , arnd@arndb.de, gregkh@linuxfoundation.org, ricky_wu@realtek.com, kai.heng.feng@canonical.com, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] misc: rtsx: Set setting_reg2 before use. Message-ID: References: <20220516130047.3887590-1-trix@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 16, 2022 at 02:22:50PM -0700, Nick Desaulniers wrote: > On Mon, May 16, 2022 at 10:06 AM Tom Rix wrote: > > > > > > On 5/16/22 8:56 AM, Nathan Chancellor wrote: > > > On Mon, May 16, 2022 at 09:00:47AM -0400, Tom Rix wrote: > > >> 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 > > > I am not sure if this fix is correct from a functional standpoint (i.e. > > > is treating efuse_valid == 1 the same as efuse_valid == 0 correct?) but > > > it is better than not handling this value altogether. For what it's > > > worth: > > > > I looked at how the code used to work, this seemed better than > > initializing to NULL. > > > > > > > > Reviewed-by: Nathan Chancellor > > > > > > As a side note, it is unfortunate that this change made it into -next > > > when there was an outstanding report about this warning: > > > > From the clang side, this is a build break and my static analysis infra > > goes down. > > > > These build breaks seem to happening every week, is there a precommit > > clang gating test that could be done for -next ? > > Probably worth asking Stephen, though I don't think there's _any_ > gating (i.e. presubmit testing) for -next, since that'd increase the > build capacity needed. -next is tested post-merge (i.e. post submit > testing) IIUC. Stephen does do build testing during the merges ("Between each merge, the tree was built with a ppc64_defconfig for powerpc, an allmodconfig for x86_64, a multi_v7_defconfig for arm and a native build of tools/perf"), in addition to testing after the final tree is done. https://lore.kernel.org/20220516205718.2c5a52f9@canb.auug.org.au/ Increasing the "during merge" testing is not a reasonable request (IMO) due to the additional time it would add to the entire -next process. I am not sure that having Stephen do builds with clang post merge is any different from all the existing build coverage that we already have (the tree is already done at that point), other than maybe people listen to a human complaining more than a robot... :) Cheers, Nathan