From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH net-next 0/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt Date: Thu, 8 Nov 2018 23:30:28 +0100 Message-ID: <20181108223028.GI5259@lunn.ch> References: <193e3970-8ce2-1221-357a-7b7f9f6aea76@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Florian Fainelli , David Miller , "netdev@vger.kernel.org" To: Heiner Kallweit Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:55888 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727500AbeKIIIJ (ORCPT ); Fri, 9 Nov 2018 03:08:09 -0500 Content-Disposition: inline In-Reply-To: <193e3970-8ce2-1221-357a-7b7f9f6aea76@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Nov 08, 2018 at 10:54:50PM +0100, Heiner Kallweit wrote: > Flag PHY_HAS_INTERRUPT is used only here for this small check. I think > using interrupts isn't possible if a driver defines neither > config_intr nor ack_interrupts callback. So we can replace checking > flag PHY_HAS_INTERRUPT with checking for these callbacks. > > This allows to remove this flag from a lot of driver configs, let's > start with the Realtek driver. Hi Heiner Ideally, we should do this to all the drivers, not just one. If we leave PHY_HAS_INTERRUPT, people are going to use it. That then makes the realtek driver then different to all the other drivers, and at some point somebody will do something which breaks it because they don't know the realtek driver is special. Andrew