Re: [PATCH] EDAC, ie31200: Add Intel Coffee Lake CPU support

From: Borislav Petkov
Date: Mon Jun 10 2019 - 14:59:17 EST


On Mon, Jun 10, 2019 at 08:37:01PM +0200, Marco Elver wrote:
> Yes. Originally I had a version that added the new entries in the same
> style as before, but failed check_patch.pl due to exceeding 80 chars.

Don't trust checkpatch blindly, especially about this rule. It is
perfectly fine to leave a block of code like that stick out and even
make it more tight since it is very visible which column differs if you
keep the macro arguments aligned vertically:

static const struct pci_device_id ie31200_pci_tbl[] = {
{ PCI_VEND_DEV(INTEL, IE31200_HB_1), PCI_ANY_ID, PCI_ANY_ID, 0, 0, IE31200 },
{ PCI_VEND_DEV(INTEL, IE31200_HB_2), PCI_ANY_ID, PCI_ANY_ID, 0, 0, IE31200 },
{ PCI_VEND_DEV(INTEL, IE31200_HB_3), PCI_ANY_ID, PCI_ANY_ID, 0, 0, IE31200 },
{ PCI_VEND_DEV(INTEL, IE31200_HB_4), PCI_ANY_ID, PCI_ANY_ID, 0, 0, IE31200 },
...

your new additions would then need to do:

...
{ PCI_VEND_DEV(INTEL, IE31200_HB_4), PCI_ANY_ID, PCI_ANY_ID, 0, 0, IE31200 },
{ PCI_VEND_DEV(INTEL, IE31200_HB_CFL_1), PCI_ANY_ID, PCI_ANY_ID, 0, 0, IE31200 },
...

to keep that vertical alignment.

> I'll send v2 that reverts the formatting, but has to break line after
> the 2nd PCI_ANY_ID for the new entries. I'd prefer not to introduce
> another macro.

Yes, but as Tony said, keep formatting changes separate from the patch
adding the Coffee Lake support.

Thx.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.