From 70a1dda927951e3d3a163ee899f25420f78b56c1 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 9 Mar 2017 01:58:24 +0100 Subject: nb/intel/x4x: Fix issues found by checkpatch.pl Change-Id: Ie22b8bd5420f8c33df1866410af42ef41ad38362 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/18694 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/northbridge/intel/x4x/gma.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/northbridge/intel/x4x/gma.c') diff --git a/src/northbridge/intel/x4x/gma.c b/src/northbridge/intel/x4x/gma.c index 74250fea4d..f4b2b2efca 100644 --- a/src/northbridge/intel/x4x/gma.c +++ b/src/northbridge/intel/x4x/gma.c @@ -365,10 +365,10 @@ static void gma_func0_init(struct device *dev) pci_write_config32(dev, PCI_COMMAND, reg32); /* configure GMBUSFREQ */ - reg16 = pci_read_config16(dev_find_slot(0, PCI_DEVFN(0x2,0)), 0xcc); + reg16 = pci_read_config16(dev_find_slot(0, PCI_DEVFN(0x2, 0)), 0xcc); reg16 &= ~0x1ff; reg16 |= 0xbc; - pci_write_config16(dev_find_slot(0, PCI_DEVFN(0x2,0)), 0xcc, reg16); + pci_write_config16(dev_find_slot(0, PCI_DEVFN(0x2, 0)), 0xcc, reg16); if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT)) native_init(dev); @@ -376,7 +376,8 @@ static void gma_func0_init(struct device *dev) pci_dev_init(dev); } -static void gma_set_subsystem(device_t dev, unsigned vendor, unsigned device) +static void gma_set_subsystem(device_t dev, unsigned int vendor, + unsigned int device) { if (!vendor || !device) { pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID, @@ -391,10 +392,9 @@ static void gma_set_subsystem(device_t dev, unsigned vendor, unsigned device) const struct i915_gpu_controller_info * intel_gma_get_controller_info(void) { - device_t dev = dev_find_slot(0, PCI_DEVFN(0x2,0)); - if (!dev) { + device_t dev = dev_find_slot(0, PCI_DEVFN(0x2, 0)); + if (!dev) return NULL; - } struct northbridge_intel_x4x_config *chip = dev->chip_info; return &chip->gfx; } @@ -402,9 +402,8 @@ intel_gma_get_controller_info(void) static void gma_ssdt(device_t device) { const struct i915_gpu_controller_info *gfx = intel_gma_get_controller_info(); - if (!gfx) { + if (!gfx) return; - } drivers_intel_gma_displays_ssdt_generate(gfx); } @@ -422,8 +421,7 @@ static struct device_operations gma_func0_ops = { .ops_pci = &gma_pci_ops, }; -static const unsigned short pci_device_ids[] = -{ +static const unsigned short pci_device_ids[] = { 0x2e02, /* Eaglelake */ 0x2e12, /* Q43/Q45 */ 0x2e22, /* G43/G45 */ -- cgit v1.2.3