From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750858AbdKYEiD (ORCPT ); Fri, 24 Nov 2017 23:38:03 -0500 Received: from smtprelay0061.hostedemail.com ([216.40.44.61]:52828 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750724AbdKYEiB (ORCPT ); Fri, 24 Nov 2017 23:38:01 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3871:3872:3874:4321:5007:10004:10400:10848:11026:11232:11473:11658:11914:12043:12296:12740:12760:12895:13069:13141:13230:13255:13311:13357:13439:14181:14659:14721:21080:21451:21627:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: head69_62edc78657316 X-Filterd-Recvd-Size: 2274 Message-ID: <1511584678.8230.16.camel@perches.com> Subject: Re: [PATCH] pata_pdc2027x: Remove unnecessary error check and coding style error. From: Joe Perches To: Arvind Yadav , b.zolnierkie@samsung.com, tj@kernel.org Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org Date: Fri, 24 Nov 2017 20:37:58 -0800 In-Reply-To: <9c2e4c1081be44da4460072ae6129d29c7e6d6bc.1511583254.git.arvind.yadav.cs@gmail.com> References: <9c2e4c1081be44da4460072ae6129d29c7e6d6bc.1511583254.git.arvind.yadav.cs@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2017-11-25 at 09:45 +0530, Arvind Yadav wrote: > 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 }; [] > diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c [] > @@ -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; If spaces are used around the ?, use spaces around the : too > @@ -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); If this is so, then please make the function return void