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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8E76C04FDE for ; Mon, 12 Dec 2022 10:13:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231553AbiLLKNv (ORCPT ); Mon, 12 Dec 2022 05:13:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231958AbiLLKNb (ORCPT ); Mon, 12 Dec 2022 05:13:31 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 139B110DE; Mon, 12 Dec 2022 02:12:40 -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=zrS33GIxb8SI89B79yoHCpMHF6IZ4yfmm7uKp66NxsI=; b=hKitPnzJx9Up9shqu8onbwjZ40 KRuS5OBzr2TL9lD8vYdMFie0d0CwRe3Faa+jhcV40XBspHUSW8jUzFb19jw3nnmB0BskeGYA7hvOV xEJyjV+GYWQeahcUHa60zqd4Ek25qsF1IQO+3pkdI6wyF4Eyo3GA2iTQLJhFATjvmiqI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1p4fmd-0054IW-Sv; Mon, 12 Dec 2022 11:11:39 +0100 Date: Mon, 12 Dec 2022 11:11:39 +0100 From: Andrew Lunn To: Divya.Koppera@microchip.com Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, richardcochran@gmail.com, UNGLinuxDriver@microchip.com Subject: Re: [PATCH v5 net-next 2/2] net: phy: micrel: Fix warn: passing zero to PTR_ERR Message-ID: References: <20221206073511.4772-1-Divya.Koppera@microchip.com> <20221206073511.4772-3-Divya.Koppera@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > > content is safe > > > > > > > - if (!IS_ENABLED(CONFIG_PTP_1588_CLOCK) || > > > > > - !IS_ENABLED(CONFIG_NETWORK_PHY_TIMESTAMPING)) > > > > > - return 0; > > > > > - > > > > > > > > Why are you removing this ? > > > > > > > > > > I got review comment from Richard in v2 as below, making it as consistent > > by checking ptp_clock. So removed it in next revision. > > > > > > " > static int lan8814_ptp_probe_once(struct phy_device *phydev) > > > > { > > > > struct lan8814_shared_priv *shared = phydev->shared->priv; > > > > > > > > if (!IS_ENABLED(CONFIG_PTP_1588_CLOCK) || > > > > !IS_ENABLED(CONFIG_NETWORK_PHY_TIMESTAMPING)) > > > > return 0; > > > > > > It is weird to use macros here, but not before calling ptp_clock_register. > > > Make it consistent by checking shared->ptp_clock instead. > > > That is also better form." > > > > O.K. If Richard said this fine. Since Richard wants this removed, i would just remove it. The object code saving is probably not much. Andrew