From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38490C43381 for ; Thu, 14 Feb 2019 17:33:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0713D21928 for ; Thu, 14 Feb 2019 17:33:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436935AbfBNRdm (ORCPT ); Thu, 14 Feb 2019 12:33:42 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:57098 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389406AbfBNRdm (ORCPT ); Thu, 14 Feb 2019 12:33:42 -0500 Received: from localhost (96-89-128-221-static.hfc.comcastbusiness.net [96.89.128.221]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 4ECA314D63A64; Thu, 14 Feb 2019 09:33:41 -0800 (PST) Date: Thu, 14 Feb 2019 09:33:40 -0800 (PST) Message-Id: <20190214.093340.1523955807518975542.davem@davemloft.net> To: marc.w.gonzalez@free.fr Cc: vkoul@kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, niklas.cassel@linaro.org, andrew@lunn.ch, f.fainelli@gmail.com, nsekhar@ti.com, peter.ujfalusi@ti.com Subject: Re: [PATCH] net: phy: at803x: disable delay only for RGMII mode From: David Miller In-Reply-To: References: <20190212141922.12849-1-vkoul@kernel.org> <20190214.083828.206479765039661735.davem@davemloft.net> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 14 Feb 2019 09:33:41 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Marc Gonzalez Date: Thu, 14 Feb 2019 17:46:54 +0100 > On 14/02/2019 17:38, David Miller wrote: > >> From: Vinod Koul >> Date: Tue, 12 Feb 2019 19:49:22 +0530 >> >>> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c >>> index 8ff12938ab47..7b54b54e3316 100644 >>> --- a/drivers/net/phy/at803x.c >>> +++ b/drivers/net/phy/at803x.c >>> @@ -110,6 +110,18 @@ static int at803x_debug_reg_mask(struct phy_device *phydev, u16 reg, >>> return phy_write(phydev, AT803X_DEBUG_DATA, val); >>> } >>> >>> +static inline int at803x_enable_rx_delay(struct phy_device *phydev) >>> +{ >>> + return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, 0, >>> + AT803X_DEBUG_RX_CLK_DLY_EN); >>> +} >>> + >>> +static inline int at803x_enable_tx_delay(struct phy_device *phydev) >>> +{ >>> + return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5, 0, >>> + AT803X_DEBUG_TX_CLK_DLY_EN); >>> +} >>> + >> >> Please do not use the inline directive in foo.c files, let the compiler >> decide. > > Isn't the compiler free to ignore the "inline" hint? I'm not going into this, but our rules are to not use the inline keyword except in header files where they are required in order to not emit a static copy of the function into every file that includes the header.