Re: [PATCH] Add qword read/write support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

>  #elif defined(PCI_HAVE_STDINT_H) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
>  #include <stdint.h>
>  typedef uint8_t u8;
>  typedef uint16_t u16;
>  typedef uint32_t u32;
> +typedef uint64_t u64;
>  #else
>  typedef u_int8_t u8;
>  typedef u_int16_t u16;
>  typedef u_int32_t u32;
> +typedef u_int64_t u64;
>  #endif
>  
>  #ifdef PCI_HAVE_64BIT_ADDRESS
>  #include <limits.h>
>  #if ULONG_MAX > 0xffffffff
> -typedef unsigned long u64;
>  #define PCI_U64_FMT "l"
>  #else
> -typedef unsigned long long u64;
>  #define PCI_U64_FMT "ll"
>  #endif
>  #endif

This is unfortunately wrong -- you cannot use the "ll" modifier on uint64_t.

> +  const char * const formats[] = { NULL, " %02x", " %04x", NULL, " %08x", NULL, NULL, NULL, " %016llx"};
> +  const char * const mask_formats[] = { NULL, " %02x->(%02x:%02x)->%02x", " %04x->(%04x:%04x)->%04x", NULL, " %08x->(%08x:%08x)->%08x", NULL, NULL, NULL, " %016llx->(%016llx:%016llx)->%016llx"};

The same here.

				Have a nice fortnight
-- 
Martin `MJ' Mares                          <mj@xxxxxx>   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
Mr. Worf, scan that ship."  "Aye, Captain... 600 DPI?
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux