lkml.org 
[lkml]   [2014]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2] perf/x86/uncore: fix compilation warning in snb_uncore_imc_init_box()
    On Wed, Mar 12, 2014 at 12:53:30AM +0100, Stephane Eranian wrote:
    > #ifdef CONFIG_PHYS_ADDR_T_64BIT
    > - pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET+4, &addr_hi);
    > - addr = ((resource_size_t)addr_hi << 32) | addr_lo;
    > + pci_read_config_dword(pdev, where + 4, &pci_dword);
    > + addr |= ((resource_size_t)pci_dword << 32);
    > #endif

    Indent fail there; fixed it.

    FWIW; I thought of an even more horrible solution:

    resource_size_t addr;
    u32 *addr_ptr = &addr;

    pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET, &addr_ptr[0]);
    #ifdef ..
    pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET+4, &addr_ptr[1]);
    #endif

    :-)


    \
     
     \ /
      Last update: 2014-03-12 08:41    [W:9.818 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site