Re: [PATCH] staging: goldfish: switch from spinlock to mutex
On 04/04/14 16:30, Dan Carpenter wrote: > On Fri, Apr 04, 2014 at 02:46:14PM +0300, Kristina Martšenko wrote: > >> Yes, I didn't find any interrupt handlers either, which is partially why >> I thought it was (probably) safe. > > What's the other part of why it was safe? Put that stuff in the > changelog. When we're reviewing patches we're always interested to know > if it's safe. :) The other part was whether the code was allowed to sleep. I figured it probably was since it's only accessed from MTD callback functions and other drivers in drivers/mtd/devices/ also sleep in those functions (either by using mutexes or by calling schedule() directly). I didn't mention why I thought it was safe in the changelog because I thought maybe the reasons would seem too "obvious" to more experienced kernel developers. Should I test and resend the patch with a new changelog? Kristina ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] imx-hdmi: Propagate the real error code on platform_get_irq() failure
From: Fabio Estevam No need to return a 'fake' return value on platform_get_irq() failure. Signed-off-by: Fabio Estevam --- drivers/staging/imx-drm/imx-hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index d47dedd..cf21252 100644 --- a/drivers/staging/imx-drm/imx-hdmi.c +++ b/drivers/staging/imx-drm/imx-hdmi.c @@ -1628,7 +1628,7 @@ static int imx_hdmi_bind(struct device *dev, struct device *master, void *data) irq = platform_get_irq(pdev, 0); if (irq < 0) - return -EINVAL; + return irq; ret = devm_request_threaded_irq(dev, irq, imx_hdmi_hardirq, imx_hdmi_irq, IRQF_SHARED, -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] imx-hdmi: Make checkpatch happy
From: Fabio Estevam Fix the following checkpatch warnings: WARNING: Missing a blank line after declarations #162: FILE: drivers/staging/imx-drm/imx-hdmi.c:162: + u8 val = hdmi_readb(hdmi, reg) & ~mask; + val |= data & mask; WARNING: Missing a blank line after declarations #663: FILE: drivers/staging/imx-drm/imx-hdmi.c:663: + unsigned char val = 0; + val = hdmi_readb(hdmi, HDMI_IH_I2CMPHY_STAT0) & 0x3; total: 0 errors, 2 warnings, 1773 lines checked Signed-off-by: Fabio Estevam --- drivers/staging/imx-drm/imx-hdmi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index cf21252..f557ea8 100644 --- a/drivers/staging/imx-drm/imx-hdmi.c +++ b/drivers/staging/imx-drm/imx-hdmi.c @@ -159,6 +159,7 @@ static inline u8 hdmi_readb(struct imx_hdmi *hdmi, int offset) static void hdmi_modb(struct imx_hdmi *hdmi, u8 data, u8 mask, unsigned reg) { u8 val = hdmi_readb(hdmi, reg) & ~mask; + val |= data & mask; hdmi_writeb(hdmi, val, reg); } @@ -659,8 +660,8 @@ static inline void hdmi_phy_test_dout(struct imx_hdmi *hdmi, static bool hdmi_phy_wait_i2c_done(struct imx_hdmi *hdmi, int msec) { - unsigned char val = 0; - val = hdmi_readb(hdmi, HDMI_IH_I2CMPHY_STAT0) & 0x3; + unsigned char val = hdmi_readb(hdmi, HDMI_IH_I2CMPHY_STAT0) & 0x3; + while (!val) { udelay(1000); if (msec-- == 0) -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: dt3155v4l: Fixed global symbol
Made q_ops static, as suggested by sparse. Signed-off-by: Michalis Pappas --- drivers/staging/media/dt3155v4l/dt3155v4l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/dt3155v4l/dt3155v4l.c b/drivers/staging/media/dt3155v4l/dt3155v4l.c index e729e52..97e7a9b 100644 --- a/drivers/staging/media/dt3155v4l/dt3155v4l.c +++ b/drivers/staging/media/dt3155v4l/dt3155v4l.c @@ -299,7 +299,7 @@ dt3155_buf_queue(struct vb2_buffer *vb) * end driver-specific callbacks */ -const struct vb2_ops q_ops = { +static const struct vb2_ops q_ops = { .queue_setup = dt3155_queue_setup, .wait_prepare = dt3155_wait_prepare, .wait_finish = dt3155_wait_finish, -- 1.7.12.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: sep: Fix coding style
This fixes coding style warning "Missing a blank line after declarations" in files sep_dev.h and sep_crypto.c. Signed-off-by: Camille Bordignon --- diff --git a/drivers/staging/sep/sep_crypto.c b/drivers/staging/sep/sep_crypto.c index 965485f..415f8ec 100644 --- a/drivers/staging/sep/sep_crypto.c +++ b/drivers/staging/sep/sep_crypto.c @@ -93,6 +93,7 @@ static void sep_do_callback(struct work_struct *work) { struct sep_work_struct *sep_work = container_of(work, struct sep_work_struct, work); + if (sep_work != NULL) { (sep_work->callback)(sep_work->data); kfree(sep_work); @@ -649,6 +650,7 @@ weak: static u32 sep_sg_nents(struct scatterlist *sg) { u32 ct1 = 0; + while (sg) { ct1 += 1; sg = sg_next(sg); @@ -666,6 +668,7 @@ static u32 sep_sg_nents(struct scatterlist *sg) static u32 sep_start_msg(struct this_task_ctx *ta_ctx) { u32 *word_ptr; + ta_ctx->msg_len_words = 2; ta_ctx->msgptr = ta_ctx->msg; memset(ta_ctx->msg, 0, SEP_DRIVER_MESSAGE_SHARED_AREA_SIZE_IN_BYTES); @@ -740,6 +743,7 @@ static void sep_write_msg(struct this_task_ctx *ta_ctx, void *in_addr, { u32 *word_ptr; void *void_ptr; + void_ptr = ta_ctx->msgptr + *msg_offset; word_ptr = (u32 *)void_ptr; memcpy(void_ptr, in_addr, size); @@ -748,6 +752,7 @@ static void sep_write_msg(struct this_task_ctx *ta_ctx, void *in_addr, /* Do we need to manipulate endian? */ if (byte_array) { u32 i; + for (i = 0; i < ((size + 3) / 4); i += 1) *(word_ptr + i) = CHG_ENDIAN(*(word_ptr + i)); } @@ -788,12 +793,14 @@ static void sep_read_msg(struct this_task_ctx *ta_ctx, void *in_addr, { u32 *word_ptr; void *void_ptr; + void_ptr = ta_ctx->msgptr + *msg_offset; word_ptr = (u32 *)void_ptr; /* Do we need to manipulate endian? */ if (byte_array) { u32 i; + for (i = 0; i < ((size + 3) / 4); i += 1) *(word_ptr + i) = CHG_ENDIAN(*(word_ptr + i)); } @@ -865,6 +872,7 @@ static void sep_read_context(struct this_task_ctx *ta_ctx, u32 *msg_offset, void *dst, u32 len) { u32 max_length = ((len + 3) / sizeof(u32)) * sizeof(u32); + sep_read_msg(ta_ctx, dst, len, max_length, msg_offset, 0); } @@ -884,6 +892,7 @@ static void sep_write_context(struct this_task_ctx *ta_ctx, u32 *msg_offset, void *src, u32 len) { u32 max_length = ((len + 3) / sizeof(u32)) * sizeof(u32); + sep_write_msg(ta_ctx, src, len, max_length, msg_offset, 0); } @@ -3893,6 +3902,7 @@ static struct crypto_alg crypto_algs[] = { int sep_crypto_setup(void) { int err, i, j, k; + tasklet_init(&sep_dev->finish_tasklet, sep_finish, (unsigned long)sep_dev); diff --git a/drivers/staging/sep/sep_dev.h b/drivers/staging/sep/sep_dev.h index 5f6a07f..bf56c06 100644 --- a/drivers/staging/sep/sep_dev.h +++ b/drivers/staging/sep/sep_dev.h @@ -152,6 +152,7 @@ static inline u32 sep_read_reg(struct sep_device *dev, int reg) static inline void sep_wait_sram_write(struct sep_device *dev) { u32 reg_val; + do { reg_val = sep_read_reg(dev, HW_SRAM_DATA_READY_REG_ADDR); } while (!(reg_val & 1)); -- Camille Bordignon ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: sep: Fix coding style
On Sat, Apr 05, 2014 at 08:24:04PM +0200, Camille Bordignon wrote: > This fixes coding style warning "Missing a blank line after > declarations" in files sep_dev.h and sep_crypto.c. > > Signed-off-by: Camille Bordignon > --- > diff --git a/drivers/staging/sep/sep_crypto.c > b/drivers/staging/sep/sep_crypto.c > index 965485f..415f8ec 100644 > --- a/drivers/staging/sep/sep_crypto.c > +++ b/drivers/staging/sep/sep_crypto.c > @@ -93,6 +93,7 @@ static void sep_do_callback(struct work_struct *work) > { > struct sep_work_struct *sep_work = container_of(work, > struct sep_work_struct, work); > + > if (sep_work != NULL) { > (sep_work->callback)(sep_work->data); > kfree(sep_work); Tabs got converted all to spaces here, making it impossible to apply your patch :( Can you try this again after fixing up your email client? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/10] driver: staging: wlan-ng: Fixed Breaking long lines and strings style rule
Fixed coding style rule "Breaking long lines and strings" for hfa384x_usb.c Signed-off-by: Sherif Shehab Aldin --- drivers/staging/wlan-ng/hfa384x_usb.c | 47 - 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 5b8b094..646c29e 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -642,8 +642,7 @@ usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp, result->resp1 = le16_to_cpu(cmdresp->resp1); result->resp2 = le16_to_cpu(cmdresp->resp2); - pr_debug("cmdresult:status=0x%04x " -"resp0=0x%04x resp1=0x%04x resp2=0x%04x\n", + pr_debug("cmdresult:status=0x%04x resp0=0x%04x resp1=0x%04x resp2=0x%04x\n", result->status, result->resp0, result->resp1, result->resp2); return result->status & HFA384x_STATUS_RESULT; @@ -991,9 +990,7 @@ int hfa384x_cmd_initialize(hfa384x_t *hw) result = hfa384x_docmd_wait(hw, &cmd); - pr_debug("cmdresp.init: " -"status=0x%04x, resp0=0x%04x, " -"resp1=0x%04x, resp2=0x%04x\n", + pr_debug("cmdresp.init: status=0x%04x, resp0=0x%04x, resp1=0x%04x, resp2=0x%04x\n", cmd.result.status, cmd.result.resp0, cmd.result.resp1, cmd.result.resp2); if (result == 0) { @@ -1381,8 +1378,7 @@ hfa384x_docmd(hfa384x_t *hw, ctlx->outbufsize = sizeof(ctlx->outbuf.cmdreq); - pr_debug("cmdreq: cmd=0x%04x " -"parm0=0x%04x parm1=0x%04x parm2=0x%04x\n", + pr_debug("cmdreq: cmd=0x%04x parm0=0x%04x parm1=0x%04x parm2=0x%04x\n", cmd->cmd, cmd->parm0, cmd->parm1, cmd->parm2); ctlx->reapable = mode; @@ -2018,7 +2014,8 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len) if (hw->dlstate != HFA384x_DLSTATE_FLASHENABLED) return -EINVAL; - netdev_info(hw->wlandev->netdev, "Download %d bytes to flash @0x%06x\n", len, daddr); + netdev_info(hw->wlandev->netdev, + "Download %d bytes to flash @0x%06x\n", len, daddr); /* Convert to flat address for arithmetic */ /* NOTE: dlbuffer RID stores the address in AUX format */ @@ -2028,8 +2025,9 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len) hw->bufinfo.page, hw->bufinfo.offset, dlbufaddr); #if 0 - netdev_warn(hw->wlandev->netdev, "dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, - hw->bufinfo.len, hw->dltimeout); + netdev_warn(hw->wlandev->netdev, + "dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, + hw->bufinfo.len, hw->dltimeout); #endif /* Calculations to determine how many fills of the dlbuffer to do * and how many USB wmemreq's to do for each fill. At this point @@ -2062,9 +2060,9 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len) result = hfa384x_cmd_download(hw, HFA384x_PROGMODE_NV, burnlo, burnhi, burnlen); if (result) { - netdev_err(hw->wlandev->netdev, "download(NV,lo=%x,hi=%x,len=%x) " - "cmd failed, result=%d. Aborting d/l\n", - burnlo, burnhi, burnlen, result); + netdev_err(hw->wlandev->netdev, + "download(NV,lo=%x,hi=%x,len=%x) cmd failed, result=%d. Aborting d/l\n", + burnlo, burnhi, burnlen, result); goto exit_proc; } @@ -2095,8 +2093,7 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len) 0, 0, 0); if (result) { netdev_err(hw->wlandev->netdev, - "download(NVWRITE,lo=%x,hi=%x,len=%x) " - "cmd failed, result=%d. Aborting d/l\n", + "download(NVWRITE,lo=%x,hi=%x,len=%x) cmd failed, result=%d. Aborting d/l\n", burnlo, burnhi, burnlen, result); goto exit_proc; } @@ -2352,7 +2349,8 @@ int hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len) if (hw->dlstate != HFA384x_DLSTATE_RAMENABLED) return -EINVAL; - netdev_info(hw->wlandev->netdev, "Writing %d bytes to ram @0x%06x\n", len, daddr); + netdev_info(hw->wlandev->netdev, "Writing %d bytes to ram @0x%06x\n", + len, daddr); /* How many dowmem calls? */ nwrites = len / HFA384x_USB_RWMEM_MAXLEN; @@ -2462,7 +2460,8 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) pdrcode = le16
[PATCH 04/10] driver: staging: wlan-ng: Setting character pointers as const
changed declaration of ctlx_str to: static const char * const ctlx_str[] Signed-off-by: Sherif Shehab Aldin --- drivers/staging/wlan-ng/hfa384x_usb.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 01284ea..74db234 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -272,7 +272,7 @@ static int hfa384x_isgood_pdrcode(u16 pdrcode); static inline const char *ctlxstr(CTLX_STATE s) { - static const char *ctlx_str[] = { + static const char * const ctlx_str[] = { "Initial state", "Complete", "Request failed", -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/10] driver: staging: wlan-ng: switched to pr_warn
changed printk(KERN_WARNING .. to pr_warn Signed-off-by: Sherif Shehab Aldin --- drivers/staging/wlan-ng/hfa384x_usb.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 943de9c..01284ea 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -714,10 +714,9 @@ static int usbctlx_rrid_completor_fn(struct usbctlx_completor *head) /* Validate the length, note body len calculation in bytes */ if (rridresult.riddata_len != complete->riddatalen) { - printk(KERN_WARNING - "RID len mismatch, rid=0x%04x hlen=%d fwlen=%d\n", - rridresult.rid, - complete->riddatalen, rridresult.riddata_len); + pr_warn("RID len mismatch, rid=0x%04x hlen=%d fwlen=%d\n", + rridresult.rid, + complete->riddatalen, rridresult.riddata_len); return -ENODATA; } -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/10] driver: staging: wlan-ng: Removed unnecessary typedefs from hfa384x_usb.c
Removed unnecessary typedefs from hfa384x_usb.c Signed-off-by: Sherif Shehab Aldin --- drivers/staging/wlan-ng/hfa384x_usb.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 646c29e..943de9c 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -744,14 +744,12 @@ static inline struct usbctlx_completor *init_rrid_completor( * Completor object: * Interprets the results of a synchronous RID-write */ -typedef struct usbctlx_cmd_completor usbctlx_wrid_completor_t; #define init_wrid_completor init_cmd_completor /* * Completor object: * Interprets the results of a synchronous memory-write */ -typedef struct usbctlx_cmd_completor usbctlx_wmem_completor_t; #define init_wmem_completor init_cmd_completor /* @@ -765,11 +763,11 @@ struct usbctlx_rmem_completor { void *data; unsigned int len; }; -typedef struct usbctlx_rmem_completor usbctlx_rmem_completor_t; static int usbctlx_rmem_completor_fn(struct usbctlx_completor *head) { - usbctlx_rmem_completor_t *complete = (usbctlx_rmem_completor_t *) head; + struct usbctlx_rmem_completor *complete = + (struct usbctlx_rmem_completor *)head; pr_debug("rmemresp:len=%d\n", complete->rmemresp->frmlen); memcpy(complete->data, complete->rmemresp->data, complete->len); @@ -777,7 +775,7 @@ static int usbctlx_rmem_completor_fn(struct usbctlx_completor *head) } static inline struct usbctlx_completor *init_rmem_completor( - usbctlx_rmem_completor_t + struct usbctlx_rmem_completor *completor, hfa384x_usb_rmemresp_t *rmemresp, @@ -1562,7 +1560,7 @@ hfa384x_dowrid(hfa384x_t *hw, if (result != 0) { kfree(ctlx); } else if (mode == DOWAIT) { - usbctlx_wrid_completor_t completor; + struct usbctlx_cmd_completor completor; hfa384x_cmdresult_t wridresult; result = hfa384x_usbctlx_complete_sync(hw, @@ -1654,7 +1652,7 @@ hfa384x_dormem(hfa384x_t *hw, if (result != 0) { kfree(ctlx); } else if (mode == DOWAIT) { - usbctlx_rmem_completor_t completor; + struct usbctlx_rmem_completor completor; result = hfa384x_usbctlx_complete_sync(hw, ctlx, @@ -1744,7 +1742,7 @@ hfa384x_dowmem(hfa384x_t *hw, if (result != 0) { kfree(ctlx); } else if (mode == DOWAIT) { - usbctlx_wmem_completor_t completor; + struct usbctlx_cmd_completor completor; hfa384x_cmdresult_t wmemresult; result = hfa384x_usbctlx_complete_sync(hw, -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/10] driver: staging: wlan-ng: Fixed white spaces issues
In hfa384x_usb.c: Moved Logical continuations to the correct lines Removed unnecessary blank lines Signed-off-by: Sherif Shehab Aldin --- drivers/staging/wlan-ng/hfa384x_usb.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index a6684b6..1a6116a 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -398,9 +398,8 @@ static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) result = -ENOLINK; if (netif_running(netdev)) { - - if (!hw->wlandev->hwremoved - && !test_bit(WORK_TX_HALT, &hw->usb_flags)) { + if (!hw->wlandev->hwremoved && + !test_bit(WORK_TX_HALT, &hw->usb_flags)) { result = SUBMIT_URB(tx_urb, memflags); /* Test whether we need to reset the TX pipe */ @@ -656,7 +655,6 @@ usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp, result->rid = le16_to_cpu(rridresp->rid); result->riddata = rridresp->data; result->riddata_len = ((le16_to_cpu(rridresp->frmlen) - 1) * 2); - } /* @@ -2845,7 +2843,6 @@ static void hfa384x_usbctlx_reaper_task(unsigned long data) } spin_unlock_irqrestore(&hw->ctlxq.lock, flags); - } /* @@ -3706,7 +3703,6 @@ static void hfa384x_usbout_callback(struct urb *urb) #endif if (wlandev && wlandev->netdev) { - switch (urb->status) { case 0: hfa384x_usbout_tx(wlandev, usbout); @@ -3732,8 +3728,8 @@ static void hfa384x_usbout_callback(struct urb *urb) hfa384x_t *hw = wlandev->priv; if (!test_and_set_bit - (THROTTLE_TX, &hw->usb_flags) - && !timer_pending(&hw->throttle)) { + (THROTTLE_TX, &hw->usb_flags) && + !timer_pending(&hw->throttle)) { mod_timer(&hw->throttle, jiffies + THROTTLE_JIFFIES); } -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/10] driver: staging: wlan-ng: Removed #if 0 lines from hfa384x_usb.c
Removed lines that were ignored by #if 0 Signed-off-by: Sherif Shehab Aldin --- drivers/staging/wlan-ng/hfa384x_usb.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index cf27030..867edb4 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -2019,12 +2019,6 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len) HFA384x_ADDR_AUX_MKFLAT(hw->bufinfo.page, hw->bufinfo.offset); pr_debug("dlbuf.page=0x%04x dlbuf.offset=0x%04x dlbufaddr=0x%08x\n", hw->bufinfo.page, hw->bufinfo.offset, dlbufaddr); - -#if 0 - netdev_warn(hw->wlandev->netdev, - "dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, - hw->bufinfo.len, hw->dltimeout); -#endif /* Calculations to determine how many fills of the dlbuffer to do * and how many USB wmemreq's to do for each fill. At this point * in time, the dlbuffer size and the wmemreq size are the same. -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/10] driver: staging: wlan-ng: Removed Unnecessary space after function pointer name
Removed Unnecessary space after function pointer name Signed-off-by: Sherif Shehab Aldin --- drivers/staging/wlan-ng/hfa384x_usb.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 74db234..22f0f1d 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -203,7 +203,7 @@ static int hfa384x_usbctlx_submit(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx); static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx); struct usbctlx_completor { - int (*complete) (struct usbctlx_completor *); + int (*complete)(struct usbctlx_completor *); }; static int -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/10] driver: staging: wlan-ng: Removed multiple assignments
Removed multiple assignments from hfa384x_usb.c Signed-off-by: Sherif Shehab Aldin --- drivers/staging/wlan-ng/hfa384x_usb.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 1a6116a..cf27030 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -2599,7 +2599,8 @@ int hfa384x_drvr_start(hfa384x_t *hw) */ result1 = hfa384x_cmd_initialize(hw); msleep(1000); - result = result2 = hfa384x_cmd_initialize(hw); + result = hfa384x_cmd_initialize(hw); + result2 = result; if (result1 != 0) { if (result2 != 0) { netdev_err(hw->wlandev->netdev, -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/10] driver: staging: wlan-ng: Fixed Alignment to match open parenthesis
Fixed Alignment to match open parenthesis in hfa384x_usb.c Signed-off-by: Sherif Shehab Aldin --- drivers/staging/wlan-ng/hfa384x_usb.c | 121 + 1 file changed, 63 insertions(+), 58 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 22f0f1d..a6684b6 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -350,14 +350,14 @@ static int submit_rx_urb(hfa384x_t *hw, gfp_t memflags) result = -ENOLINK; if (!hw->wlandev->hwremoved && - !test_bit(WORK_RX_HALT, &hw->usb_flags)) { + !test_bit(WORK_RX_HALT, &hw->usb_flags)) { result = SUBMIT_URB(&hw->rx_urb, memflags); /* Check whether we need to reset the RX pipe */ if (result == -EPIPE) { netdev_warn(hw->wlandev->netdev, - "%s rx pipe stalled: requesting reset\n", - hw->wlandev->netdev->name); + "%s rx pipe stalled: requesting reset\n", + hw->wlandev->netdev->name); if (!test_and_set_bit(WORK_RX_HALT, &hw->usb_flags)) schedule_work(&hw->usb_work); } @@ -406,8 +406,8 @@ static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) /* Test whether we need to reset the TX pipe */ if (result == -EPIPE) { netdev_warn(hw->wlandev->netdev, - "%s tx pipe stalled: requesting reset\n", - netdev->name); + "%s tx pipe stalled: requesting reset\n", + netdev->name); set_bit(WORK_TX_HALT, &hw->usb_flags); schedule_work(&hw->usb_work); } else if (result == 0) { @@ -455,11 +455,11 @@ static void hfa384x_usb_defer(struct work_struct *data) ret = usb_clear_halt(hw->usb, hw->endp_in); if (ret != 0) { netdev_err(hw->wlandev->netdev, - "Failed to clear rx pipe for %s: err=%d\n", - netdev->name, ret); + "Failed to clear rx pipe for %s: err=%d\n", + netdev->name, ret); } else { netdev_info(hw->wlandev->netdev, "%s rx pipe reset complete.\n", - netdev->name); + netdev->name); clear_bit(WORK_RX_HALT, &hw->usb_flags); set_bit(WORK_RX_RESUME, &hw->usb_flags); } @@ -472,7 +472,8 @@ static void hfa384x_usb_defer(struct work_struct *data) ret = submit_rx_urb(hw, GFP_KERNEL); if (ret != 0) { netdev_err(hw->wlandev->netdev, - "Failed to resume %s rx pipe.\n", netdev->name); + "Failed to resume %s rx pipe.\n", + netdev->name); } else { clear_bit(WORK_RX_RESUME, &hw->usb_flags); } @@ -486,11 +487,11 @@ static void hfa384x_usb_defer(struct work_struct *data) ret = usb_clear_halt(hw->usb, hw->endp_out); if (ret != 0) { netdev_err(hw->wlandev->netdev, - "Failed to clear tx pipe for %s: err=%d\n", - netdev->name, ret); + "Failed to clear tx pipe for %s: err=%d\n", + netdev->name, ret); } else { netdev_info(hw->wlandev->netdev, "%s tx pipe reset complete.\n", - netdev->name); + netdev->name); clear_bit(WORK_TX_HALT, &hw->usb_flags); set_bit(WORK_TX_RESUME, &hw->usb_flags); @@ -1206,7 +1207,7 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis) result = usb_reset_device(hw->usb); if (result < 0) { netdev_err(hw->wlandev->netdev, "usb_reset_device() failed, result=%d.\n", - result); + result); } return result; @@ -1306,8 +1307,8 @@ cleanup: result = completor->complete(completor); } else { netdev_warn(hw->wlandev->netdev, "CTLX[%d] error: state(%s)\n", - le16_to_cpu(ctlx->outbuf.type), - ctlxstr(ctlx-
[PATCH 10/10] driver: staging: wlan-ng: Removed unnecessary spaces after cast from hfa384x_usb.c
Fixed: No space is necessary after a cast Signed-off-by: Sherif Shehab Aldin --- drivers/staging/wlan-ng/hfa384x_usb.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 867edb4..f0ab5a2 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -673,7 +673,7 @@ static inline int usbctlx_cmd_completor_fn(struct usbctlx_completor *head) { struct usbctlx_cmd_completor *complete; - complete = (struct usbctlx_cmd_completor *) head; + complete = (struct usbctlx_cmd_completor *)head; return usbctlx_get_status(complete->cmdresp, complete->result); } @@ -708,7 +708,7 @@ static int usbctlx_rrid_completor_fn(struct usbctlx_completor *head) struct usbctlx_rrid_completor *complete; hfa384x_rridresult_t rridresult; - complete = (struct usbctlx_rrid_completor *) head; + complete = (struct usbctlx_rrid_completor *)head; usbctlx_get_rridresult(complete->rridresp, &rridresult); /* Validate the length, note body len calculation in bytes */ @@ -2819,7 +2819,7 @@ void hfa384x_tx_timeout(wlandevice_t *wlandev) */ static void hfa384x_usbctlx_reaper_task(unsigned long data) { - hfa384x_t *hw = (hfa384x_t *) data; + hfa384x_t *hw = (hfa384x_t *)data; struct list_head *entry; struct list_head *temp; unsigned long flags; @@ -2856,7 +2856,7 @@ static void hfa384x_usbctlx_reaper_task(unsigned long data) */ static void hfa384x_usbctlx_completion_task(unsigned long data) { - hfa384x_t *hw = (hfa384x_t *) data; + hfa384x_t *hw = (hfa384x_t *)data; struct list_head *entry; struct list_head *temp; unsigned long flags; @@ -3128,7 +3128,7 @@ static void hfa384x_usbin_callback(struct urb *urb) { wlandevice_t *wlandev = urb->context; hfa384x_t *hw; - hfa384x_usbin_t *usbin = (hfa384x_usbin_t *) urb->transfer_buffer; + hfa384x_usbin_t *usbin = (hfa384x_usbin_t *)urb->transfer_buffer; struct sk_buff *skb = NULL; int result; int urb_status; @@ -3456,7 +3456,7 @@ static void hfa384x_usbin_txcompl(wlandevice_t *wlandev, */ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb) { - hfa384x_usbin_t *usbin = (hfa384x_usbin_t *) skb->data; + hfa384x_usbin_t *usbin = (hfa384x_usbin_t *)skb->data; hfa384x_t *hw = wlandev->priv; int hdrlen; struct p80211_rxmeta *rxmeta; @@ -3601,7 +3601,7 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, struct p80211_caphdr *caphdr; /* The NEW header format! */ datap = skb_put(skb, sizeof(struct p80211_caphdr)); - caphdr = (struct p80211_caphdr *) datap; + caphdr = (struct p80211_caphdr *)datap; caphdr->version = htonl(P80211CAPTURE_VERSION); caphdr->length = htonl(sizeof(struct p80211_caphdr)); @@ -3896,7 +3896,7 @@ delresp: */ static void hfa384x_usbctlx_reqtimerfn(unsigned long data) { - hfa384x_t *hw = (hfa384x_t *) data; + hfa384x_t *hw = (hfa384x_t *)data; unsigned long flags; spin_lock_irqsave(&hw->ctlxq.lock, flags); @@ -3954,7 +3954,7 @@ static void hfa384x_usbctlx_reqtimerfn(unsigned long data) */ static void hfa384x_usbctlx_resptimerfn(unsigned long data) { - hfa384x_t *hw = (hfa384x_t *) data; + hfa384x_t *hw = (hfa384x_t *)data; unsigned long flags; spin_lock_irqsave(&hw->ctlxq.lock, flags); @@ -3993,7 +3993,7 @@ static void hfa384x_usbctlx_resptimerfn(unsigned long data) */ static void hfa384x_usb_throttlefn(unsigned long data) { - hfa384x_t *hw = (hfa384x_t *) data; + hfa384x_t *hw = (hfa384x_t *)data; unsigned long flags; spin_lock_irqsave(&hw->ctlxq.lock, flags); -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 1/1] staging: comedi: Fix checkpatch warning
On Fri, Apr 04, 2014 at 10:55:18PM +0200, Camille Begue wrote: > Wrap lines > 80 columns. > This patch is part of eudyptula challenge > > Signed-off-by: Camille Begue > --- > drivers/staging/comedi/comedi_fops.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/comedi/comedi_fops.c > b/drivers/staging/comedi/comedi_fops.c > index ea6dc36..0f05e87 100644 > --- a/drivers/staging/comedi/comedi_fops.c > +++ b/drivers/staging/comedi/comedi_fops.c > @@ -1435,13 +1435,16 @@ static int __comedi_get_user_cmd(struct comedi_device > *dev, > s = &dev->subdevices[cmd->subdev]; > > if (s->type == COMEDI_SUBD_UNUSED) { > - dev_dbg(dev->class_dev, "%d not valid subdevice\n", > cmd->subdev); > + dev_dbg(dev->class_dev, > + "%d not valid subdevice\n", > + cmd->subdev); Why did you split this into 3 lines, it only needs to be 2 like this: dev_dbg(dev->class_dev, "%d not valid subdevice\n", cmd->subdev); thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 1/1] staging: comedi: Fix checkpatch warning
On Sat, Apr 05, 2014 at 03:09:27PM -0700, Greg Kroah-Hartman wrote: > On Fri, Apr 04, 2014 at 10:55:18PM +0200, Camille Begue wrote: > > Wrap lines > 80 columns. > > This patch is part of eudyptula challenge > > > > Signed-off-by: Camille Begue > > --- > > drivers/staging/comedi/comedi_fops.c | 7 +-- > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/staging/comedi/comedi_fops.c > > b/drivers/staging/comedi/comedi_fops.c > > index ea6dc36..0f05e87 100644 > > --- a/drivers/staging/comedi/comedi_fops.c > > +++ b/drivers/staging/comedi/comedi_fops.c > > @@ -1435,13 +1435,16 @@ static int __comedi_get_user_cmd(struct > > comedi_device *dev, > > s = &dev->subdevices[cmd->subdev]; > > > > if (s->type == COMEDI_SUBD_UNUSED) { > > - dev_dbg(dev->class_dev, "%d not valid subdevice\n", > > cmd->subdev); > > + dev_dbg(dev->class_dev, > > + "%d not valid subdevice\n", > > + cmd->subdev); > > Why did you split this into 3 lines, it only needs to be 2 like this: > dev_dbg(dev->class_dev, "%d not valid subdevice\n", > cmd->subdev); Nevermind, you fixed it up later... ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ashmem: Fix coding style
Keep checkpatch happy by addressing the following: CHECK: Alignment should match open parenthesis CHECK: Blank lines aren't necessary after an open brace '{' CHECK: No space is necessary after a cast Signed-off-by: Zi Shen Lim --- drivers/staging/android/ashmem.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index 713a972..d441b65 100644 --- a/drivers/staging/android/ashmem.c +++ b/drivers/staging/android/ashmem.c @@ -447,8 +447,8 @@ ashmem_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) loff_t end = (range->pgend + 1) * PAGE_SIZE; do_fallocate(range->asma->file, - FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, - start, end - start); +FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, +start, end - start); range->purged = ASHMEM_WAS_PURGED; lru_del(range); @@ -549,7 +549,6 @@ static int get_name(struct ashmem_area *asma, void __user *name) mutex_lock(&ashmem_mutex); if (asma->name[ASHMEM_NAME_PREFIX_LEN] != '\0') { - /* * Copying only `len', instead of ASHMEM_NAME_LEN, bytes * prevents us from revealing one user's stack to another. @@ -751,10 +750,10 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) switch (cmd) { case ASHMEM_SET_NAME: - ret = set_name(asma, (void __user *) arg); + ret = set_name(asma, (void __user *)arg); break; case ASHMEM_GET_NAME: - ret = get_name(asma, (void __user *) arg); + ret = get_name(asma, (void __user *)arg); break; case ASHMEM_SET_SIZE: ret = -EINVAL; @@ -775,7 +774,7 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case ASHMEM_PIN: case ASHMEM_UNPIN: case ASHMEM_GET_PIN_STATUS: - ret = ashmem_pin_unpin(asma, cmd, (void __user *) arg); + ret = ashmem_pin_unpin(asma, cmd, (void __user *)arg); break; case ASHMEM_PURGE_ALL_CACHES: ret = -EPERM; @@ -799,7 +798,6 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static long compat_ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - switch (cmd) { case COMPAT_ASHMEM_SET_SIZE: cmd = ASHMEM_SET_SIZE; -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: r8723au: Fix randconfig build errors
The kbuild test robot got the following errors for i386-randconfig-c0-04060652: ERROR: "wiphy_free" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "bridge_tunnel_header" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "ieee80211_frequency_to_channel" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "cfg80211_rx_mgmt" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "ieee80211_channel_to_frequency" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "cfg80211_mgmt_tx_status" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "rfc1042_header" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "__ieee80211_get_channel" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "wiphy_unregister" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "cfg80211_connect_result" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "cfg80211_michael_mic_failure" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "cfg80211_roamed" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "cfg80211_put_bss" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "wiphy_new" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "wiphy_register" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "cfg80211_inform_bss_width_frame" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "cfg80211_disconnected" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "ieee80211_amsdu_to_8023s" [drivers/staging/rtl8723au/r8723au.ko] undefined! ERROR: "cfg80211_scan_done" [drivers/staging/rtl8723au/r8723au.ko] undefined! All of these are fixed by forcing the selection of CFG80211 in Kconfig. Signed-off-by: Larry Finger Cc: Jes Sorensen Cc: kbuild test robot Cc: kbuild-...@01.org --- drivers/staging/rtl8723au/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/rtl8723au/Kconfig b/drivers/staging/rtl8723au/Kconfig index 7f19d15..78e8805 100644 --- a/drivers/staging/rtl8723au/Kconfig +++ b/drivers/staging/rtl8723au/Kconfig @@ -3,6 +3,7 @@ config R8723AU depends on WLAN && USB select WIRELESS_EXT select WEXT_PRIV + select CFG80211 default n ---help--- This option adds the Realtek RTL8723AU USB device such as found in -- 1.8.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: r8723au: Fix randconfig build errors
On Sat, Apr 05, 2014 at 10:48:59PM -0500, Larry Finger wrote: > The kbuild test robot got the following errors for > i386-randconfig-c0-04060652: > > ERROR: "wiphy_free" [drivers/staging/rtl8723au/r8723au.ko] undefined! > ERROR: "bridge_tunnel_header" [drivers/staging/rtl8723au/r8723au.ko] > undefined! > ERROR: "ieee80211_frequency_to_channel" > [drivers/staging/rtl8723au/r8723au.ko] undefined! > ERROR: "cfg80211_rx_mgmt" [drivers/staging/rtl8723au/r8723au.ko] undefined! > ERROR: "ieee80211_channel_to_frequency" > [drivers/staging/rtl8723au/r8723au.ko] undefined! > ERROR: "cfg80211_mgmt_tx_status" [drivers/staging/rtl8723au/r8723au.ko] > undefined! > ERROR: "rfc1042_header" [drivers/staging/rtl8723au/r8723au.ko] undefined! > ERROR: "__ieee80211_get_channel" [drivers/staging/rtl8723au/r8723au.ko] > undefined! > ERROR: "wiphy_unregister" [drivers/staging/rtl8723au/r8723au.ko] undefined! > ERROR: "cfg80211_connect_result" [drivers/staging/rtl8723au/r8723au.ko] > undefined! > ERROR: "cfg80211_michael_mic_failure" [drivers/staging/rtl8723au/r8723au.ko] > undefined! > ERROR: "cfg80211_roamed" [drivers/staging/rtl8723au/r8723au.ko] undefined! > ERROR: "cfg80211_put_bss" [drivers/staging/rtl8723au/r8723au.ko] undefined! > ERROR: "wiphy_new" [drivers/staging/rtl8723au/r8723au.ko] undefined! > ERROR: "wiphy_register" [drivers/staging/rtl8723au/r8723au.ko] undefined! > ERROR: "cfg80211_inform_bss_width_frame" > [drivers/staging/rtl8723au/r8723au.ko] undefined! > ERROR: "cfg80211_disconnected" [drivers/staging/rtl8723au/r8723au.ko] > undefined! > ERROR: "ieee80211_amsdu_to_8023s" [drivers/staging/rtl8723au/r8723au.ko] > undefined! > ERROR: "cfg80211_scan_done" [drivers/staging/rtl8723au/r8723au.ko] undefined! > > All of these are fixed by forcing the selection of CFG80211 in Kconfig. > > Signed-off-by: Larry Finger > Cc: Jes Sorensen > Cc: kbuild test robot This should have been "Reported-by:" I'll fix that up by hand... ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3.14.0/linux-next]: staging/line6: playback.c style corrections
From: Sami Laine Five coding style corrections to drivers/staging/line6/playback.c. Signed-Off-by: Sami Laine --- --- linux-next/drivers/staging/line6/playback.c.orig2014-04-06 08:19:30.190381250 +0300 +++ linux-next/drivers/staging/line6/playback.c 2014-04-06 08:27:25.721393581 +0300 @@ -34,6 +34,7 @@ static void change_volume(struct urb *ur if (bytes_per_frame == 4) { short *p, *buf_end; + p = (short *)urb_out->transfer_buffer; buf_end = p + urb_out->transfer_buffer_length / sizeof(*p); @@ -48,6 +49,7 @@ static void change_volume(struct urb *ur for (; p < buf_end; p += 3) { int val; + val = p[0] + (p[1] << 8) + ((signed char)p[2] << 16); val = (val * volume[chn & 1]) >> 8; p[0] = val; @@ -116,6 +118,7 @@ static void add_monitor_signal(struct ur if (bytes_per_frame == 4) { short *pi, *po, *buf_end; + pi = (short *)signal; po = (short *)urb_out->transfer_buffer; buf_end = po + urb_out->transfer_buffer_length / sizeof(*po); @@ -171,6 +174,7 @@ static int submit_audio_out_urb(struct s if (fsize == 0) { int n; + line6pcm->count_out += frame_increment; n = line6pcm->count_out / frame_factor; line6pcm->count_out -= n * frame_factor; @@ -207,6 +211,7 @@ static int submit_audio_out_urb(struct s copy the data to the temp buffer. */ int len; + len = runtime->buffer_size - line6pcm->pos_out; if (len > 0) { ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel