Received: by 10.223.164.202 with SMTP id h10csp3118137wrb; Sat, 25 Nov 2017 02:21:09 -0800 (PST) X-Google-Smtp-Source: AGs4zMZhuD2EQQ3IxrEFt1GurKSqZMj2qXgkbhbmffvZ/rugJpjQb219X8R1ILArwV8+p64trbc8 X-Received: by 10.98.62.221 with SMTP id y90mr29948016pfj.71.1511605269011; Sat, 25 Nov 2017 02:21:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511605269; cv=none; d=google.com; s=arc-20160816; b=Oah/ZhKF5d1SVKSDNTO6jUDvfne+7YwEWDyGZQ1SBJ/85HnOnvE5RXXstPs3zKdN3l xBkaLhuwKhjPBLib5PUMiKjc95TBcisNoiJxfCFU6980yABL6Z22xfYnuQQllHN1SbV5 H9uY9HLU0mISEC7U1XREPYyH9acVC8vErs5ip//2YbVaOZs1CW8bGd5HUzNmoVmvRNGh U02P21VwgYseg9whAEfpLVUuI9iyJO3sUu3JDYFIGGouie+0TzR3dmv5hb8fQq23l2no BD4bT3x9n2qIz/5WxGaAAtux4z1z63r0ce6DfgNmGfFVZu8fDDAvTEuFx1rgWkH9k9DP srtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=MvWFQ8cFlplMXrEfF9wswIklmo5+AM8tBD6fp/g6ooo=; b=Nmq41NZqty/POBsKdLmlmLKmFSzTOg8IkPOyn9a85jmZAbfzXh4qM+0EjgHvAgfxJC qYsLuhLWZqsxJhY2LjUNVNDsPAMmyevln9dVz4K9a7d1KAyhPw6YWrzcW/amLYJgOOXG wiml+b1TRwaAJYYEebT5rr7J0SZyNiTLcSbkfv1Xn7ae3+NgMlJk3uf763juhHQiCOBi kdxG0aoxohvNSYp2SES9wCIuZYriIS8x1ObuW0QCrIbKGI7Ztj3LUwrcsdtMcSUestXz r+sy+JgZS/pwjMMvgxQSkyVMpG48ia5BwD/jh1nTq3WDCKpzRRgM7CIstjUU3sb59AIh iE0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fssk7YKi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si15151070pld.71.2017.11.25.02.20.57; Sat, 25 Nov 2017 02:21:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fssk7YKi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751461AbdKYKUD (ORCPT + 79 others); Sat, 25 Nov 2017 05:20:03 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35123 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750916AbdKYKUC (ORCPT ); Sat, 25 Nov 2017 05:20:02 -0500 Received: by mail-pg0-f66.google.com with SMTP id l19so16669588pgo.2; Sat, 25 Nov 2017 02:20:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=MvWFQ8cFlplMXrEfF9wswIklmo5+AM8tBD6fp/g6ooo=; b=fssk7YKiITXeV8iVxf4flDOuTb97zJ8gaKFrnm9YO1o83p8ITogjzSFYEdMLnkyyRW ciuwQIMzY2rwOfIOObd0Kn8pshxGeGJgAezlyTWUCyNLdsSZBJowtOINK4YKAfCHqouH 0gEAGkYpQVRRGQtiX8Xprzj6rcpzoRhJna8X+9j5gDQWIpb6Ql6uEZU7zUUGhT7mhtlc i27M+UEmTZOS4p8SloW79XS4Ul53UjoMGM6LO1UscX2Olsu4IBuN4uwdK5BZviSV11Pi /jkPHFARV2nAqLBVGMNmbO5jcWpm45fKvE7Kg10c9tqMKluy8izjpU2F8F+MvQtwfprc b5EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MvWFQ8cFlplMXrEfF9wswIklmo5+AM8tBD6fp/g6ooo=; b=dCZu8BFDGxXZO/QoTQSmnO+y2r5eZa6dkQkFSNihuTI2QqpD4py/M9B1uhOQDYCAFM +KAuCT1eg0gzICyDz8uFBS2XhJ0koIOT6Q3f4SzSBiy/XFLifpxa9H1YAhyJkhoXdM8W bDR4t8nyekoRpN4XOjAPY6aG/napP1VQv53Zgv4yKFvlbgGatmaFH6yA6N9xKSPSfkR6 afoNKysCJ7krO/b/d1sahl9LTG1viPmLKLR6magBJSkOu4WP6hI2PXcbiFvwFBUJ3AtJ lz5jRE1MZiPu+ElMEDJF4Ix4o1jmBdwd4JTW4ShHH7GYmRmH5et1g6KyTuCdsyeQdC9p db9Q== X-Gm-Message-State: AJaThX5D/3X9flxgNOtFNcC5msa6vZJ2UOBBcHvF50/GaeBnLX515r1S 6pVd0GAXiIdGCm/NXt14mQ8= X-Received: by 10.98.60.209 with SMTP id b78mr29839537pfk.144.1511605201763; Sat, 25 Nov 2017 02:20:01 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u12sm45162438pfi.87.2017.11.25.02.19.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 25 Nov 2017 02:20:01 -0800 (PST) From: Arvind Yadav To: b.zolnierkie@samsung.com, tj@kernel.org, sergei.shtylyov@cogentembedded.com Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org Subject: [PATCH v3] pata_pdc2027x: Remove unnecessary error check Date: Sat, 25 Nov 2017 15:49:49 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Here, The function pdc_hardware_init always return zero. So it is not necessary to check its return value. 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. drivers/ata/pata_pdc2027x.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index 82bfd51..6348a83 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c @@ -649,7 +649,7 @@ static long pdc_detect_pll_input_clock(struct ata_host *host) * @host: target ATA host * @board_idx: board identifier */ -static int pdc_hardware_init(struct ata_host *host, unsigned int board_idx) +static void pdc_hardware_init(struct ata_host *host, unsigned int board_idx) { long pll_clock; @@ -665,8 +665,6 @@ static int pdc_hardware_init(struct ata_host *host, unsigned int board_idx) /* Adjust PLL control register */ pdc_adjust_pll(host, pll_clock, board_idx); - - return 0; } /** @@ -753,8 +751,7 @@ static int pdc2027x_init_one(struct pci_dev *pdev, //pci_enable_intx(pdev); /* initialize adapter */ - if (pdc_hardware_init(host, board_idx) != 0) - return -EIO; + pdc_hardware_init(host, board_idx); pci_set_master(pdev); return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, @@ -778,8 +775,7 @@ static int pdc2027x_reinit_one(struct pci_dev *pdev) else board_idx = PDC_UDMA_133; - if (pdc_hardware_init(host, board_idx)) - return -EIO; + pdc_hardware_init(host, board_idx); ata_host_resume(host); return 0; -- 2.7.4 From 1586541802787385534@xxx Tue Dec 12 02:02:49 +0000 2017 X-GM-THRID: 1586537902256841491 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread