From patchwork Fri Nov 9 17:15:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 10676357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E07B15E9 for ; Fri, 9 Nov 2018 17:15:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 705C3294E4 for ; Fri, 9 Nov 2018 17:15:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 637282ECEB; Fri, 9 Nov 2018 17:15:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0C60C294E4 for ; Fri, 9 Nov 2018 17:15:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:To:Subject :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=B1mVQ9McYi5QCxT6PwYCW3v+R1TNqFu1Rl1ihw1PYMM=; b=LwbL/Xw9lkjmOl WZxMOMyt2P6SLd091fa81iNnbIqXYpkS/edMwMJK5Erd6tPBAzPnD8F4Jg4ZJetaInV+xeY/y6Iri f6Z4Jh3yPPCEpEOi6CFvwHehhfudyxLfPQBneDezwwDhaYeS4NWTObmMGk7nqZDgIehFVQh+7pPgk 7Doo5/OIzwRrrih5UV2prymw0ZLLO0/kzFgtbK3Q2L3aL8l//cY9AmujRpK81rEqdlHvdZcHEzJi+ CBITaokIiiJnHDExrR55a3OrFCgIk55gtuZwIlIpCPpWlR8pTtoTuCTsKeCVRnzoXerugEp6l+ejR 5suIypvmmeL0dGdxq3QQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLANt-0006NR-Iy; Fri, 09 Nov 2018 17:15:53 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLANr-0006K5-8p; Fri, 09 Nov 2018 17:15:52 +0000 Received: by mail-wm1-x32c.google.com with SMTP id b203-v6so2613010wme.5; Fri, 09 Nov 2018 09:15:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=lhXesKLx/wINcjY+P0Mpiqebnq3GEuEM2shSRbnXCSQ=; b=g2a7jnpdiAdkEEZD0aQj0ABric7d6g8hnuSyX86bE7w9/mGiPDdcmiJ6JjAkRFkSDm F6qIvZU2a/H0llHkSLemJuzBxwCmBu5Rcg+u/dfnYv8kADgM8djAX5xewV0+XUpwourW 1gCevgx5MsK+nao/XRhsGBcGJpT0fSuYbawOog6VmU2qAO6/7hJcrbTyI7fIXsMxNXhE 4V71bSJndUncDYidDl1cUqSidHGp210AdQE3k62+9M1t4xCeQ1KDRvyNZGYsV3itH4+A GT28bD9nXOPt6tOicMHVYgcQrhEeJ08PcWtTtNJFvikGSyx1GOWBNJEagMZgH7DpEt25 O3Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=lhXesKLx/wINcjY+P0Mpiqebnq3GEuEM2shSRbnXCSQ=; b=Yuy2rmxmfttfmxbaCjTjYIOUjTh7DyqNBRnI9dJuTD1qhNomp5fHlmBof5HyhMPsv8 o3RQh84hv0nZ1GuxfadV9TmfheoFLEQpbE2YbPyU4norIiY+eo6CZApNaErSLIURr2bb 7ObWN8EoDUkoX0xbGoJ3NZV/0VCzemKNAio3X/KRSpOAA7/mNNdpq7dkrBSQ5/Su2NJX bHMzcL+Cnl1DpNWdUkrkR+1Var+jZ+9uGNejm8zG0rxQrRWIlTUV3epa/ZtvvbgDOdbo RjDBUAek2T7g0l2wllMYGeMyhMDWVvee8RnIfWDfzsgshRDFpC6t1yZa2ZhZvJxivUB9 T32A== X-Gm-Message-State: AGRZ1gIJduo+x+VaAReIEQVrmjoodZs5upXrcbb97F6vejzbsMwoRHZ5 Sq/vZtDoS9K1TfmlohNZA4ZXBUfB X-Google-Smtp-Source: AJdET5dxqVykZZjFw3tUqZHtfBg8R+Cu2Ss9Rsbr+Os3rmqf7rZ0048xQEu0hv2b5ljh7g9kuQBueQ== X-Received: by 2002:a1c:4007:: with SMTP id n7-v6mr205809wma.46.1541783739112; Fri, 09 Nov 2018 09:15:39 -0800 (PST) Received: from ?IPv6:2003:ea:8bcf:e300:d5f1:833d:6c7e:a28? (p200300EA8BCFE300D5F1833D6C7E0A28.dip0.t-ipconnect.de. [2003:ea:8bcf:e300:d5f1:833d:6c7e:a28]) by smtp.googlemail.com with ESMTPSA id m13-v6sm8521926wrw.14.2018.11.09.09.15.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Nov 2018 09:15:38 -0800 (PST) From: Heiner Kallweit Subject: [PATCH net-next v3 0/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt To: Andrew Lunn , Florian Fainelli , David Miller Message-ID: <203c4d9e-f39a-7a08-46c3-4ee6e61f181e@gmail.com> Date: Fri, 9 Nov 2018 18:15:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181109_091551_318855_2E0CC3CA X-CRM114-Status: GOOD ( 12.17 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "netdev@vger.kernel.org" , Richard Cochran , open list , "maintainer:BROADCOM BCM63XX ARM ARCHITECTURE" , Kevin Hilman , Carlo Caione , "open list:ARM/Amlogic Meson SoC support" , "moderated list:BROADCOM BCM63XX ARM ARCHITECTURE" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 all driver configs. v2: - add helper for check in patch 1 - remove PHY_HAS_INTERRUPT from all drivers, not only Realtek - remove flag PHY_HAS_INTERRUPT completely v3: - rebase patch 2 Heiner Kallweit (2): net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt net: phy: realtek: remove flag PHY_HAS_INTERRUPT from driver configs drivers/net/phy/amd.c | 1 - drivers/net/phy/aquantia.c | 6 ------ drivers/net/phy/at803x.c | 3 --- drivers/net/phy/bcm63xx.c | 4 ++-- drivers/net/phy/bcm87xx.c | 2 -- drivers/net/phy/broadcom.c | 16 ---------------- drivers/net/phy/cicada.c | 2 -- drivers/net/phy/davicom.c | 4 ---- drivers/net/phy/dp83640.c | 1 - drivers/net/phy/dp83822.c | 1 - drivers/net/phy/dp83848.c | 1 - drivers/net/phy/dp83867.c | 1 - drivers/net/phy/dp83tc811.c | 1 - drivers/net/phy/icplus.c | 1 - drivers/net/phy/intel-xway.c | 10 ---------- drivers/net/phy/lxt.c | 2 -- drivers/net/phy/marvell.c | 15 --------------- drivers/net/phy/meson-gxl.c | 2 +- drivers/net/phy/micrel.c | 14 -------------- drivers/net/phy/microchip.c | 1 - drivers/net/phy/microchip_t1.c | 1 - drivers/net/phy/mscc.c | 6 ------ drivers/net/phy/national.c | 1 - drivers/net/phy/phy_device.c | 8 ++++++-- drivers/net/phy/qsemi.c | 1 - drivers/net/phy/realtek.c | 7 ------- drivers/net/phy/smsc.c | 7 +------ drivers/net/phy/ste10Xp.c | 2 -- drivers/net/phy/vitesse.c | 9 --------- include/linux/phy.h | 5 ++--- 30 files changed, 12 insertions(+), 123 deletions(-)