Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4481947pxj; Tue, 25 May 2021 08:58:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3rNW7QdS8jO7SFnTefbSsY9F7xJHmcGK9aX63wdHnl2xqdy7UDrugg6EwiviDUaU7O1ki X-Received: by 2002:a92:da06:: with SMTP id z6mr22426728ilm.66.1621958331030; Tue, 25 May 2021 08:58:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621958331; cv=none; d=google.com; s=arc-20160816; b=BKZD7CoKT0YYteBn/76e2zR6eyaYwh9zxpzffNkK2eNMTBwMoAm0nl+N9BBWJ5ojf/ Jf8+OOkxDTVRHi72oksdd1iF3BxyBAJRKyzuRSRwiDcDkNPsJktMrUllOFLxXaPYZqJb /g1Fwqcoz92fsbJ0dxB8PjWVlU76FRg8OdQXPPfcX+BL1F0RTlrIGfVZXMza2/QKMyGr VLf7QTa11eX+8u6pWgi1u3tWllIM+8N+eshKOqY4/YhH6UdP3Fs7oVe+cZWYSCU4pime Qu4xpvwtKBXL4jQYxXDr9EInxHKA0PBVWjA0PYNi72M65Dc1Ic7ytTehcjsJnNz8s02r TJkA== 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=NutMlFJ/fmTgqJowgK0BEqirQCjnyHyDPGr2qQythGw=; b=nMPIQS2DkGocLwJ6Q06TaC82fVlUXZabpP6AjIPzGoKIr1/OIopg5qviOb0j3enQMW 1RIxi11KIg3Ujce3OxBVSJc/aGEChKswB2lfN6L/+tEeJN4mAyx9k68HVEV1f9OhVl6H uNQoSRhFKzUqRLQ+wvJMSmeYlHtvc9SR9UHl547GWCjCVr9T4FFInn4pVuJhv0fGdvhA WmphcB8MztQogzRqHl4gqYPExyzdvzfOwqdsw91j8Nu5ElW5cwdyFSV1tvGjLHozBP3e 52LpUWlh83L24Nq2z4TbsyCCjejP9laDGZ+jV3vVEqan3D+bOkGkmUboNV8YfAjc1Fvr 2HWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=lZL1cVsd; 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 p9si18405291iov.92.2021.05.25.08.58.38; Tue, 25 May 2021 08:58:51 -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=@lunn.ch header.s=20171124 header.b=lZL1cVsd; 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 S233005AbhEYNFY (ORCPT + 99 others); Tue, 25 May 2021 09:05:24 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56144 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232981AbhEYNFX (ORCPT ); Tue, 25 May 2021 09:05:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=NutMlFJ/fmTgqJowgK0BEqirQCjnyHyDPGr2qQythGw=; b=lZL1cVsdLFJko9BsCdyoQWd3l5 5a/QtqQDoRbjL203srzoB4IaxMhj0OCVtZQaraZhd/yJFQjPEOrDCqWJ9VUCW9wqC/Pwg4HKMwGWQ Xy+9x/2vW7ueyVv8ajWZshKc0Z9pgOy7sFau0o63u6UbOYl0tgJ+tYUZ/DM6s7u7vde8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1llWir-006Aha-3r; Tue, 25 May 2021 15:03:49 +0200 Date: Tue, 25 May 2021 15:03:49 +0200 From: Andrew Lunn To: Peter Geis Cc: Heiner Kallweit , Russell King , "David S . Miller" , Jakub Kicinski , Nathan Chancellor , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, kernel test robot Subject: Re: [PATCH 2/2] net: phy: abort loading yt8511 driver in unsupported modes Message-ID: References: <20210525122615.3972574-1-pgwipeout@gmail.com> <20210525122615.3972574-3-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210525122615.3972574-3-pgwipeout@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 25, 2021 at 08:26:15AM -0400, Peter Geis wrote: > While investigating the clang `ge` uninitialized variable report, it was > discovered the default switch would have unintended consequences. Due to > the switch to __phy_modify, the driver would modify the ID values in the > default scenario. > > Fix this by promoting the interface mode switch and aborting when the > mode is not a supported RGMII mode. > > This prevents the `ge` and `fe` variables from ever being used > uninitialized. > > Fixes: b1b41c047f73 ("net: phy: add driver for Motorcomm yt8511 phy") > Reported-by: kernel test robot > Signed-off-by: Peter Geis Reviewed-by: Andrew Lunn Andrew