Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp922722pxb; Fri, 22 Apr 2022 14:24:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye6N/5PuqtqI4PsTRMwb1ma5Ap/QqHq1Lyt8kkf7FwFAW9TwbyBvKhLIyp8nojJlBnMPUo X-Received: by 2002:a17:902:b10e:b0:156:1bf8:bf26 with SMTP id q14-20020a170902b10e00b001561bf8bf26mr6555314plr.8.1650662645747; Fri, 22 Apr 2022 14:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650662645; cv=none; d=google.com; s=arc-20160816; b=cgDutRR1AYadIoQSaNzzvultp0w/+XQa02QR7/MfGehRnmQIL7p6cufZafEFSakJrA 8Wh+n8i9Gh84owXcgvU40PMtgtvGrVGccVeHfE611QqsslY9M/WkjlsxkXtZzULcLyxC YqQwYZ6p6BpKBkOqGwwfm3Gh2PWJYx8FJoohS0Xvx4Uw4m0hi/R8VC4buboA0HDeEpsK boy2SLpltRRTbAvMgPap0pwFbaNDqELkfI+Xxprhfg+XsY6aJ95WWW6grAgmJPX8duwZ hAI4erJW9/sRDjfC2ECzuHTQHeMwEgLj5/1Ii9P8LgzPN0XFt38iAK6/03eNnMIIHc6M /+Iw== 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=hFB5zYjKWWprbHlfzCYhNl3nXhLjM+WHTyUMqRnXfzE=; b=1J9+u9xYZ06bam2JLKT9NnNzHKFXRsR7KsoSpmJLJk7gGExFGvF4rnVGCkdTbHQOwn f2ye2bYKgZ87g9VNRHoWT7LEmY9XK4ylPc2MLVHGF8BmvILxozSyVsCHtzZgoR/1aYlm X5oWwaWdaauwj/6WdqZqdX9xoN9ohZXPqgac6SBCIpSJGA7l/CCregeuNa4uiYHYTbv4 q9+DkXCREWmZ7uBXGXzZ1VU4katMuYPL36HfpKUkgfuCpq6/EQIic6LQQH2wjgVr6LIO Cr8XGWYET6BH7HQhQ6eUjvRmDwuO5CyQk400c5/8WpsiShkK0Pbjn6SWFcXD8v3U2Ygo 2GkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fOq2f1Gy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j12-20020a170903024c00b001581fe7543fsi9967323plh.521.2022.04.22.14.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 14:24:05 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fOq2f1Gy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 855B81DFE61; Fri, 22 Apr 2022 12:31:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231347AbiDUQ3y (ORCPT + 99 others); Thu, 21 Apr 2022 12:29:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390712AbiDUQ1D (ORCPT ); Thu, 21 Apr 2022 12:27:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E397C21E39; Thu, 21 Apr 2022 09:24:13 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 8083E61D0C; Thu, 21 Apr 2022 16:24:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F26FC385A1; Thu, 21 Apr 2022 16:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650558252; bh=MOPueyE9NIXkT/ATECPBN+Gv0vBI/El85kaJXW7CqO8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fOq2f1GyWMr3IWUctveZ9t7w5wvQ4QLpW5yiWXkYCOaRWZP3YjrFHAC+r1PjLDV8G odMkyofTPMJ3AnnqeIkobgzsTkaLuCrus0t6n/ay3PqmdO73Ez3qAw5cF3xFx34lcC pqggJa+Mlzj6KNAnP4H+EicvPKzCGz/7yPoLy/Bc= Date: Thu, 21 Apr 2022 18:24:09 +0200 From: Greg KH To: Tom Rix Cc: heikki.krogerus@linux.intel.com, nathan@kernel.org, ndesaulniers@google.com, sven@svenpeter.dev, alyssa@rosenzweig.io, marcan@marcan.st, martink@posteo.de, saranya.gopal@intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] usb: typec: tipd: improve handling of failures in interrupt handlers Message-ID: References: <20220409130013.1474412-1-trix@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220409130013.1474412-1-trix@redhat.com> X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 Sat, Apr 09, 2022 at 09:00:13AM -0400, Tom Rix wrote: > clang static analysis reports this representative issue > core.c:516:6: warning: Branch condition evaluates > to a garbage value > if (event) > ^~~~~ > > In cd321x_interrupt(), a successful call to > tps6598x_read64() is the only way event is set, > and if a failure happens the irq should not be > reported as handled. Please use the full 72 columns. > > Instead of initializing event, rework the > usage of ret by initializing it to IRQ_NONE > and then setting it when event is known to > be not zero. This removes the if-statement > before the return. So the code today is correct, but clang is wrong? We don't need to do anything then... > tps6598x_interrupt() is similar. This line makes no sense, sorry. greg k-h