Nicholas Mc Guire | 29 Jan 11:24 2015
Picon

[PATCH 2/3 v3] hyperv: hyperv_fb.c: match wait_for_completion_timeout return type

The return type of wait_for_completion_timeout is unsigned long not
int. This patch fixes up the declarations only.

Signed-off-by: Nicholas Mc Guire <der.herr <at> hofr.at>
---

v2: fixed subject line
v3: fixed patch description as recommended by Dan Carpenter
    <dan.carpenter <at> oracle.com>

Patch was compile tested only for x86_64_defconfig + CONFIG_X86_VSMP=y
CONFIG_HYPERV=m, CONFIG_FB_HYPERV=m

Patch is against 3.19.0-rc5 -next-20150123

 drivers/video/fbdev/hyperv_fb.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c
index 4254336..807ee22 100644
--- a/drivers/video/fbdev/hyperv_fb.c
+++ b/drivers/video/fbdev/hyperv_fb.c
 <at>  <at>  -415,7 +415,8  <at>  <at>  static int synthvid_negotiate_ver(struct hv_device *hdev, u32 ver)
 	struct fb_info *info = hv_get_drvdata(hdev);
 	struct hvfb_par *par = info->par;
 	struct synthvid_msg *msg = (struct synthvid_msg *)par->init_buf;
-	int t, ret = 0;
+	int ret = 0;
+	unsigned long t;

(Continue reading)

Dexuan Cui | 29 Jan 12:02 2015
Picon

[PATCH 3/3] hv: vmbus_open(): reset the channel state on ENOMEM

Without this patch, the state is put to CHANNEL_OPENING_STATE, and when
the driver is loaded next time, vmbus_open() will fail immediately due to
newchannel->state != CHANNEL_OPEN_STATE.

CC: "K. Y. Srinivasan" <kys <at> microsoft.com>
Signed-off-by: Dexuan Cui <decui <at> microsoft.com>
---
 drivers/hv/channel.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 2978f5e..26dcf26 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
 <at>  <at>  -89,9 +89,10  <at>  <at>  int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
 	out = (void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO,
 		get_order(send_ringbuffer_size + recv_ringbuffer_size));

-	if (!out)
-		return -ENOMEM;
-
+	if (!out) {
+		err = -ENOMEM;
+		goto error0;
+	}

 	in = (void *)((unsigned long)out + send_ringbuffer_size);

 <at>  <at>  -199,6 +200,7  <at>  <at>  error0:
 	free_pages((unsigned long)out,
(Continue reading)

Dexuan Cui | 29 Jan 12:02 2015
Picon

[PATCH 2/3] hv: vmbus_post_msg: retry the hypercall on HV_STATUS_INVALID_CONNECTION_ID

I got the hypercall error code on Hyper-V 2008 R2 when keeping running
"rmmod hv_netvsc; modprobe hv_netvsc; rmmod hv_utils; modprobe hv_utils"
in a Linux guest.

Without the patch, the driver can occasionally fail to load.

CC: "K. Y. Srinivasan" <kys <at> microsoft.com>
Signed-off-by: Dexuan Cui <decui <at> microsoft.com>
---
 arch/x86/include/uapi/asm/hyperv.h | 1 +
 drivers/hv/connection.c            | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/include/uapi/asm/hyperv.h
index 90c458e..b9daffb 100644
--- a/arch/x86/include/uapi/asm/hyperv.h
+++ b/arch/x86/include/uapi/asm/hyperv.h
 <at>  <at>  -225,6 +225,7  <at>  <at> 
 #define HV_STATUS_INVALID_HYPERCALL_CODE	2
 #define HV_STATUS_INVALID_HYPERCALL_INPUT	3
 #define HV_STATUS_INVALID_ALIGNMENT		4
+#define HV_STATUS_INVALID_CONNECTION_ID		18
 #define HV_STATUS_INSUFFICIENT_BUFFERS		19

 typedef struct _HV_REFERENCE_TSC_PAGE {
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index c4acd1c..8bd05f3 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
 <at>  <at>  -440,6 +440,15  <at>  <at>  int vmbus_post_msg(void *buffer, size_t buflen)
(Continue reading)

Dexuan Cui | 29 Jan 12:02 2015
Picon

[PATCH 1/3] hv: hv_util: move vmbus_open() to a later place

Before the line vmbus_open() returns, srv->util_cb can be already running
and the variablies, like util_fw_version, are needed by the srv->util_cb.

So we have to make sure the variables are initialized before the vmbus_open().

CC: "K. Y. Srinivasan" <kys <at> microsoft.com>
Signed-off-by: Dexuan Cui <decui <at> microsoft.com>
---
 drivers/hv/hv_util.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
index 3b9c9ef..c5be773 100644
--- a/drivers/hv/hv_util.c
+++ b/drivers/hv/hv_util.c
 <at>  <at>  -340,12 +340,8  <at>  <at>  static int util_probe(struct hv_device *dev,

 	set_channel_read_state(dev->channel, false);

-	ret = vmbus_open(dev->channel, 4 * PAGE_SIZE, 4 * PAGE_SIZE, NULL, 0,
-			srv->util_cb, dev->channel);
-	if (ret)
-		goto error;
-
 	hv_set_drvdata(dev, srv);
+
 	/*
 	 * Based on the host; initialize the framework and
 	 * service version numbers we will negotiate.
 <at>  <at>  -365,6 +361,11  <at>  <at>  static int util_probe(struct hv_device *dev,
(Continue reading)

Simon Guo | 29 Jan 06:34 2015
Picon

[PATCH v2 02/02] STAGING: Fix pcl818.c coding style issue: line over 80 characters

Correct one coding style problem(detected by checkpatch.pl) in pcl818.c.
- line over 80 characters

Signed-off-by: Simon Guo <wei.guo.simon <at> gmail.com>
---
 drivers/staging/comedi/drivers/pcl818.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c
index 5d9050c..2b8a05e 100644
--- a/drivers/staging/comedi/drivers/pcl818.c
+++ b/drivers/staging/comedi/drivers/pcl818.c
 <at>  <at>  -297,9 +297,11  <at>  <at>  static const struct pcl818_board boardtypes[] = {

 struct pcl818_private {
 	struct comedi_isadma *dma;
-	unsigned int ns_min;	/*  manimal allowed delay between samples (in us) for actual card */
+	/*  manimal allowed delay between samples (in us) for actual card */
+	unsigned int ns_min;
 	int i8253_osc_base;	/*  1/frequency of on board oscilator in ns */
-	unsigned int act_chanlist[16];	/*  MUX setting for actual AI operations */
+	/*  MUX setting for actual AI operations */
+	unsigned int act_chanlist[16];
 	unsigned int act_chanlist_len;	/*  how long is actual MUX list */
 	unsigned int act_chanlist_pos;	/*  actual position in MUX list */
 	unsigned int divisor1;
 <at>  <at>  -641,7 +643,8  <at>  <at>  static int check_channel_list(struct comedi_device *dev,
 				break;
 			nowmustbechan =
 			    (CR_CHAN(chansegment[i - 1]) + 1) % s->n_chan;
(Continue reading)

Simon Guo | 29 Jan 06:33 2015
Picon

[PATCH v2 01/02] STAGING: Fix pcl818.c coding style issue: code indent should use tabs where possible

Correct one coding style problem(detected by checkpatch.pl) in pcl818.c.
- code indent should use tabs where possible
It is fixed by reformatting the comment block to usual comment style.

And with the reformatting, following coding style problem is also fixed:
- please, no space before tabs

Signed-off-by: Simon Guo <wei.guo.simon <at> gmail.com>
---
 drivers/staging/comedi/drivers/pcl818.c | 189 +++++++++++++++-----------------
 1 file changed, 91 insertions(+), 98 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c
index ba2e137..5d9050c 100644
--- a/drivers/staging/comedi/drivers/pcl818.c
+++ b/drivers/staging/comedi/drivers/pcl818.c
 <at>  <at>  -1,102 +1,95  <at>  <at> 
 /*
-   comedi/drivers/pcl818.c
-
-   Author:  Michal Dobes <dobes <at> tesnet.cz>
-
-   hardware driver for Advantech cards:
-    card:   PCL-818L, PCL-818H, PCL-818HD, PCL-818HG, PCL-818, PCL-718
-    driver: pcl818l,  pcl818h,  pcl818hd,  pcl818hg,  pcl818,  pcl718
-*/
-/*
-Driver: pcl818
-Description: Advantech PCL-818 cards, PCL-718
-Author: Michal Dobes <dobes <at> tesnet.cz>
(Continue reading)

K. Y. Srinivasan | 29 Jan 01:49 2015
Picon

[PATCH RESEND V2 0/8] Drivers: hv: vmbus: Enable unloading of vmbus driver

Windows hosts starting with Ws2012 R2 permit re-establishing the vmbus
connection from the guest. This patch-set includes patches from Vitaly
to cleanup the VMBUS unload path so we can potentially reload the driver.

This set also includes a patch from Jake to correctly extract MMIO
information on both Gen1 and Gen 2 firmware.

Jake Oshins (1):
  drivers:hv:vmbus drivers:hv:vmbus Allow for more than one MMIO range
    for children

Vitaly Kuznetsov (7):
  Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors
  Drivers: hv: vmbus: rename channel work queues
  Drivers: hv: vmbus: avoid double kfree for device_obj
  Drivers: hv: vmbus: teardown hv_vmbus_con workqueue and
    vmbus_connection pages on shutdown
  drivers: hv: vmbus: Teardown synthetic interrupt controllers on
    module unload
  clockevents: export clockevents_unbind_device instead of
    clockevents_unbind
  Drivers: hv: vmbus: Teardown clockevent devices on module unload

 drivers/hv/channel_mgmt.c       |    6 +-
 drivers/hv/connection.c         |   17 +++--
 drivers/hv/hv.c                 |   34 ++++++++-
 drivers/hv/hyperv_vmbus.h       |    3 +
 drivers/hv/vmbus_drv.c          |  150 ++++++++++++++++++++++++++++++++++-----
 drivers/video/fbdev/hyperv_fb.c |    2 +-
 include/linux/hyperv.h          |    5 +-
(Continue reading)

Rickard Strandqvist | 28 Jan 23:49 2015
Picon

[PATCH] staging: rtl8188eu: core: rtw_efuse: Removed variables that is never used

Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist <at> spectrumdigital.se>
---
 drivers/staging/rtl8188eu/core/rtw_efuse.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
index 8816d11..5a21e4a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
+++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
 <at>  <at>  -224,7 +224,7  <at>  <at>  static void efuse_read_phymap_from_txpktbuf(
 	)
 {
 	u16 dbg_addr = 0;
-	u32 start  = 0, passing_time = 0;
+	u32 start  = 0;
 	u8 reg_0x143 = 0;
 	u32 lo32 = 0, hi32 = 0;
 	u16 len = 0, count = 0;
 <at>  <at>  -248,7 +248,7  <at>  <at>  static void efuse_read_phymap_from_txpktbuf(
 		usb_write8(adapter, REG_TXPKTBUF_DBG, 0);
 		start = jiffies;
 		while (!(reg_0x143 = usb_read8(adapter, REG_TXPKTBUF_DBG)) &&
-		       (passing_time = rtw_get_passing_time_ms(start)) < 1000) {
+		       rtw_get_passing_time_ms(start) < 1000) {
 			DBG_88E("%s polling reg_0x143:0x%02x, reg_0x106:0x%02x\n", __func__, reg_0x143,
(Continue reading)

Rickard Strandqvist | 28 Jan 23:48 2015
Picon

[PATCH] staging: netlogic: xlr_net: Removed variables that is never used

Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist <at> spectrumdigital.se>
---
 drivers/staging/netlogic/xlr_net.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
index 5ecb3e6..0d9308a 100644
--- a/drivers/staging/netlogic/xlr_net.c
+++ b/drivers/staging/netlogic/xlr_net.c
 <at>  <at>  -814,9 +814,8  <at>  <at>  static void xlr_gmac_link_adjust(struct net_device *ndev)
 {
 	struct xlr_net_priv *priv = netdev_priv(ndev);
 	struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr];
-	u32 intreg;

-	intreg = xlr_nae_rdreg(priv->base_addr, R_INTREG);
+	xlr_nae_rdreg(priv->base_addr, R_INTREG);
 	if (phydev->link) {
 		if (phydev->speed != priv->phy_speed) {
 			xlr_set_gmac_speed(priv);
--

-- 
1.7.10.4
Rickard Strandqvist | 28 Jan 23:47 2015
Picon

[PATCH] staging: media: vino: vino: Removed variables that is never used

Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist <at> spectrumdigital.se>
---
 drivers/staging/media/vino/vino.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/media/vino/vino.c b/drivers/staging/media/vino/vino.c
index 2c85357..f43c1ea 100644
--- a/drivers/staging/media/vino/vino.c
+++ b/drivers/staging/media/vino/vino.c
 <at>  <at>  -2375,7 +2375,6  <at>  <at>  static irqreturn_t vino_interrupt(int irq, void *dev_id)
 		next_4_desc = vino->a.next_4_desc;
 	unsigned int line_count_2,
 		page_index_2,
-		field_counter_2,
 		start_desc_tbl_2,
 		next_4_desc_2;
 #endif
 <at>  <at>  -2421,7 +2420,6  <at>  <at>  static irqreturn_t vino_interrupt(int irq, void *dev_id)
 #ifdef VINO_DEBUG_INT
 			line_count_2 = vino->a.line_count;
 			page_index_2 = vino->a.page_index;
-			field_counter_2 = vino->a.field_counter;
 			start_desc_tbl_2 = vino->a.start_desc_tbl;
 			next_4_desc_2 = vino->a.next_4_desc;

(Continue reading)

Rickard Strandqvist | 28 Jan 23:47 2015
Picon

[PATCH] staging: lustre: include: lustre_lib.h: Removed variables that is never used

Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist <at> spectrumdigital.se>
---
 drivers/staging/lustre/lustre/include/lustre_lib.h |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h b/drivers/staging/lustre/lustre/include/lustre_lib.h
index bf13563..b80ae84 100644
--- a/drivers/staging/lustre/lustre/include/lustre_lib.h
+++ b/drivers/staging/lustre/lustre/include/lustre_lib.h
 <at>  <at>  -549,11 +549,6  <at>  <at>  do {									   \
 		__blocked = cfs_block_sigsinv(0);			      \
 									       \
 	for (;;) {							     \
-		unsigned       __wstate;				       \
-									       \
-		__wstate = info->lwi_on_signal != NULL &&		      \
-			   (__timeout == 0 || __allow_intr) ?		  \
-			TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE;	       \
 									       \
 		set_current_state(TASK_INTERRUPTIBLE);		 \
 									       \
--

-- 
1.7.10.4

Gmane