Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp829104pxj; Thu, 3 Jun 2021 22:17:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5EaF5L7QXfQg5K3bIJEFKT6vq0Ag0zGMx7X0r1wNLGSqNM1JggI7FxR/OVZEqjsg1zZyA X-Received: by 2002:a05:6402:175b:: with SMTP id v27mr2809228edx.61.1622783826543; Thu, 03 Jun 2021 22:17:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622783826; cv=none; d=google.com; s=arc-20160816; b=wiR3g5Ab9XwhR5daWCCrYTx/kQqeSiV1IJp41UkcvnbFHirRwagwOKGmfVfxG4mFBF VS1sZ3EHRvBMbdOuaOo0qOcstcvbQhgFb60qG2kB5xofmGNfa/0OfhLLrEZCfVxQ4Hlw CJpSr50b+/DiTv9moAnGDH12dGGIXoIDnleeBimg3ob2VzBxXFuTHWdAkSGQqKsoq7jG CjFOGtS4ZkL9F1VjJ+OHkmmLYaI8S7Dg2FoiYKD4+cjsczsIOV+AdlViE014DUNRkFHW X3Qvr+hnl1kg3c0VKAwoSWVmOz0WeEpR/BbIfn4woKNUyRgyTx1gWVRtS/N0ZyTrJvIJ GT4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=uRQ5+HAqjf1zI3L21gFTmAKCk0wOVTgllZo9/C7+/WA=; b=N6DRtDXczUrajcF2imGH9WDblRncXjRrQELV7IIcR2fcUgNC6ghZjE8RXeVUUy+ha2 OqH5oh4NQNyjN1BwDOwrgqDPo4uwUtcpr0QIPAXTURcUJvv5RaMA02igDwnI6QSpnVXN CYpayGHO9LbUvOtDtJ6cxJTv/66Mb3tQwepGtmF+jkFxV077DEDXkY4t2ia8z6X1zB9T NQtaTximBjCdIaqHy/Fg6D1ozAxyrp2KHDQxX6y/61mAZuxFnU1QZit3zaCi0Z2aZXfG I6rA5eYIqovnECPInN3lE5YFx4oupcgIagpM3JkMBcvWUnOMWeenaWloXiebdL+UrNQD Es/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=jm4R3CEA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f26si3627731ejl.276.2021.06.03.22.16.41; Thu, 03 Jun 2021 22:17:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=jm4R3CEA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229917AbhFDFQ6 (ORCPT + 99 others); Fri, 4 Jun 2021 01:16:58 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:21152 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbhFDFQ5 (ORCPT ); Fri, 4 Jun 2021 01:16:57 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1622783712; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=uRQ5+HAqjf1zI3L21gFTmAKCk0wOVTgllZo9/C7+/WA=; b=jm4R3CEAcqRQc7NrCpHj9LoegFEPxR7t1boC5O0TjRb1VtadSyXuygirPHDrbGYuza769nt5 N5ejA0vCrx+43DXSEgDOFbErIIvGFDLxHfy0BuDDeMlItgbydy3g1/YIM/ayzcpNipPdODdK B9x3GpC9jwj51IoUDoxwpvKqnUo= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-west-2.postgun.com with SMTP id 60b9b6dfe570c05619fab9e1 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 04 Jun 2021 05:15:11 GMT Sender: subashab=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 1B22AC4323A; Fri, 4 Jun 2021 05:15:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: subashab) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7237CC433F1; Fri, 4 Jun 2021 05:15:10 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 03 Jun 2021 23:15:10 -0600 From: subashab@codeaurora.org To: patchwork-bot+netdevbpf@kernel.org Cc: Nathan Chancellor , stranche@codeaurora.org, davem@davemloft.net, kuba@kernel.org, ndesaulniers@google.com, sharathv@codeaurora.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH net-next] net: ethernet: rmnet: Restructure if checks to avoid uninitialized warning In-Reply-To: <162276000605.13062.14467575723320615318.git-patchwork-notify@kernel.org> References: <20210603173410.310362-1-nathan@kernel.org> <162276000605.13062.14467575723320615318.git-patchwork-notify@kernel.org> Message-ID: <1f6f8246f0cd477c0b1e2b88b4ec825a@codeaurora.org> X-Sender: subashab@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-06-03 16:40, patchwork-bot+netdevbpf@kernel.org wrote: > Hello: > > This patch was applied to netdev/net-next.git (refs/heads/master): > > On Thu, 3 Jun 2021 10:34:10 -0700 you wrote: >> Clang warns that proto in rmnet_map_v5_checksum_uplink_packet() might >> be >> used uninitialized: >> >> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:283:14: warning: >> variable 'proto' is used uninitialized whenever 'if' condition is >> false >> [-Wsometimes-uninitialized] >> } else if (skb->protocol == htons(ETH_P_IPV6)) { >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:295:36: note: >> uninitialized use occurs here >> check = rmnet_map_get_csum_field(proto, trans); >> ^~~~~ >> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:283:10: note: >> remove the 'if' if its condition is always true >> } else if (skb->protocol == htons(ETH_P_IPV6)) { >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:270:11: note: >> initialize the variable 'proto' to silence this warning >> u8 proto; >> ^ >> = '\0' >> 1 warning generated. >> >> [...] > > Here is the summary with links: > - [net-next] net: ethernet: rmnet: Restructure if checks to avoid > uninitialized warning > https://git.kernel.org/netdev/net-next/c/118de6106735 > > You are awesome, thank you! > -- > Deet-doot-dot, I am a bot. > https://korg.docs.kernel.org/patchwork/pwbot.html Hi Nathan Can you tell why CLANG detected this error. Does it require a bug fix.