Received: by 2002:a05:7412:8d08:b0:f9:2d0a:d759 with SMTP id bj8csp103129rdb; Sun, 17 Dec 2023 04:22:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFehxtouZwtWSCZv+wGklV7+PaB0DQVYOa3+CfZ2KwRTJbeqCav8XdRundNPwE0h2YgoSSh X-Received: by 2002:a17:906:1d12:b0:a1c:e846:61db with SMTP id n18-20020a1709061d1200b00a1ce84661dbmr14930884ejh.49.1702815769106; Sun, 17 Dec 2023 04:22:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702815769; cv=none; d=google.com; s=arc-20160816; b=rAni27SDeKhAY7QqttQh7vzne6VTjkVKTAzjcrgXsyJs3U2I4V5saHZrDggWoKOI2Q BaL+/QiFlYsCLDxJCr2E1TIp4oKxUBJHX28f2dycrboxXSsI6q7giY5hcz27zxIYGTwj eYmG348ujz8Khp6Fp3clxlr5gbikbIf5wyZippXS3VGxu40OLT99JcL++2btmdqg6RiO piJUjnt5I3t8A31avMvyxw5WKG/h6KCT1/5ADVfrzD3+fXU8QSDeOMHEqA+B3Y49zryj 642qPRVZcKpkI7nPmzqNfHIj0rdmBoNhPaT3sPZk0qq0poRO82ZqstrMH8aCCN74Xvvu vncQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=VQ9+X8UPHQ1C4KdlT7sb5rWe9T6k+4CZlMLjRudRS3c=; fh=fruDj5ZjXLa5ixNoO3bBVIiirWj0PXbwU2hd8EU5j6c=; b=etY7yBKjFf/R44uIF7BTwnf4GKGCIn/coMO/7L/PV8z8TLxyIccaEZnRzT1saxnpZ8 HfosO8zi3ytDI1tFT9pW9iQkx2xQMnhMhNsto+PSHc32j/5lAEwHw/A7lcHGn6p264Sq TyZbnfJVgIJVr9lfKUi2p1nvVABXyuuaKuyTCgoOHnhJ6s3dUSJZlyMHZW6Msx+/zi/B Y0itfw1x7WuTItiM685zq3IEnrFKSBjeE5LC8RhndWwTpIbWpWQg9OHiJMiscwbsnHo7 SJ55lKQ8SjCpMtMzh1vntVsmQ4bJmYrbG1Wixb4BraT6huQqR5vHrnpq7HRC2TKKDqP6 OqaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=P76naHpD; spf=pass (google.com: domain of linux-kernel+bounces-2574-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2574-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k4-20020a170906a38400b00a2358685ac5si24395ejz.562.2023.12.17.04.22.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 04:22:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2574-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=P76naHpD; spf=pass (google.com: domain of linux-kernel+bounces-2574-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2574-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D82BD1F216E3 for ; Sun, 17 Dec 2023 12:22:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A4BF32C98; Sun, 17 Dec 2023 12:22:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b="P76naHpD" X-Original-To: linux-kernel@vger.kernel.org Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CC0532C75; Sun, 17 Dec 2023 12:22:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arinc9.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 296A660002; Sun, 17 Dec 2023 12:22:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1702815753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VQ9+X8UPHQ1C4KdlT7sb5rWe9T6k+4CZlMLjRudRS3c=; b=P76naHpD1ejJeFeHEeU02JVcJ4Mw7kDeqFc+q3LbT0mYGVKMQErzpJ6D3Ud0Eyd8nESW3Z OafvuwKIUMqp/3NU3DNN3zGrrgzaDXn4Aheh4nWBsg0LvIgH250awevxCF2IkCz3cg3S98 18iRVuQfaaxwn/xSU1BC/SLzssPafOZrS3Mkx4dZK9FC/ZXFDM1gTD5zoAdL68hy9VmlOY TtZ5zy0a6hjlcaB/sTzadHUHVLi+dc6/WsN61tIEW0svDyaXFkxjPWiv+C8SqvajS2YZFp wc4bjs4FPpKKuShXmGHbtZBidjGtHUUtPMRccgUZC2UvVgsszl7DTyHFBCDBVw== Message-ID: Date: Sun, 17 Dec 2023 15:22:27 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 07/15] net: dsa: mt7530: do not run mt7530_setup_port5() if port 5 is disabled Content-Language: en-US To: Vladimir Oltean , Dan Carpenter Cc: Simon Horman , Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Frank Wunderlich , Bartel Eerdekens , mithat.guner@xeront.com, erkin.bozoglu@xeront.com References: <20231118123205.266819-1-arinc.unal@arinc9.com> <20231118123205.266819-8-arinc.unal@arinc9.com> <20231121185358.GA16629@kernel.org> <90fde560-054e-4188-b15c-df2e082d3e33@moroto.mountain> <20231207184015.u7uoyfhdxiyuw6hh@skbuf> <9b729dab-aebc-4c0c-a5e1-164845cd0948@suswa.mountain> <20231208184652.k2max4kf7r3fgksg@skbuf> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <20231208184652.k2max4kf7r3fgksg@skbuf> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: arinc.unal@arinc9.com On 8.12.2023 21:46, Vladimir Oltean wrote: > Hmm, maybe the problem, all along, was that we let the -ENODEV return > code from of_get_phy_mode() pass through? "interface" will really be > uninitialized in that case. It's not a false positive. > > Instead of: > > ret = of_get_phy_mode(mac_np, &interface); > if (ret && ret != -ENODEV) { > ... > return ret; > } > > it should have been like this, to not complain: > > ret = of_get_phy_mode(mac_np, &interface); > if (ret) { > ... > return ret; > } > I just tried this, smatch still reports "interface" as uninitialised. $ export ARCH=mips CROSS_COMPILE=mips-linux-gnu- $ ../smatch/smatch_scripts/kchecker --spammy drivers/net/dsa/mt7530.c UPD include/config/kernel.release UPD include/generated/utsrelease.h CHECK scripts/mod/empty.c CALL scripts/checksyscalls.sh CC drivers/net/dsa/mt7530.o CHECK drivers/net/dsa/mt7530.c drivers/net/dsa/mt7530.c:217 mt7530_mii_read() warn: call of 'warn_slowpath_fmt' with non-constant format argument drivers/net/dsa/mt7530.c:454 mt7530_setup_port6() error: uninitialized symbol 'ncpo1'. drivers/net/dsa/mt7530.c:868 mt7530_set_ageing_time() error: uninitialized symbol 'age_count'. drivers/net/dsa/mt7530.c:868 mt7530_set_ageing_time() error: uninitialized symbol 'age_unit'. drivers/net/dsa/mt7530.c:2324 mt7530_setup() error: uninitialized symbol 'interface'. Arınç