mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 09:56:22 +00:00
lib: fixup new compiler warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
bd811d2d39
commit
1be3fd7eee
@ -83,7 +83,7 @@ intel_get_mmio(struct pci_device *pci_dev)
|
|||||||
{
|
{
|
||||||
uint32_t devid;
|
uint32_t devid;
|
||||||
int mmio_bar;
|
int mmio_bar;
|
||||||
int err;
|
int error;
|
||||||
|
|
||||||
devid = pci_dev->device_id;
|
devid = pci_dev->device_id;
|
||||||
if (IS_GEN2(devid))
|
if (IS_GEN2(devid))
|
||||||
@ -91,15 +91,15 @@ intel_get_mmio(struct pci_device *pci_dev)
|
|||||||
else
|
else
|
||||||
mmio_bar = 0;
|
mmio_bar = 0;
|
||||||
|
|
||||||
err = pci_device_map_range (pci_dev,
|
error = pci_device_map_range (pci_dev,
|
||||||
pci_dev->regions[mmio_bar].base_addr,
|
pci_dev->regions[mmio_bar].base_addr,
|
||||||
pci_dev->regions[mmio_bar].size,
|
pci_dev->regions[mmio_bar].size,
|
||||||
PCI_DEV_MAP_FLAG_WRITABLE,
|
PCI_DEV_MAP_FLAG_WRITABLE,
|
||||||
&mmio);
|
&mmio);
|
||||||
|
|
||||||
if (err != 0) {
|
if (error != 0) {
|
||||||
fprintf(stderr, "Couldn't map MMIO region: %s\n",
|
fprintf(stderr, "Couldn't map MMIO region: %s\n",
|
||||||
strerror(err));
|
strerror(error));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -109,7 +109,7 @@ intel_get_mmio(struct pci_device *pci_dev)
|
|||||||
* updated with the correct path.
|
* updated with the correct path.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
find_debugfs_path(char *dri_base)
|
find_debugfs_path(const char *dri_base)
|
||||||
{
|
{
|
||||||
char buf[FILENAME_MAX];
|
char buf[FILENAME_MAX];
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
@ -45,12 +45,12 @@ struct pci_device *
|
|||||||
intel_get_pci_device(void)
|
intel_get_pci_device(void)
|
||||||
{
|
{
|
||||||
struct pci_device *pci_dev;
|
struct pci_device *pci_dev;
|
||||||
int err;
|
int error;
|
||||||
|
|
||||||
err = pci_system_init();
|
error = pci_system_init();
|
||||||
if (err != 0) {
|
if (error != 0) {
|
||||||
fprintf(stderr, "Couldn't initialize PCI system: %s\n",
|
fprintf(stderr, "Couldn't initialize PCI system: %s\n",
|
||||||
strerror(err));
|
strerror(error));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,10 +59,10 @@ intel_get_pci_device(void)
|
|||||||
if (pci_dev == NULL)
|
if (pci_dev == NULL)
|
||||||
errx(1, "Couldn't find graphics card");
|
errx(1, "Couldn't find graphics card");
|
||||||
|
|
||||||
err = pci_device_probe(pci_dev);
|
error = pci_device_probe(pci_dev);
|
||||||
if (err != 0) {
|
if (error != 0) {
|
||||||
fprintf(stderr, "Couldn't probe graphics card: %s\n",
|
fprintf(stderr, "Couldn't probe graphics card: %s\n",
|
||||||
strerror(err));
|
strerror(error));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user