Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp48577pxm; Wed, 2 Mar 2022 10:10:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6UOhwkN/it0gdp6YqAHkaP9iJkCyr0ObJNkx0Nfy/XILnIwz4nNUo8o02AVH5lGxSHHu/ X-Received: by 2002:a17:907:1b27:b0:6d9:ceb6:7967 with SMTP id mp39-20020a1709071b2700b006d9ceb67967mr3565765ejc.186.1646244635409; Wed, 02 Mar 2022 10:10:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646244635; cv=none; d=google.com; s=arc-20160816; b=R+tERSgewVdNNeqVF2/q2kSSg+DAmAOOO0/ehm9siTBzYmbrKNPphT/THmgh7flcfA 9Gaa6Zjfur+AJRCJrt7vqNA1myBtLGZMKXcad/9OCduESAhCk88xtN2pKBzFFQQikl1S /7NJmYAmTMNya8JRLkcGXAI6mtzExLZKF/r1MzRna554ElwrklBlwKvphs3ro9aNv+A1 kSC7eQicd+nqHhcBncQlEVix6G76fYeUItT3tEonrrWwYyHr/E2bWWTaGYQxj0cjth5q jkkSJPPS1X/1rRv95Kqk18hvGbCPtsieget38Ph4AE7UTqCMpXL4l18LoijL/I1FU5kl d1dg== 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=zT1WYVi7FiTrFh9BxoZLrpJe/d9oI6uiEDFzQMsQ1v4=; b=XpmqeFZtZIAZV0mEeW8jRwZii4LpjGezRWHi6PVYKJvRv2Dv2JX+Frr/lAG+oU2yX3 RtY/HtDWPIWy5Py164RQHG1rv65JdF59fI7h2/NAj6d26VWebYyZ9KSJV7avkDu9J3w+ NmJ3GNVArNa1UAcBLw7dol3siBe0rsmFF+c0o0wOmvG76pZqdz4LIifO/y6HjCC324Gs RUoWS9RbmvXc5aIXt49P/10YrgKFXBrUrb0qBugMSgXv2b3zI3GFtZWQoV/4g+3w30we dCVPBGL7BUQSAVI4kfDyO+sEc7viwuC+BiqW/Q0OMuG6V/OX6RdKKtqvzP4tKmEX3vir 04tw== 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 n1-20020a17090625c100b006d11613f5a0si9767280ejb.395.2022.03.02.10.10.09; Wed, 02 Mar 2022 10:10:35 -0800 (PST) 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 S243163AbiCBOnu (ORCPT + 99 others); Wed, 2 Mar 2022 09:43:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233150AbiCBOnt (ORCPT ); Wed, 2 Mar 2022 09:43:49 -0500 Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 145CB237E4; Wed, 2 Mar 2022 06:43:05 -0800 (PST) Received: by mail-yb1-f172.google.com with SMTP id u3so3790772ybh.5; Wed, 02 Mar 2022 06:43:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zT1WYVi7FiTrFh9BxoZLrpJe/d9oI6uiEDFzQMsQ1v4=; b=K8TxerCD7Lq10y0WP7lIRIQnSEOZfabhQH6TVVspYmwIgoIcIHv+r+cO6JrbysFoTo 9HEYODxnXV45NPMddVGwanF5f4EoTiync47nY3rkfIyePn8U2nfzuYobhn5fd1nkPlmS FPCqBFE8zBDF5Ji5dHQWgQsxq1zqGg4eLFuGcmPD9GuKkjPIPiHdLoV0MY3aDCUtEYby 3e+MHInfgw9I98sRPgVCzimSXNZCNvEzKE0rZ0zOgVmW5NLhJpymdDLb7taSq86uSpQ0 XTHIYZ/3tlxv0uWDxlmnMi+F3tveeq/MQCWOcR5mFVn7NdFMD/FJu4E9mcNNuc8Rx7vx R6mg== X-Gm-Message-State: AOAM531BFasKCIkhUKeHFTRzp98YW5pYHfO7LsY3m4QADEpnkyUqomSW ThOi/Wc3Tjr1mQXjM4t7KPlPloxul32yt0YDQt0= X-Received: by 2002:a25:d2d0:0:b0:628:7d69:b598 with SMTP id j199-20020a25d2d0000000b006287d69b598mr7554145ybg.381.1646232184272; Wed, 02 Mar 2022 06:43:04 -0800 (PST) MIME-Version: 1.0 References: <202203021333.mMJpWPzx-lkp@intel.com> <5f13b914-e309-49ee-4f98-c81780c478b9@intel.com> <20220302103219.kvpfhc6qz42t3pvv@pengutronix.de> <20220302130423.ddd2ulldffpo5lb2@pengutronix.de> In-Reply-To: <20220302130423.ddd2ulldffpo5lb2@pengutronix.de> From: Vincent MAILHOL Date: Wed, 2 Mar 2022 23:42:53 +0900 Message-ID: Subject: Re: drivers/net/can/usb/etas_es58x/es58x_fd.c:174:8: warning: Uninitialized variable: rx_event_msg [uninitvar] To: Marc Kleine-Budde Cc: kernel test robot , kbuild-all@lists.01.org, Linux Kernel Mailing List , Arunachalam Santhanam , linux-can Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Wed. 2 Mar 2022 at 22:04, Marc Kleine-Budde wrote: > I was thinking of this: > > | void *foo = bar->baz; > | > | if (!bar) > | return; > | > | printf("%p", foo); > > There were/are compilers that optimize the bar NULL pointer check away, > because bar has already been de-referenced. Sorry, I do not get your example. If bar is NULL, | void *foo = bar->baz; would segfault and thus the check is not reached. If bar is not NULL, the check succeeds. In both cases, the return statement of the if branch is never executed making this some dead code. So I do not see why this is an issue if the compiler removes it. Yours sincerely, Vincent Mailhol