lkml.org 
[lkml]   [2014]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] hwmon, k10temp: Add support for AMD F15h M60h processor
On Mon, Jul 14, 2014 at 10:21:51PM +0200, Clemens Ladisch wrote:
> Borislav Petkov wrote:
> > On Mon, Jul 14, 2014 at 03:23:08PM -0500, Aravind Gopalakrishnan wrote:
> >> + if (boot_cpu_data.x86 == 0x15 && boot_cpu_data.x86_model == 0x60) {
> >> + pci_bus_write_config_dword(pdev->bus, PCI_DEVFN(0, 0),
> >> + NB_SMU_IND_ADDR, IND_ADDR_OFFSET);
> >> + pci_bus_read_config_dword(pdev->bus, PCI_DEVFN(0, 0),
> >> + NB_SMU_IND_DATA, &regval);
>
> How do you prevent races with any other code that accesses some indirect
> register?
>
I just wanted to ask exactly the same question. I think this will need
locking.

> >> +
> >> + } else
> >> + pci_read_config_dword(pdev, REG_REPORTED_TEMPERATURE, &regval);
>
> Why the empty line? Also, use braces in both branches.
>
Agreed. Too bad the respective checkpatch warning was moved to --strict.

Guenter


\
 
 \ /
  Last update: 2014-07-14 23:21    [W:0.068 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site