Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754685AbdLFJlM (ORCPT ); Wed, 6 Dec 2017 04:41:12 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:38780 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754255AbdLFJlI (ORCPT ); Wed, 6 Dec 2017 04:41:08 -0500 X-Google-Smtp-Source: AGs4zMZXSOIP0oMJdbcnn8ZmtDCEAzM5WEf0sfzVbClCF1fJiVNPpN0pZ/IQEGGwhgB9ayaLnAvNRA== Subject: Re: [PATCH v4] pata_pdc2027x: Fix pdc_adjust_pll() to return the error value To: Arvind Yadav , b.zolnierkie@samsung.com, tj@kernel.org Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org References: <78542c42dcd2f21f6f7c01984061628fb4f19a42.1512499639.git.arvind.yadav.cs@gmail.com> From: Sergei Shtylyov Message-ID: Date: Wed, 6 Dec 2017 12:41:06 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <78542c42dcd2f21f6f7c01984061628fb4f19a42.1512499639.git.arvind.yadav.cs@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1310 Lines: 42 Hello! On 12/5/2017 9:50 PM, Arvind Yadav wrote: > This change is to ensure that function pdc_adjust_pll() returns the > error value to avoid the unnecessary error check for pdc_hardware_init() > in pdc2027x_reinit_one(). > > Signed-off-by: Arvind Yadav > --- > changes in v2 : > Make function return type 'void' instead of 'int. > Add sapce between ':'. > changes in v3 : > Fix the checkpatch.pl errors in a sperate patch. > changes in v4 : > return the error value from pdc_adjust_pll() > > drivers/ata/pata_pdc2027x.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c > index 82bfd51..eca16b0 100644 > --- a/drivers/ata/pata_pdc2027x.c > +++ b/drivers/ata/pata_pdc2027x.c [...] > @@ -664,9 +664,8 @@ static int pdc_hardware_init(struct ata_host *host, unsigned int board_idx) > dev_info(host->dev, "PLL input clock %ld kHz\n", pll_clock/1000); > > /* Adjust PLL control register */ > - pdc_adjust_pll(host, pll_clock, board_idx); > + return pdc_adjust_pll(host, pll_clock, board_idx); > Please also remove this empty line (between *return* and }). > - return 0; > } > > /** MBR, Sergei