lkml.org 
[lkml]   [2017]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4] pata_pdc2027x: Fix pdc_adjust_pll() to return the error value
From
Date
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 <arvind.yadav.cs@gmail.com>
> ---
> 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

\
 
 \ /
  Last update: 2017-12-06 10:42    [W:1.600 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site