Skip to content

Commit daedd87

Browse files
committed
Merge branch 'stable/cleanups-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
* 'stable/cleanups-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen: use static initializers in xen-balloon.c Xen: fix braces and tabs coding style issue in xenbus_probe.c Xen: fix braces coding style issue in xenbus_probe.h Xen: fix whitespaces,tabs coding style issue in drivers/xen/pci.c Xen: fix braces coding style issue in gntdev.c and grant-table.c Xen: fix whitespaces,tabs coding style issue in drivers/xen/events.c Xen: fix whitespaces,tabs coding style issue in drivers/xen/balloon.c Fix up trivial whitespace-conflicts in drivers/xen/{balloon.c,pci.c,xenbus/xenbus_probe.c}
2 parents 6a6662c + 6b71c52 commit daedd87

8 files changed

Lines changed: 25 additions & 31 deletions

File tree

‎drivers/xen/balloon.c‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)];
9494
#define inc_totalhigh_pages() (totalhigh_pages++)
9595
#define dec_totalhigh_pages() (totalhigh_pages--)
9696
#else
97-
#define inc_totalhigh_pages() do {} while(0)
98-
#define dec_totalhigh_pages() do {} while(0)
97+
#define inc_totalhigh_pages() do {} while (0)
98+
#define dec_totalhigh_pages() do {} while (0)
9999
#endif
100100

101101
/* List of ballooned pages, threaded through the mem_map array. */
@@ -155,8 +155,7 @@ static struct page *balloon_retrieve(bool prefer_highmem)
155155
if (PageHighMem(page)) {
156156
balloon_stats.balloon_high--;
157157
inc_totalhigh_pages();
158-
}
159-
else
158+
} else
160159
balloon_stats.balloon_low--;
161160

162161
totalram_pages++;
@@ -423,7 +422,7 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
423422
(unsigned long)__va(pfn << PAGE_SHIFT),
424423
__pte_ma(0), 0);
425424
BUG_ON(ret);
426-
}
425+
}
427426

428427
}
429428

@@ -508,7 +507,7 @@ EXPORT_SYMBOL_GPL(balloon_set_new_target);
508507
int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem)
509508
{
510509
int pgno = 0;
511-
struct page* page;
510+
struct page *page;
512511
mutex_lock(&balloon_mutex);
513512
while (pgno < nr_pages) {
514513
page = balloon_retrieve(highmem);
@@ -541,7 +540,7 @@ EXPORT_SYMBOL(alloc_xenballooned_pages);
541540
* @nr_pages: Number of pages
542541
* @pages: pages to return
543542
*/
544-
void free_xenballooned_pages(int nr_pages, struct page** pages)
543+
void free_xenballooned_pages(int nr_pages, struct page **pages)
545544
{
546545
int i;
547546

‎drivers/xen/events.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ enum xen_irq_type {
8585
* IPI - IPI vector
8686
* EVTCHN -
8787
*/
88-
struct irq_info
89-
{
88+
struct irq_info {
9089
struct list_head list;
9190
enum xen_irq_type type; /* type */
9291
unsigned irq;
@@ -282,9 +281,9 @@ static inline unsigned long active_evtchns(unsigned int cpu,
282281
struct shared_info *sh,
283282
unsigned int idx)
284283
{
285-
return (sh->evtchn_pending[idx] &
284+
return sh->evtchn_pending[idx] &
286285
per_cpu(cpu_evtchn_mask, cpu)[idx] &
287-
~sh->evtchn_mask[idx]);
286+
~sh->evtchn_mask[idx];
288287
}
289288

290289
static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
@@ -1180,7 +1179,7 @@ static void __xen_evtchn_do_upcall(void)
11801179
int cpu = get_cpu();
11811180
struct shared_info *s = HYPERVISOR_shared_info;
11821181
struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
1183-
unsigned count;
1182+
unsigned count;
11841183

11851184
do {
11861185
unsigned long pending_words;

‎drivers/xen/gntdev.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,8 @@ static void gntdev_put_map(struct grant_map *map)
193193

194194
atomic_sub(map->count, &pages_mapped);
195195

196-
if (map->notify.flags & UNMAP_NOTIFY_SEND_EVENT) {
196+
if (map->notify.flags & UNMAP_NOTIFY_SEND_EVENT)
197197
notify_remote_via_evtchn(map->notify.event);
198-
}
199198

200199
if (map->pages) {
201200
if (!use_ptemod)

‎drivers/xen/grant-table.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ int gnttab_query_foreign_access(grant_ref_t ref)
193193

194194
nflags = shared[ref].flags;
195195

196-
return (nflags & (GTF_reading|GTF_writing));
196+
return nflags & (GTF_reading|GTF_writing);
197197
}
198198
EXPORT_SYMBOL_GPL(gnttab_query_foreign_access);
199199

‎drivers/xen/pci.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static int xen_add_device(struct device *dev)
116116
&manage_pci_ext);
117117
} else {
118118
struct physdev_manage_pci manage_pci = {
119-
.bus = pci_dev->bus->number,
119+
.bus = pci_dev->bus->number,
120120
.devfn = pci_dev->devfn,
121121
};
122122

‎drivers/xen/xen-balloon.c‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ static struct sys_device balloon_sysdev;
5050

5151
static int register_balloon(struct sys_device *sysdev);
5252

53-
static struct xenbus_watch target_watch =
54-
{
55-
.node = "memory/target"
56-
};
57-
5853
/* React to a change in the target key */
5954
static void watch_target(struct xenbus_watch *watch,
6055
const char **vec, unsigned int len)
@@ -73,6 +68,11 @@ static void watch_target(struct xenbus_watch *watch,
7368
*/
7469
balloon_set_new_target(new_target >> (PAGE_SHIFT - 10));
7570
}
71+
static struct xenbus_watch target_watch = {
72+
.node = "memory/target",
73+
.callback = watch_target,
74+
};
75+
7676

7777
static int balloon_init_watcher(struct notifier_block *notifier,
7878
unsigned long event,
@@ -87,7 +87,9 @@ static int balloon_init_watcher(struct notifier_block *notifier,
8787
return NOTIFY_DONE;
8888
}
8989

90-
static struct notifier_block xenstore_notifier;
90+
static struct notifier_block xenstore_notifier = {
91+
.notifier_call = balloon_init_watcher,
92+
};
9193

9294
static int __init balloon_init(void)
9395
{
@@ -100,9 +102,6 @@ static int __init balloon_init(void)
100102

101103
register_xen_selfballooning(&balloon_sysdev);
102104

103-
target_watch.callback = watch_target;
104-
xenstore_notifier.notifier_call = balloon_init_watcher;
105-
106105
register_xenstore_notifier(&xenstore_notifier);
107106

108107
return 0;

‎drivers/xen/xenbus/xenbus_probe.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,7 @@ void xenbus_unregister_driver(struct xenbus_driver *drv)
310310
}
311311
EXPORT_SYMBOL_GPL(xenbus_unregister_driver);
312312

313-
struct xb_find_info
314-
{
313+
struct xb_find_info {
315314
struct xenbus_device *dev;
316315
const char *nodename;
317316
};
@@ -640,7 +639,7 @@ int xenbus_dev_cancel(struct device *dev)
640639
EXPORT_SYMBOL_GPL(xenbus_dev_cancel);
641640

642641
/* A flag to determine if xenstored is 'ready' (i.e. has started) */
643-
int xenstored_ready = 0;
642+
int xenstored_ready;
644643

645644

646645
int register_xenstore_notifier(struct notifier_block *nb)
@@ -771,7 +770,7 @@ static int __init xenbus_init(void)
771770
proc_mkdir("xen", NULL);
772771
#endif
773772

774-
out_error:
773+
out_error:
775774
return err;
776775
}
777776

‎drivers/xen/xenbus/xenbus_probe.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636

3737
#define XEN_BUS_ID_SIZE 20
3838

39-
struct xen_bus_type
40-
{
39+
struct xen_bus_type {
4140
char *root;
4241
unsigned int levels;
4342
int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename);

0 commit comments

Comments
 (0)