Received: by 10.223.164.202 with SMTP id h10csp2884734wrb; Fri, 24 Nov 2017 20:18:03 -0800 (PST) X-Google-Smtp-Source: AGs4zMbT89LaMLpTyZ88v7rYCE7hgxtimIjE/w7OVM1TcJY1TRf8HD1et50/Owagl9CgKghTep3y X-Received: by 10.84.171.193 with SMTP id l59mr19591183plb.33.1511583483168; Fri, 24 Nov 2017 20:18:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511583483; cv=none; d=google.com; s=arc-20160816; b=BiSlpAL7Vs69ijBdGDDZ0ZjVxfGIwvUdLeZgzXR1OczLkfCUFLxphIoOUHz46AEk9e cCGeyOxWOP0LcLGrWLlkImoav9ovOMN7b+2ksZatc8fpf2MvKB43BAg2ZeV3sxIIeAxR p05ANuIB6wLE2WWpmnyCG+Ry1xwXQxjXxPVCS+gVm/jsMvkpfAqTcPctiS7MzkDFNKK1 QiJrKgfNJZC5EENfvuUWRenNRsvDCw+DEH7EeTzZxzRjxNPuPqnyf52ZmGLeY7Tnr4Yd qhfnhflPc9YiiLMMcJoEGYfxmmaCbLQkIPnEEEyXqqgT+UAxbra4e5TWhN6EP1fyOKgN rxjA== 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=bhcNnV/Q+/MK3drzB6qBpOqPUg7U5iQjWkknBAxXdBo=; b=qvpzExbh41vomOXw9XLyWKU0qDemAIYE8LBi2HcNf5f18klDU05M8lzb8yf5D34sPH H4gsli/kbPn3v1160I3neVDi1mR/NnCTvtrrryQq9lrv2gyd34we5wJMO13tvS8SAvfy 5Bh1okoJvc4Gf2JWWwosnGYIAHQdVz6aSFzyZIzGc102pFAibXRZCGjI3kH43VoAj2tG +SQVdE+U8ycvPcjaoPjKQ3U4DBqXAs9M6VAp4gV8hqSyoh+COrS+NU8NPJBMFferdLgz fxJrDPjMOxZFSeShf4BqJrb7su1EI83I0l2WGgY0hlJvUhtz99jo+fLBsLphfXGnjkSY +uMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iZj6EKlo; 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 o2si18757133pgp.46.2017.11.24.20.17.51; Fri, 24 Nov 2017 20:18:03 -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=iZj6EKlo; 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 S1751422AbdKYEP7 (ORCPT + 77 others); Fri, 24 Nov 2017 23:15:59 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:37703 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055AbdKYEP4 (ORCPT ); Fri, 24 Nov 2017 23:15:56 -0500 Received: by mail-pg0-f66.google.com with SMTP id m4so6491439pgc.4; Fri, 24 Nov 2017 20:15:56 -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=bhcNnV/Q+/MK3drzB6qBpOqPUg7U5iQjWkknBAxXdBo=; b=iZj6EKloGpgLhBCrvcOl/zPxIIzRUHMqRC8ljWHR4aK26k5aMKF6ahNnh80sYdhLdn o4lB6E0lMKSNb8f/13u8adilSqAY69OwtkRU2zfYDWeNAowUf2eeYJKGTnmMOhL7eZNk f4u+3RRnp4JJVTJ7psyEg8w+0ioEmnwz1KBBlvcBQ2aMFMv8Y02yUlBGSjoWoNkKG8bt iG1LZVH79wdK3MrSgG6TcFefr1aDvgzSMszP+emL5DSAp4k3sNWe0ot84F+OdPQnVMNE Q70vpwTRQBLXYY7uyGwlynVWUMSb7ZgFLMAZurXH3wpK0rCkVAxE6IDzbs04sHVnboGw l4Mg== 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=bhcNnV/Q+/MK3drzB6qBpOqPUg7U5iQjWkknBAxXdBo=; b=gvF4lvxOxVLYC5gz5+p8XZJIiWq6zHtu24erWadDuRZEC92szvEcW+ht2FcJXYQbZk C2nJ8Wm1kivTJM0P0HahI/z8ftXHKh9QBnavWO2pTnhWNpJshhcElBR1M3x6y1/1mP/Y kShfqhMLzA6vUgL2f9eeUF47hMLBAS3M71yO4aUbW7WZAXVisHg7jtaxUnFtJok/C8z4 VD6hRzBfKtQfxb3Ad4dROD/c0Vlf7xreWSS+5evF2cHZhIM7jYJtieCMQ8B4zIHthjHi HmYvVJHf47meCO5VMk/FMKVRA0mx08O8gw0Tng1TvenM9sGMYV9Nq/KrVvOMZW8P+kcx rCeA== X-Gm-Message-State: AJaThX64D8SMKhPxY52WCPn+zx/xFbiPVyb7z+V/eRSG0ABjUw0K+Bv1 me5zMDLD3k1HLaz9Ianveb0= X-Received: by 10.101.102.20 with SMTP id w20mr18716951pgv.102.1511583355872; Fri, 24 Nov 2017 20:15:55 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id c11sm32156059pgv.42.2017.11.24.20.15.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Nov 2017 20:15:54 -0800 (PST) From: Arvind Yadav To: b.zolnierkie@samsung.com, tj@kernel.org Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org Subject: [PATCH] pata_pdc2027x: Remove unnecessary error check and coding style error. Date: Sat, 25 Nov 2017 09:45:40 +0530 Message-Id: <9c2e4c1081be44da4460072ae6129d29c7e6d6bc.1511583254.git.arvind.yadav.cs@gmail.com> 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. Fix these checkpatch.pl error: ERROR: space prohibited after that '~' (ctx:WxW) + mask &= ~ (1 << (6 + ATA_SHIFT_UDMA)); ERROR: spaces required around that '?' (ctx:VxW) + long pout_required = board_idx? PDC_133_MHZ:PDC_100_MHZ; ERROR: that open brace { should be on the previous line + const struct ata_port_info *ppi[] = + { &pdc2027x_port_info[board_idx], NULL }; Signed-off-by: Arvind Yadav --- drivers/ata/pata_pdc2027x.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index ffd8d33..9a953ef 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c @@ -277,7 +277,7 @@ static unsigned long pdc2027x_mode_filter(struct ata_device *adev, unsigned long ATA_ID_PROD_LEN + 1); /* If the master is a maxtor in UDMA6 then the slave should not use UDMA 6 */ if (strstr(model_num, "Maxtor") == NULL && pair->dma_mode == XFER_UDMA_6) - mask &= ~ (1 << (6 + ATA_SHIFT_UDMA)); + mask &= ~(1 << (6 + ATA_SHIFT_UDMA)); return mask; } @@ -520,7 +520,7 @@ static void pdc_adjust_pll(struct ata_host *host, long pll_clock, unsigned int b void __iomem *mmio_base = host->iomap[PDC_MMIO_BAR]; u16 pll_ctl; long pll_clock_khz = pll_clock / 1000; - long pout_required = board_idx? PDC_133_MHZ:PDC_100_MHZ; + long pout_required = board_idx ? PDC_133_MHZ:PDC_100_MHZ; long ratio = pout_required / pll_clock_khz; int F, R; @@ -707,8 +707,8 @@ static int pdc2027x_init_one(struct pci_dev *pdev, static const unsigned long cmd_offset[] = { 0x17c0, 0x15c0 }; static const unsigned long bmdma_offset[] = { 0x1000, 0x1008 }; unsigned int board_idx = (unsigned int) ent->driver_data; - const struct ata_port_info *ppi[] = - { &pdc2027x_port_info[board_idx], NULL }; + const struct ata_port_info *ppi[] = { + &pdc2027x_port_info[board_idx], NULL }; struct ata_host *host; void __iomem *mmio_base; int i, rc; @@ -753,8 +753,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 +777,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 1584969264245000217@xxx Fri Nov 24 17:27:59 +0000 2017 X-GM-THRID: 1584938427628292570 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread