[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 11 Nov 2020 15:24:33 +0200
From: Grygorii Strashko <grygorii.strashko@...com>
To: Richard Cochran <richardcochran@...il.com>,
Wang Qing <wangqing@...o.com>
CC: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Samuel Zou <zou_wei@...wei.com>,
Kurt Kanzenbach <kurt@...utronix.de>,
Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V4 net-bugfixs] net/ethernet: Update ret when ptp_clock is
ERROR
hi Jakub,
On 11/11/2020 14:32, Richard Cochran wrote:
> On Wed, Nov 11, 2020 at 05:24:41PM +0800, Wang Qing wrote:
>> We always have to update the value of ret, otherwise the error value
>> may be the previous one. And ptp_clock_register() never return NULL
>> when PTP_1588_CLOCK enable.
>
> NAK.
>
> Your code must handle the possibility that ptp_clock_register() can
> return NULL. Why?
>
> 1. Because that follows the documented API.
>
> 2. Because people will copy/paste this driver.
>
> 3. Because the Kconfig for your driver can change without warning.
Following Richard's comments v1 of the patch has to be applied [1].
I've also added my Reviewed-by there.
[1] https://lore.kernel.org/patchwork/patch/1334067/
--
Best regards,
grygorii
Powered by blists - more mailing lists