Skip to content

Commit 6a92a4e

Browse files
author
Dave Jones
committed
[AGPGART] Lots of CodingStyle/whitespace cleanups.
Eliminate trailing whitespace. s/if(/if (/ s/for(/for (/ Signed-off-by: Dave Jones <davej@redhat.com>
1 parent a8b76b4 commit 6a92a4e

19 files changed

Lines changed: 98 additions & 105 deletions

‎drivers/char/agp/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ config AGP_SWORKS
9898
tristate "Serverworks LE/HE chipset support"
9999
depends on AGP && X86_32
100100
help
101-
Say Y here to support the Serverworks AGP card. See
101+
Say Y here to support the Serverworks AGP card. See
102102
<http://www.serverworks.com/> for product descriptions and images.
103103

104104
config AGP_VIA

‎drivers/char/agp/agp.h‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2020
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2121
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22-
* JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
23-
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24-
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
22+
* JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
23+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
2525
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2626
*
2727
*/
@@ -53,7 +53,7 @@ enum aper_size_type {
5353
struct gatt_mask {
5454
unsigned long mask;
5555
u32 type;
56-
/* totally device specific, for integrated chipsets that
56+
/* totally device specific, for integrated chipsets that
5757
* might have different types of memory masks. For other
5858
* devices this will probably be ignored */
5959
};
@@ -104,8 +104,7 @@ struct agp_bridge_driver {
104104
void (*agp_enable)(struct agp_bridge_data *, u32);
105105
void (*cleanup)(void);
106106
void (*tlb_flush)(struct agp_memory *);
107-
unsigned long (*mask_memory)(struct agp_bridge_data *,
108-
unsigned long, int);
107+
unsigned long (*mask_memory)(struct agp_bridge_data *, unsigned long, int);
109108
void (*cache_flush)(void);
110109
int (*create_gatt_table)(struct agp_bridge_data *);
111110
int (*free_gatt_table)(struct agp_bridge_data *);

‎drivers/char/agp/ali-agp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static void *m1541_alloc_page(struct agp_bridge_data *bridge)
147147

148148
if (!addr)
149149
return NULL;
150-
150+
151151
pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp);
152152
pci_write_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL,
153153
(((temp & ALI_CACHE_FLUSH_ADDR_MASK) |

‎drivers/char/agp/alpha-agp.c‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ static struct page *alpha_core_agp_vm_nopage(struct vm_area_struct *vma,
2323
dma_addr = address - vma->vm_start + agp->aperture.bus_base;
2424
pa = agp->ops->translate(agp, dma_addr);
2525

26-
if (pa == (unsigned long)-EINVAL) return NULL; /* no translation */
27-
26+
if (pa == (unsigned long)-EINVAL)
27+
return NULL; /* no translation */
28+
2829
/*
2930
* Get the page, inc the use count, and return it
3031
*/
@@ -89,7 +90,7 @@ static void alpha_core_agp_enable(struct agp_bridge_data *bridge, u32 mode)
8990
agp_device_command(agp->mode.lw, 0);
9091
}
9192

92-
static int alpha_core_agp_insert_memory(struct agp_memory *mem, off_t pg_start,
93+
static int alpha_core_agp_insert_memory(struct agp_memory *mem, off_t pg_start,
9394
int type)
9495
{
9596
alpha_agp_info *agp = agp_bridge->dev_private_data;
@@ -98,7 +99,8 @@ static int alpha_core_agp_insert_memory(struct agp_memory *mem, off_t pg_start,
9899

99100
temp = agp_bridge->current_size;
100101
num_entries = A_SIZE_FIX(temp)->num_entries;
101-
if ((pg_start + mem->page_count) > num_entries) return -EINVAL;
102+
if ((pg_start + mem->page_count) > num_entries)
103+
return -EINVAL;
102104

103105
status = agp->ops->bind(agp, pg_start, mem);
104106
mb();
@@ -107,7 +109,7 @@ static int alpha_core_agp_insert_memory(struct agp_memory *mem, off_t pg_start,
107109
return status;
108110
}
109111

110-
static int alpha_core_agp_remove_memory(struct agp_memory *mem, off_t pg_start,
112+
static int alpha_core_agp_remove_memory(struct agp_memory *mem, off_t pg_start,
111113
int type)
112114
{
113115
alpha_agp_info *agp = agp_bridge->dev_private_data;
@@ -125,7 +127,7 @@ struct agp_bridge_driver alpha_core_agp_driver = {
125127
.size_type = FIXED_APER_SIZE,
126128
.cant_use_aperture = 1,
127129
.masks = NULL,
128-
130+
129131
.fetch_size = alpha_core_agp_fetch_size,
130132
.configure = alpha_core_agp_configure,
131133
.agp_enable = alpha_core_agp_enable,

‎drivers/char/agp/amd64-agp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static struct aper_size_info_32 amd_8151_sizes[7] =
216216
{256, 65536, 6, 0x00000700 }, /* 1 1 1 0 0 0 */
217217
{128, 32768, 5, 0x00000720 }, /* 1 1 1 1 0 0 */
218218
{64, 16384, 4, 0x00000730 }, /* 1 1 1 1 1 0 */
219-
{32, 8192, 3, 0x00000738 } /* 1 1 1 1 1 1 */
219+
{32, 8192, 3, 0x00000738 } /* 1 1 1 1 1 1 */
220220
};
221221

222222
static int amd_8151_configure(void)

‎drivers/char/agp/ati-agp.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static int ati_create_page_map(ati_page_map *page_map)
7474
/*CACHE_FLUSH();*/
7575
global_cache_flush();
7676

77-
for(i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) {
77+
for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) {
7878
writel(agp_bridge->scratch_page, page_map->remapped+i);
7979
readl(page_map->remapped+i); /* PCI Posting. */
8080
}
@@ -99,7 +99,7 @@ static void ati_free_gatt_pages(void)
9999
ati_page_map *entry;
100100

101101
tables = ati_generic_private.gatt_pages;
102-
for(i = 0; i < ati_generic_private.num_tables; i++) {
102+
for (i = 0; i < ati_generic_private.num_tables; i++) {
103103
entry = tables[i];
104104
if (entry != NULL) {
105105
if (entry->real != NULL)
@@ -387,7 +387,7 @@ static int ati_create_gatt_table(struct agp_bridge_data *bridge)
387387
agp_bridge->gart_bus_addr = addr;
388388

389389
/* Calculate the agp offset */
390-
for(i = 0; i < value->num_entries / 1024; i++, addr += 0x00400000) {
390+
for (i = 0; i < value->num_entries / 1024; i++, addr += 0x00400000) {
391391
writel(virt_to_gart(ati_generic_private.gatt_pages[i]->real) | 1,
392392
page_dir.remapped+GET_PAGE_DIR_OFF(addr));
393393
readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */

‎drivers/char/agp/backend.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge)
228228
struct agp_bridge_data *agp_alloc_bridge(void)
229229
{
230230
struct agp_bridge_data *bridge;
231-
231+
232232
bridge = kzalloc(sizeof(*bridge), GFP_KERNEL);
233233
if (!bridge)
234234
return NULL;

‎drivers/char/agp/efficeon-agp.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Transmeta's Efficeon AGPGART driver.
3-
*
3+
*
44
* Based upon a diff by Linus around November '02.
55
*
66
* Ported to the 2.6 kernel by Carlos Puchol <cpglinux@puchol.com>
@@ -9,7 +9,7 @@
99

1010
/*
1111
* NOTE-cpg-040217:
12-
*
12+
*
1313
* - when compiled as a module, after loading the module,
1414
* it will refuse to unload, indicating it is in use,
1515
* when it is not.
@@ -45,7 +45,7 @@
4545
* 8: Present
4646
* 7:6: reserved, write as zero
4747
* 5:0: GATT directory index: which 1st-level entry
48-
*
48+
*
4949
* The Efficeon AGP spec requires pages to be WB-cacheable
5050
* but to be explicitly CLFLUSH'd after any changes.
5151
*/
@@ -125,7 +125,7 @@ static int efficeon_configure(void)
125125
struct aper_size_info_lvl2 *current_size;
126126

127127
printk(KERN_DEBUG PFX "efficeon_configure()\n");
128-
128+
129129
current_size = A_SIZE_LVL2(agp_bridge->current_size);
130130

131131
/* aperture size */
@@ -190,7 +190,7 @@ static int efficeon_create_gatt_table(struct agp_bridge_data *bridge)
190190
const int present = EFFICEON_PRESENT;
191191
const int clflush_chunk = ((cpuid_ebx(1) >> 8) & 0xff) << 3;
192192
int num_entries, l1_pages;
193-
193+
194194
num_entries = A_SIZE_LVL2(agp_bridge->current_size)->num_entries;
195195

196196
printk(KERN_DEBUG PFX "efficeon_create_gatt_table(%d)\n", num_entries);
@@ -257,12 +257,12 @@ static int efficeon_insert_memory(struct agp_memory * mem, off_t pg_start, int t
257257

258258
if (!page)
259259
continue;
260-
260+
261261
page += (index & 0x3ff);
262262
*page = insert;
263263

264264
/* clflush is slow, so don't clflush until we have to */
265-
if ( last_page &&
265+
if ( last_page &&
266266
((unsigned long)page^(unsigned long)last_page) & clflush_mask )
267267
asm volatile("clflush %0" : : "m" (*last_page));
268268

@@ -373,7 +373,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
373373
*/
374374
r = &pdev->resource[0];
375375
if (!r->start && r->end) {
376-
if(pci_assign_resource(pdev, 0)) {
376+
if (pci_assign_resource(pdev, 0)) {
377377
printk(KERN_ERR PFX "could not assign resource 0\n");
378378
return -ENODEV;
379379
}

‎drivers/char/agp/frontend.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ static int agpioc_acquire_wrap(struct agp_file_private *priv)
781781
if (agp_fe.current_controller != NULL)
782782
return -EBUSY;
783783

784-
if(!agp_bridge)
784+
if (!agp_bridge)
785785
return -ENODEV;
786786

787787
if (atomic_read(&agp_bridge->agp_in_use))

‎drivers/char/agp/generic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ EXPORT_SYMBOL_GPL(agp_num_entries);
299299
/**
300300
* agp_copy_info - copy bridge state information
301301
*
302-
* @info: agp_kern_info pointer. The caller should insure that this pointer is valid.
302+
* @info: agp_kern_info pointer. The caller should insure that this pointer is valid.
303303
*
304304
* This function copies information about the agp bridge device and the state of
305305
* the agp backend into an agp_kern_info pointer.

0 commit comments

Comments
 (0)