From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 ED63C40847; Sat, 22 Jun 2024 21:03:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719090230; cv=none; b=F+Dz4b1+bmQ3N7410PxWhsqQMhd8QUN/PzBnib/9IgpaBXBNxF9Btl16N8ZNrCN2zKXdnMcG7PFDjGDL4mruRl/MynlyPQnBaAFzww1Es4Rt43Mbu/PNA8hLPjd0qU10S/zIxc2ZmxvgtHPRAplMTouGnagI4LImY6CuH/PI/as= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719090230; c=relaxed/simple; bh=dlE2miFt5xef8WDzJ055d86Kazksl3tA5Z0SNaM9GlU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XMxCj/NVZ/K/LZcLvD4pCebBZC5aUbLZbz25jIQrcQtI6nTQsLrkFerBtloDVIlSlApZHhZEZLtp07l/I1780c4GCWttdf4pCMMXNq2UP4gpG0YEn6d978elVhx4h+bX4pkLKJHeVebWRlloKTDoboFyK9S01ZAsO70SQHNJoos= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.97.1) (envelope-from ) id 1sL7tS-000000005kt-28az; Sat, 22 Jun 2024 21:03:30 +0000 Date: Sat, 22 Jun 2024 22:03:24 +0100 From: Daniel Golle To: Andrew Lunn Cc: Sky Huang , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Qingfang Deng , Matthias Brugger , AngeloGioacchino Del Regno , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Steven Liu Subject: Re: [PATCH net-next v8 06/13] net: phy: mediatek: Hook LED helper functions in mtk-ge.c Message-ID: References: <20240621122045.30732-1-SkyLake.Huang@mediatek.com> <20240621122045.30732-7-SkyLake.Huang@mediatek.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sat, Jun 22, 2024 at 07:29:45PM +0200, Andrew Lunn wrote: > > [...] > > + if (index > 1) > > + return -EINVAL; > > + > > It looks like this test could be moved into the common code. It seems > like all variants have a single LED. Exactly two LEDs, which is what index > 1 checks for, but yes, it should be moved to common code.