Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D4BCC05027 for ; Mon, 20 Feb 2023 15:35:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232304AbjBTPfI (ORCPT ); Mon, 20 Feb 2023 10:35:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231366AbjBTPfF (ORCPT ); Mon, 20 Feb 2023 10:35:05 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DB0F99; Mon, 20 Feb 2023 07:35:04 -0800 (PST) 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=jiUNs+XPy3wI2cI5f4T6K+ubODlCpF8ab3E9enHqUMA=; b=peBbdGiK4NIGz4e9u30LJo6zis 8gUKhx2d0z7STGXGsBnmSUWcmRqCpGqxXaXrckZ1petD0rw94G/RqwPIKqgdizTIq47Lure3xTshk 4vbCU1d2tiNMBPHMOV7vuyokzaqMsj4lUO8txj3Hw7bYHUK9HDrGuNsSVBP8b1yIzwdg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pU8Bt-005WGB-QC; Mon, 20 Feb 2023 16:34:57 +0100 Date: Mon, 20 Feb 2023 16:34:57 +0100 From: Andrew Lunn To: Oleksij Rempel Cc: Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Russell King Subject: Re: [PATCH net-next v1 4/4] net: phy: c45: genphy_c45_ethtool_set_eee: validate EEE link modes Message-ID: References: <20230220135605.1136137-1-o.rempel@pengutronix.de> <20230220135605.1136137-5-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230220135605.1136137-5-o.rempel@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + adv[0] = data->advertised; Same here please. > + linkmode_andnot(adv, adv, phydev->supported_eee); > + if (!linkmode_empty(adv)) { > + phydev_warn(phydev, "At least some EEE link modes are not supported.\n"); > + return -EINVAL; > + } > + > phydev->advertising_eee[0] = data->advertised; ... Andrew