[PATCH 1/2] hyperv: make mmio resource local
From: Stephen Hemminger This fixes a sparse warning because hyperv_mmio resources are only used in this one file and should be static. Signed-off-by: Stephen Hemminger --- drivers/hv/vmbus_drv.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index e82f7e1..954d16a 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -105,8 +105,8 @@ static struct notifier_block hyperv_panic_block = { static const char *fb_mmio_name = "fb_range"; static struct resource *fb_mmio; -struct resource *hyperv_mmio; -DEFINE_SEMAPHORE(hyperv_mmio_lock); +static struct resource *hyperv_mmio; +static DEFINE_SEMAPHORE(hyperv_mmio_lock); static int vmbus_exists(void) { -- 1.7.4.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] hv_pci: make hv_irq functions static
From: Stephen Hemminger Fix sparse warning because these functions only used in one file. Signed-off-by: Stephen Hemminger --- drivers/pci/host/pci-hyperv.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index 6955ffdb..1ebe2b0 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c @@ -755,7 +755,7 @@ static int hv_set_affinity(struct irq_data *data, const struct cpumask *dest, return parent->chip->irq_set_affinity(parent, dest, force); } -void hv_irq_mask(struct irq_data *data) +static void hv_irq_mask(struct irq_data *data) { pci_msi_mask_irq(data); } @@ -770,7 +770,7 @@ void hv_irq_mask(struct irq_data *data) * is built out of this PCI bus's instance GUID and the function * number of the device. */ -void hv_irq_unmask(struct irq_data *data) +static void hv_irq_unmask(struct irq_data *data) { struct msi_desc *msi_desc = irq_data_get_msi_desc(data); struct irq_cfg *cfg = irqd_cfg(data); -- 1.7.4.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/2] hyperv: minor cleanups
From: Stephen Hemminger Sparse warnings from global data/functions that should be static Stephen Hemminger (2): hyperv: make mmio resource local hv_pci: make hv_irq functions static drivers/hv/vmbus_drv.c|4 ++-- drivers/pci/host/pci-hyperv.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- 1.7.4.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/5] hv: remove stale comment
From: Stephen Hemminger The channel callback is invoked from softirq/tasklet not a work queue and the commented out part is leftover from staging. Signed-off-by: Stephen Hemminger --- include/linux/hyperv.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index b01c8c3..9464ff7 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -731,9 +731,6 @@ struct vmbus_channel { struct vmbus_close_msg close_msg; - /* Channel callback are invoked in this workqueue context */ - /* HANDLE dataWorkQueue; */ - void (*onchannel_callback)(void *context); void *channel_callback_context; -- 2.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/5] hv: make vmbus mmio variables static
From: Stephen Hemminger These are only used in this file. Signed-off-by: Stephen Hemminger --- drivers/hv/vmbus_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 8ae2ed7..751fd19 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -105,8 +105,8 @@ static struct notifier_block hyperv_panic_block = { static const char *fb_mmio_name = "fb_range"; static struct resource *fb_mmio; -struct resource *hyperv_mmio; -DEFINE_SEMAPHORE(hyperv_mmio_lock); +static struct resource *hyperv_mmio; +static DEFINE_SEMAPHORE(hyperv_mmio_lock); static int vmbus_exists(void) { -- 2.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/5] hv: minor whitespace fix
From: Stephen Hemminger Proper spacing around callback function. Signed-off-by: Stephen Hemminger --- include/linux/hyperv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 9464ff7..f46159d 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -965,7 +965,7 @@ extern int vmbus_open(struct vmbus_channel *channel, u32 recv_ringbuffersize, void *userdata, u32 userdatalen, - void(*onchannel_callback)(void *context), + void (*onchannel_callback)(void *context), void *context); extern void vmbus_close(struct vmbus_channel *channel); @@ -1353,7 +1353,7 @@ struct hyperv_service_callback { char *log_msg; uuid_le data; struct vmbus_channel *channel; - void (*callback) (void *context); + void (*callback)(void *context); }; #define MAX_SRV_VER0x7ff -- 2.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/5] hv: comment spelling fixes
From: Stephen Hemminger Lots of little spelling mistakes. Signed-off-by: Stephen Hemminger --- drivers/hv/channel.c| 16 drivers/hv/connection.c | 2 +- drivers/hv/hv_kvp.c | 6 +++--- drivers/hv/vmbus_drv.c | 2 +- include/linux/hyperv.h | 16 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 56dd261..4cf5c33 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -331,7 +331,7 @@ static int create_gpadl_header(void *kbuffer, u32 size, * Gpadl is u32 and we are using a pointer which could * be 64-bit * This is governed by the guest/host protocol and -* so the hypervisor gurantees that this is ok. +* so the hypervisor guarantees that this is ok. */ for (i = 0; i < pfncurr; i++) gpadl_body->pfn[i] = slow_virt_to_phys( @@ -377,7 +377,7 @@ nomem: } /* - * vmbus_establish_gpadl - Estabish a GPADL for the specified buffer + * vmbus_establish_gpadl - Establish a GPADL for the specified buffer * * @channel: a channel * @kbuffer: from kmalloc or vmalloc @@ -530,7 +530,7 @@ static int vmbus_close_internal(struct vmbus_channel *channel) /* * In case a device driver's probe() fails (e.g., * util_probe() -> vmbus_open() returns -ENOMEM) and the device is -* rescinded later (e.g., we dynamically disble an Integrated Service +* rescinded later (e.g., we dynamically disable an Integrated Service * in Hyper-V Manager), the driver's remove() invokes vmbus_close(): * here we should skip most of the below cleanup work. */ @@ -662,7 +662,7 @@ int vmbus_sendpacket_ctl(struct vmbus_channel *channel, void *buffer, &signal, lock); /* -* Signalling the host is conditional on many factors: +* Signaling the host is conditional on many factors: * 1. The ring state changed from being empty to non-empty. *This is tracked by the variable "signal". * 2. The variable kick_q tracks if more data will be placed @@ -758,7 +758,7 @@ int vmbus_sendpacket_pagebuffer_ctl(struct vmbus_channel *channel, /* Setup the descriptor */ desc.type = VM_PKT_DATA_USING_GPA_DIRECT; desc.flags = flags; - desc.dataoffset8 = descsize >> 3; /* in 8-bytes grandularity */ + desc.dataoffset8 = descsize >> 3; /* in 8-bytes granularity */ desc.length8 = (u16)(packetlen_aligned >> 3); desc.transactionid = requestid; desc.rangecount = pagecount; @@ -780,7 +780,7 @@ int vmbus_sendpacket_pagebuffer_ctl(struct vmbus_channel *channel, &signal, lock); /* -* Signalling the host is conditional on many factors: +* Signaling the host is conditional on many factors: * 1. The ring state changed from being empty to non-empty. *This is tracked by the variable "signal". * 2. The variable kick_q tracks if more data will be placed @@ -848,7 +848,7 @@ int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel, /* Setup the descriptor */ desc->type = VM_PKT_DATA_USING_GPA_DIRECT; desc->flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED; - desc->dataoffset8 = desc_size >> 3; /* in 8-bytes grandularity */ + desc->dataoffset8 = desc_size >> 3; /* in 8-bytes granularity */ desc->length8 = (u16)(packetlen_aligned >> 3); desc->transactionid = requestid; desc->rangecount = 1; @@ -907,7 +907,7 @@ int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel, /* Setup the descriptor */ desc.type = VM_PKT_DATA_USING_GPA_DIRECT; desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED; - desc.dataoffset8 = descsize >> 3; /* in 8-bytes grandularity */ + desc.dataoffset8 = descsize >> 3; /* in 8-bytes granularity */ desc.length8 = (u16)(packetlen_aligned >> 3); desc.transactionid = requestid; desc.rangecount = 1; diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index fcf8a02..b06faee 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -88,7 +88,7 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, * This has been the behavior pre-win8. This is not * perf issue and having all channel messages delivered on CPU 0 * would be ok. -* For post win8 hosts, we support receiving channel messagges on +* For post win8 hosts, we support receiving channel messages on * all the CPUs. This is needed for kexec to work correctly where * the CPU attempting to connect may not be CPU 0. */ diff --git a/drivers/hv/hv_kvp.c b/driv
[PATCH 5/5] pci-hyperv: make irq mask/unmask static
From: Stephen Hemminger Fixes sparse warning since these functions are only used in this file. Signed-off-by: Stephen Hemminger --- drivers/pci/host/pci-hyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index 6955ffdb..1ebe2b0 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c @@ -755,7 +755,7 @@ static int hv_set_affinity(struct irq_data *data, const struct cpumask *dest, return parent->chip->irq_set_affinity(parent, dest, force); } -void hv_irq_mask(struct irq_data *data) +static void hv_irq_mask(struct irq_data *data) { pci_msi_mask_irq(data); } @@ -770,7 +770,7 @@ void hv_irq_mask(struct irq_data *data) * is built out of this PCI bus's instance GUID and the function * number of the device. */ -void hv_irq_unmask(struct irq_data *data) +static void hv_irq_unmask(struct irq_data *data) { struct msi_desc *msi_desc = irq_data_get_msi_desc(data); struct irq_cfg *cfg = irqd_cfg(data); -- 2.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel