Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2037950pxb; Sat, 7 Nov 2020 07:09:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMwQqynw7GksQvNkX31zKAo6MJTVaCpQHywlgHtwoEqn5fT1E+/+ZuuFdlJ+NyrvJnlNx9 X-Received: by 2002:a05:6402:1456:: with SMTP id d22mr7138885edx.77.1604761742802; Sat, 07 Nov 2020 07:09:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604761742; cv=none; d=google.com; s=arc-20160816; b=huZ2xeewRX7myyfjOpRzsmbIaxSWqbGmafdunI84qUbsMv1umP0sB0hx122gYGq1XU SDOBvs4uKt3NZNEn9M22YDyd502EYmFF5Z/HZERel3LOs3yiPqJGW52Dxh2genjccBOx 5kEDIhBs022kpCgbxDFf0I4oqpFkBdbIwq5SPKbMSjJ0tha/7QZSpMB8grOUB+CPucbH 9fiD3qM6HHBRCULtAegNSQsRBqZQGvM7ZtnRa/GgEfqMNlEI9uHTlM2Lgbci+mXmpOtc EyvDL7fKP6jSk2RWmU+Ix3Pidur6EIE9aE1221boY+brBIxSimG+9KQyWRI46d0myYB9 pWuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=LmB4DYOplEdxdVAp4i/Cv8GxfNmTwSJWFjvTe1z2P1Y=; b=oNrZqKIuuSRJMAMwZGuUKd0ozAYhHuM77JdpYcEGPybYfvg8M3M4N7i9uM2AbLjFR7 xTwlP6gTD5liqZeYJiNnunU+1KdeTVVaRh9dzsI93+S+r1BsLC1SExDctQGTtuufchcW euy8OW8mkLc6FgrhcgZLEwSCoteFZpVgHM9f980mRsEurdIXrYdtT+8bOp7i8yVeLeRD O5YE+0I9UCllLLBJ1c08v9JrBw+tYfOIe5C8Y2hrW3lvvjreiWRJJ1x0A227r+6lhydr 1DBKEF6svUiMgzMTfKhxjldA4XUxwFPXoDpsVZhu+LbGVrI5jdEBaIRb3WzTk2BUWzwT kqvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I9Bygavi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lf27si3276352ejb.400.2020.11.07.07.08.37; Sat, 07 Nov 2020 07:09:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I9Bygavi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726257AbgKGPHH (ORCPT + 99 others); Sat, 7 Nov 2020 10:07:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbgKGPHG (ORCPT ); Sat, 7 Nov 2020 10:07:06 -0500 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B57E0C0613CF; Sat, 7 Nov 2020 07:07:06 -0800 (PST) Received: by mail-pl1-x642.google.com with SMTP id j5so2360197plk.7; Sat, 07 Nov 2020 07:07:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=LmB4DYOplEdxdVAp4i/Cv8GxfNmTwSJWFjvTe1z2P1Y=; b=I9BygavihvgZRQ25TNZ7bjf1rdXSNWIAnLgtArrdkI6nuWKCWp3yCf0kjKSSkRfrNP ouojl3FWa4hTwGSkYKnH/yBo9amHMYwYiTjnhrOiTIa07T11jOCNIxLj/6jKCWdUuIOg DbhFsNwAkK8283PTCDebc+xA3R3vUc7Re33z1ustGIj2zXW84WhbCl+uoWJ6Wee717w3 bITLE5FuP/8lB6uB3T7LuVKaGv4ISyDDOdnDcxX4W/jlkdThke9DvyPXtG7WD1q4/X/q BJCqCnekjpv9LeF9IbkHKWToShk8BrrXCgktMDkmHvrnW2ftrGokv0Hd3Sr6ZlMVaR0b nWcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=LmB4DYOplEdxdVAp4i/Cv8GxfNmTwSJWFjvTe1z2P1Y=; b=UKaxfWyUn/Jzsi3azXpUAZ9OoWvxdKnFTLPXfII/zX2VLR+no5mVxJmfO/4nWXPNIf 80uzGMyIb/BkQa+beEeCHIfo2K8bvtg4MVnPIqBgHdkHNHWC4m+Jt0yP2TT4sbAelifU pJU83PABAus1tkhnw3TmBJTTDuICcu3ykgGw8lEN5b0boPf0f5E0vtuGEHdlBTZD4T3a ZQwDW8Ddw81ETZCpZI3ZHh0adkZ4GhxSZzEYJbrDHaJ3z72MFCOL1vNzO0yvjQEDcK+1 qCeo8n8Hi4y38hG7rpV4sTx3Q+e5p3cxCxn8Nf3s0v2q/JCQDpm+B6gxdrXNYeQez74X w0LQ== X-Gm-Message-State: AOAM530shSiwSURigAe0KCwwbwv5hkOg2aaNDfKHTJJdJSBh8KJ9W1HL vJ5E+9alxOm9OxwmuyVaDDlxvq9KRAo= X-Received: by 2002:a17:90a:af82:: with SMTP id w2mr4653201pjq.77.1604761626122; Sat, 07 Nov 2020 07:07:06 -0800 (PST) Received: from hoboy.vegasvil.org (c-73-241-114-122.hsd1.ca.comcast.net. [73.241.114.122]) by smtp.gmail.com with ESMTPSA id v23sm5782190pjh.46.2020.11.07.07.07.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Nov 2020 07:07:05 -0800 (PST) Date: Sat, 7 Nov 2020 07:07:02 -0800 From: Richard Cochran To: Grygorii Strashko Cc: Wang Qing , "David S. Miller" , Jakub Kicinski , Samuel Zou , Kurt Kanzenbach , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net/ethernet: update ret when ptp_clock is ERROR Message-ID: <20201107150702.GC9653@hoboy.vegasvil.org> References: <1604649411-24886-1-git-send-email-wangqing@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 06, 2020 at 01:34:04PM +0200, Grygorii Strashko wrote: > And ptp_clock_register() can return NULL only if PTP support is disabled. Not true in general ... > In which case, we should not even get here. only because the Kconfig uses "depends on" instead of "implies" PTP_1588_CLOCK. > So, I'd propose to s/IS_ERR_OR_NULL/IS_ERR above, > and just assign ret = PTR_ERR(cpts->ptp_clock) here. No, please no -- don't make another bad example for people to copy/paste. Thanks, Richard