Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752493AbdF3TmY (ORCPT ); Fri, 30 Jun 2017 15:42:24 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:36722 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752145AbdF3TmW (ORCPT ); Fri, 30 Jun 2017 15:42:22 -0400 Subject: Re: [PATCH] sata_rcar: fix error return code in sata_rcar_probe() To: "Gustavo A. R. Silva" , Tejun Heo References: <20170630052210.GA19186@embeddedgus> <20170630120106.GB16820@htj.duckdns.org> <20170630143645.Horde.FKDELy036LbmnxownuGOszF@gator4166.hostgator.com> Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: <3944946f-5737-df9f-e8f4-61648f6e0d89@cogentembedded.com> Date: Fri, 30 Jun 2017 22:42:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170630143645.Horde.FKDELy036LbmnxownuGOszF@gator4166.hostgator.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1191 Lines: 38 On 06/30/2017 10:36 PM, Gustavo A. R. Silva wrote: >>> > Print error message and propagate the return value of >>> > platform_get_irq on failure. >>> >>> You should have probably mentioned that this function no longer returns 0 >>> on error. >> >> Yeah, the patches looks good to me but I'd really appreciate more >> context in the changelogs. Gustavo, can you please respin the >> patches? >> > > Absolutely. > > What do you think about the following changelog: > > platform_get_irq() returns an error code, but the sata_rcar driver > ignores it and always returns -EINVAL. This is not correct, and This *was* correct, because it prevented returning 0 on error. > prevents -EPROBE_DEFER from being propagated properly. Yes, this is a real problem. > Print error message and propagate the return value of platform_get_irq > on failure. Also, with this change function sata_rcar_probe() no longer > returns 0 on error. It never did -- I was talking about platform_get_irq() which might return 0 on error until I fixed it: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af > Thank you! MBR, Sergei