Commit daedd870 authored by Linus Torvalds's avatar Linus Torvalds

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}
parents 6a6662ce 6b71c52e
...@@ -94,8 +94,8 @@ static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)]; ...@@ -94,8 +94,8 @@ static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)];
#define inc_totalhigh_pages() (totalhigh_pages++) #define inc_totalhigh_pages() (totalhigh_pages++)
#define dec_totalhigh_pages() (totalhigh_pages--) #define dec_totalhigh_pages() (totalhigh_pages--)
#else #else
#define inc_totalhigh_pages() do {} while(0) #define inc_totalhigh_pages() do {} while (0)
#define dec_totalhigh_pages() do {} while(0) #define dec_totalhigh_pages() do {} while (0)
#endif #endif
/* List of ballooned pages, threaded through the mem_map array. */ /* List of ballooned pages, threaded through the mem_map array. */
...@@ -155,8 +155,7 @@ static struct page *balloon_retrieve(bool prefer_highmem) ...@@ -155,8 +155,7 @@ static struct page *balloon_retrieve(bool prefer_highmem)
if (PageHighMem(page)) { if (PageHighMem(page)) {
balloon_stats.balloon_high--; balloon_stats.balloon_high--;
inc_totalhigh_pages(); inc_totalhigh_pages();
} } else
else
balloon_stats.balloon_low--; balloon_stats.balloon_low--;
totalram_pages++; totalram_pages++;
...@@ -423,7 +422,7 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) ...@@ -423,7 +422,7 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
(unsigned long)__va(pfn << PAGE_SHIFT), (unsigned long)__va(pfn << PAGE_SHIFT),
__pte_ma(0), 0); __pte_ma(0), 0);
BUG_ON(ret); BUG_ON(ret);
} }
} }
...@@ -508,7 +507,7 @@ EXPORT_SYMBOL_GPL(balloon_set_new_target); ...@@ -508,7 +507,7 @@ EXPORT_SYMBOL_GPL(balloon_set_new_target);
int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem) int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem)
{ {
int pgno = 0; int pgno = 0;
struct page* page; struct page *page;
mutex_lock(&balloon_mutex); mutex_lock(&balloon_mutex);
while (pgno < nr_pages) { while (pgno < nr_pages) {
page = balloon_retrieve(highmem); page = balloon_retrieve(highmem);
...@@ -541,7 +540,7 @@ EXPORT_SYMBOL(alloc_xenballooned_pages); ...@@ -541,7 +540,7 @@ EXPORT_SYMBOL(alloc_xenballooned_pages);
* @nr_pages: Number of pages * @nr_pages: Number of pages
* @pages: pages to return * @pages: pages to return
*/ */
void free_xenballooned_pages(int nr_pages, struct page** pages) void free_xenballooned_pages(int nr_pages, struct page **pages)
{ {
int i; int i;
......
...@@ -85,8 +85,7 @@ enum xen_irq_type { ...@@ -85,8 +85,7 @@ enum xen_irq_type {
* IPI - IPI vector * IPI - IPI vector
* EVTCHN - * EVTCHN -
*/ */
struct irq_info struct irq_info {
{
struct list_head list; struct list_head list;
enum xen_irq_type type; /* type */ enum xen_irq_type type; /* type */
unsigned irq; unsigned irq;
...@@ -282,9 +281,9 @@ static inline unsigned long active_evtchns(unsigned int cpu, ...@@ -282,9 +281,9 @@ static inline unsigned long active_evtchns(unsigned int cpu,
struct shared_info *sh, struct shared_info *sh,
unsigned int idx) unsigned int idx)
{ {
return (sh->evtchn_pending[idx] & return sh->evtchn_pending[idx] &
per_cpu(cpu_evtchn_mask, cpu)[idx] & per_cpu(cpu_evtchn_mask, cpu)[idx] &
~sh->evtchn_mask[idx]); ~sh->evtchn_mask[idx];
} }
static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
...@@ -1180,7 +1179,7 @@ static void __xen_evtchn_do_upcall(void) ...@@ -1180,7 +1179,7 @@ static void __xen_evtchn_do_upcall(void)
int cpu = get_cpu(); int cpu = get_cpu();
struct shared_info *s = HYPERVISOR_shared_info; struct shared_info *s = HYPERVISOR_shared_info;
struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu); struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
unsigned count; unsigned count;
do { do {
unsigned long pending_words; unsigned long pending_words;
......
...@@ -193,9 +193,8 @@ static void gntdev_put_map(struct grant_map *map) ...@@ -193,9 +193,8 @@ static void gntdev_put_map(struct grant_map *map)
atomic_sub(map->count, &pages_mapped); atomic_sub(map->count, &pages_mapped);
if (map->notify.flags & UNMAP_NOTIFY_SEND_EVENT) { if (map->notify.flags & UNMAP_NOTIFY_SEND_EVENT)
notify_remote_via_evtchn(map->notify.event); notify_remote_via_evtchn(map->notify.event);
}
if (map->pages) { if (map->pages) {
if (!use_ptemod) if (!use_ptemod)
......
...@@ -193,7 +193,7 @@ int gnttab_query_foreign_access(grant_ref_t ref) ...@@ -193,7 +193,7 @@ int gnttab_query_foreign_access(grant_ref_t ref)
nflags = shared[ref].flags; nflags = shared[ref].flags;
return (nflags & (GTF_reading|GTF_writing)); return nflags & (GTF_reading|GTF_writing);
} }
EXPORT_SYMBOL_GPL(gnttab_query_foreign_access); EXPORT_SYMBOL_GPL(gnttab_query_foreign_access);
......
...@@ -116,7 +116,7 @@ static int xen_add_device(struct device *dev) ...@@ -116,7 +116,7 @@ static int xen_add_device(struct device *dev)
&manage_pci_ext); &manage_pci_ext);
} else { } else {
struct physdev_manage_pci manage_pci = { struct physdev_manage_pci manage_pci = {
.bus = pci_dev->bus->number, .bus = pci_dev->bus->number,
.devfn = pci_dev->devfn, .devfn = pci_dev->devfn,
}; };
......
...@@ -50,11 +50,6 @@ static struct sys_device balloon_sysdev; ...@@ -50,11 +50,6 @@ static struct sys_device balloon_sysdev;
static int register_balloon(struct sys_device *sysdev); static int register_balloon(struct sys_device *sysdev);
static struct xenbus_watch target_watch =
{
.node = "memory/target"
};
/* React to a change in the target key */ /* React to a change in the target key */
static void watch_target(struct xenbus_watch *watch, static void watch_target(struct xenbus_watch *watch,
const char **vec, unsigned int len) const char **vec, unsigned int len)
...@@ -73,6 +68,11 @@ static void watch_target(struct xenbus_watch *watch, ...@@ -73,6 +68,11 @@ static void watch_target(struct xenbus_watch *watch,
*/ */
balloon_set_new_target(new_target >> (PAGE_SHIFT - 10)); balloon_set_new_target(new_target >> (PAGE_SHIFT - 10));
} }
static struct xenbus_watch target_watch = {
.node = "memory/target",
.callback = watch_target,
};
static int balloon_init_watcher(struct notifier_block *notifier, static int balloon_init_watcher(struct notifier_block *notifier,
unsigned long event, unsigned long event,
...@@ -87,7 +87,9 @@ static int balloon_init_watcher(struct notifier_block *notifier, ...@@ -87,7 +87,9 @@ static int balloon_init_watcher(struct notifier_block *notifier,
return NOTIFY_DONE; return NOTIFY_DONE;
} }
static struct notifier_block xenstore_notifier; static struct notifier_block xenstore_notifier = {
.notifier_call = balloon_init_watcher,
};
static int __init balloon_init(void) static int __init balloon_init(void)
{ {
...@@ -100,9 +102,6 @@ static int __init balloon_init(void) ...@@ -100,9 +102,6 @@ static int __init balloon_init(void)
register_xen_selfballooning(&balloon_sysdev); register_xen_selfballooning(&balloon_sysdev);
target_watch.callback = watch_target;
xenstore_notifier.notifier_call = balloon_init_watcher;
register_xenstore_notifier(&xenstore_notifier); register_xenstore_notifier(&xenstore_notifier);
return 0; return 0;
......
...@@ -310,8 +310,7 @@ void xenbus_unregister_driver(struct xenbus_driver *drv) ...@@ -310,8 +310,7 @@ void xenbus_unregister_driver(struct xenbus_driver *drv)
} }
EXPORT_SYMBOL_GPL(xenbus_unregister_driver); EXPORT_SYMBOL_GPL(xenbus_unregister_driver);
struct xb_find_info struct xb_find_info {
{
struct xenbus_device *dev; struct xenbus_device *dev;
const char *nodename; const char *nodename;
}; };
...@@ -640,7 +639,7 @@ int xenbus_dev_cancel(struct device *dev) ...@@ -640,7 +639,7 @@ int xenbus_dev_cancel(struct device *dev)
EXPORT_SYMBOL_GPL(xenbus_dev_cancel); EXPORT_SYMBOL_GPL(xenbus_dev_cancel);
/* A flag to determine if xenstored is 'ready' (i.e. has started) */ /* A flag to determine if xenstored is 'ready' (i.e. has started) */
int xenstored_ready = 0; int xenstored_ready;
int register_xenstore_notifier(struct notifier_block *nb) int register_xenstore_notifier(struct notifier_block *nb)
...@@ -771,7 +770,7 @@ static int __init xenbus_init(void) ...@@ -771,7 +770,7 @@ static int __init xenbus_init(void)
proc_mkdir("xen", NULL); proc_mkdir("xen", NULL);
#endif #endif
out_error: out_error:
return err; return err;
} }
......
...@@ -36,8 +36,7 @@ ...@@ -36,8 +36,7 @@
#define XEN_BUS_ID_SIZE 20 #define XEN_BUS_ID_SIZE 20
struct xen_bus_type struct xen_bus_type {
{
char *root; char *root;
unsigned int levels; unsigned int levels;
int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename); int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment