Re: [PATCH] amd64_edac - Add Family 17h Model 70h PCI IDs

Borislav Petkov
2019-09-05T07:09:28Z

On Thu, Sep 05, 2019 at 01:21:40AM +0000, Isaac Vaughn wrote:
> Add the new Family 17h Model 70h PCI IDs (device 18h functions 0, 3, 4, and 6) to the kernel, the hwmon module, and the AMD64 EDAC module.
>
> Signed-off-by: Isaac Vaughn <isaac.vaughn@knights.ucf.edu>
> ---
> Changes to the amd64_edac were tested on 5.2.11 and the current patch was tested on 5.3.0rc7. Since git's pager has been mangling my indentation, diffs were generated with the '--no-pager' option. (Not sure if this might make output non-standard in some other way.)
>

That's probably because this is not how you generate patches with git.
Please have a look at one of the countless tutorials on the web how to
do that. The gist of it is, you do:

$ git commit -a -s
<write commit message, add SOB etc>
$ git format-patch -1 -o /tmp/

and send the filename as an email or you use

$ git send-email -1 ...

depending on what you would like to do. Just note that git send-email
can spam people quickly so I'd suggest using the --dry-run option there
first. :)

The tutorials and the manpages of the respective commands will give you
more detail about what they all do and what options to use.

But before you do that, you need to fix your indentation because that
still is wrong. Use that script checkpatch.pl to verify your patch and
send it only then when it doesn't complain about spaces anymore, see
below.

Oh, and pls add those PCI IDs to drivers/edac/amd64_edac.h, not to
pci_ids.h because they will be used by the amd64_edac driver only for
now so they don't need to go into the system-wide header.

Thanks!

$ ./scripts/checkpatch.pl /tmp/isaac.vaughn.02
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#14:
Add the new Family 17h Model 70h PCI IDs (device 18h functions 0, 3, 4, and 6) to the kernel, the hwmon module, and the AMD64 EDAC module.

WARNING: please, no spaces at the start of a line
#47: FILE: arch/x86/kernel/amd_nb.c:36:
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_ROOT) },$

WARNING: please, no spaces at the start of a line
#55: FILE: arch/x86/kernel/amd_nb.c:55:
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) },$

WARNING: please, no spaces at the start of a line
#63: FILE: arch/x86/kernel/amd_nb.c:70:
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F4) },$

WARNING: please, no spaces at the start of a line
#75: FILE: drivers/edac/amd64_edac.c:2256:
+ [F17_M70H_CPUS] = {$
...

--
Regards/Gruss,
Boris.