* [PATCH] pata_pdc2027x: Fix coding sytle error @ 2017-11-25 10:34 ` Arvind Yadav 2017-11-25 11:02 ` Joe Perches 2017-12-05 14:02 ` Bartlomiej Zolnierkiewicz 0 siblings, 2 replies; 5+ messages in thread From: Arvind Yadav @ 2017-11-25 10:34 UTC (permalink / raw) To: b.zolnierkie, tj, sergei.shtylyov; +Cc: linux-kernel, linux-ide Fix these checkpatch.pl error: ERROR: space prohibited before open square bracket '['. 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 <arvind.yadav.cs@gmail.com> --- changes in v1: These cheange was a part of '[PATCH] pata_pdc2027x: Remove unnecessary error check and coding style error' and got comment 'Please fix the checkpatch.pl errors in a sperate patch'. drivers/ata/pata_pdc2027x.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index 6348a83..d1e8b63 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c @@ -84,7 +84,7 @@ static int pdc2027x_set_mode(struct ata_link *link, struct ata_device **r_failed */ static struct pdc2027x_pio_timing { u8 value0, value1, value2; -} pdc2027x_pio_timing_tbl [] = { +} pdc2027x_pio_timing_tbl[] = { { 0xfb, 0x2b, 0xac }, /* PIO mode 0 */ { 0x46, 0x29, 0xa4 }, /* PIO mode 1 */ { 0x23, 0x26, 0x64 }, /* PIO mode 2 */ @@ -94,7 +94,7 @@ static struct pdc2027x_pio_timing { static struct pdc2027x_mdma_timing { u8 value0, value1; -} pdc2027x_mdma_timing_tbl [] = { +} pdc2027x_mdma_timing_tbl[] = { { 0xdf, 0x5f }, /* MDMA mode 0 */ { 0x6b, 0x27 }, /* MDMA mode 1 */ { 0x69, 0x25 }, /* MDMA mode 2 */ @@ -102,7 +102,7 @@ static struct pdc2027x_mdma_timing { static struct pdc2027x_udma_timing { u8 value0, value1, value2; -} pdc2027x_udma_timing_tbl [] = { +} pdc2027x_udma_timing_tbl[] = { { 0x4a, 0x0f, 0xd5 }, /* UDMA mode 0 */ { 0x3a, 0x0a, 0xd0 }, /* UDMA mode 1 */ { 0x2a, 0x07, 0xcd }, /* UDMA mode 2 */ @@ -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; @@ -705,8 +705,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; -- 2.7.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] pata_pdc2027x: Fix coding sytle error 2017-11-25 10:34 ` [PATCH] pata_pdc2027x: Fix coding sytle error Arvind Yadav @ 2017-11-25 11:02 ` Joe Perches 2017-11-25 11:10 ` arvindY 2017-12-05 14:02 ` Bartlomiej Zolnierkiewicz 1 sibling, 1 reply; 5+ messages in thread From: Joe Perches @ 2017-11-25 11:02 UTC (permalink / raw) To: Arvind Yadav, b.zolnierkie, tj, sergei.shtylyov; +Cc: linux-kernel, linux-ide On Sat, 2017-11-25 at 16:04 +0530, Arvind Yadav wrote: [] > diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c [] > @@ -84,7 +84,7 @@ static int pdc2027x_set_mode(struct ata_link *link, struct ata_device **r_failed > */ > static struct pdc2027x_pio_timing { > u8 value0, value1, value2; > -} pdc2027x_pio_timing_tbl [] = { > +} pdc2027x_pio_timing_tbl[] = { > { 0xfb, 0x2b, 0xac }, /* PIO mode 0 */ > { 0x46, 0x29, 0xa4 }, /* PIO mode 1 */ > { 0x23, 0x26, 0x64 }, /* PIO mode 2 */ trivia: It seems all the <foo>_timing_tbl structs should be const ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pata_pdc2027x: Fix coding sytle error 2017-11-25 11:02 ` Joe Perches @ 2017-11-25 11:10 ` arvindY 0 siblings, 0 replies; 5+ messages in thread From: arvindY @ 2017-11-25 11:10 UTC (permalink / raw) To: Joe Perches, b.zolnierkie, tj, sergei.shtylyov; +Cc: linux-kernel, linux-ide Hi Joe, On Saturday 25 November 2017 04:32 PM, Joe Perches wrote: > On Sat, 2017-11-25 at 16:04 +0530, Arvind Yadav wrote: > [] >> diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c > [] >> @@ -84,7 +84,7 @@ static int pdc2027x_set_mode(struct ata_link *link, struct ata_device **r_failed >> */ >> static struct pdc2027x_pio_timing { >> u8 value0, value1, value2; >> -} pdc2027x_pio_timing_tbl [] = { >> +} pdc2027x_pio_timing_tbl[] = { >> { 0xfb, 0x2b, 0xac }, /* PIO mode 0 */ >> { 0x46, 0x29, 0xa4 }, /* PIO mode 1 */ >> { 0x23, 0x26, 0x64 }, /* PIO mode 2 */ > trivia: > > It seems all the <foo>_timing_tbl structs should be const > Yes, It should be const. I will push anther patch. ~arvind ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pata_pdc2027x: Fix coding sytle error 2017-11-25 10:34 ` [PATCH] pata_pdc2027x: Fix coding sytle error Arvind Yadav 2017-11-25 11:02 ` Joe Perches @ 2017-12-05 14:02 ` Bartlomiej Zolnierkiewicz 2017-12-05 14:12 ` Bartlomiej Zolnierkiewicz 1 sibling, 1 reply; 5+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2017-12-05 14:02 UTC (permalink / raw) To: Arvind Yadav; +Cc: tj, sergei.shtylyov, linux-kernel, linux-ide On Saturday, November 25, 2017 04:04:07 PM Arvind Yadav wrote: > Fix these checkpatch.pl error: > ERROR: space prohibited before open square bracket '['. > > 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 <arvind.yadav.cs@gmail.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pata_pdc2027x: Fix coding sytle error 2017-12-05 14:02 ` Bartlomiej Zolnierkiewicz @ 2017-12-05 14:12 ` Bartlomiej Zolnierkiewicz 0 siblings, 0 replies; 5+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2017-12-05 14:12 UTC (permalink / raw) To: Arvind Yadav; +Cc: tj, sergei.shtylyov, linux-kernel, linux-ide On Tuesday, December 05, 2017 03:02:13 PM Bartlomiej Zolnierkiewicz wrote: > On Saturday, November 25, 2017 04:04:07 PM Arvind Yadav wrote: > > Fix these checkpatch.pl error: > > ERROR: space prohibited before open square bracket '['. > > > > 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 <arvind.yadav.cs@gmail.com> > > Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> PS two small things than still can be fixed: * s/sytle error/style errors/ in the patch summary * s/error/errors/ in the patch description Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-05 14:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20171125103419epcas5p1e02e8409d9cb34cd3c592ca4e14961eb@epcas5p1.samsung.com>
2017-11-25 10:34 ` [PATCH] pata_pdc2027x: Fix coding sytle error Arvind Yadav
2017-11-25 11:02 ` Joe Perches
2017-11-25 11:10 ` arvindY
2017-12-05 14:02 ` Bartlomiej Zolnierkiewicz
2017-12-05 14:12 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox