[PATCH 1/1] staging: iio: Coding style issues fix.
Fix some little style issues in drivers/staging/iio/frequency/ad9832.c . This is my latest task of the eudyptula challenge (third attempt!) Signed-off-by: Federico Di Pierro --- drivers/staging/iio/frequency/ad9832.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c index c7d0307..b7c8351 100644 --- a/drivers/staging/iio/frequency/ad9832.c +++ b/drivers/staging/iio/frequency/ad9832.c @@ -57,7 +57,7 @@ static int ad9832_write_frequency(struct ad9832_state *st, } static int ad9832_write_phase(struct ad9832_state *st, - unsigned long addr, unsigned long phase) + unsigned long addr, unsigned long phase) { if (phase > (1 << AD9832_PHASE_BITS)) return -EINVAL; @@ -72,10 +72,8 @@ static int ad9832_write_phase(struct ad9832_state *st, return spi_sync(st->spi, &st->phase_msg); } -static ssize_t ad9832_write(struct device *dev, - struct device_attribute *attr, - const char *buf, - size_t len) +static ssize_t ad9832_write(struct device *dev, struct device_attribute *attr, + const char *buf, size_t len) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ad9832_state *st = iio_priv(indio_dev); @@ -109,11 +107,11 @@ static ssize_t ad9832_write(struct device *dev, ret = spi_sync(st->spi, &st->msg); break; case AD9832_FREQ_SYM: - if (val == 1) + if (val == 1) { st->ctrl_fp |= AD9832_FREQ; - else if (val == 0) + } else if (val == 0) { st->ctrl_fp &= ~AD9832_FREQ; - else { + } else { ret = -EINVAL; break; } -- 2.0.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: iio: hmc5843: Add all available models to device tree id table.
On 27/06/14 21:48, Belisko Marek wrote: PIng? Jonathan do you have any objections to this approach? Can you please pick it? Thx. Sorry, this one dropped through the cracks. Applied to the togreg branch of iio.git along with the documentation patch that goes with it. Jonathan On Tue, Feb 18, 2014 at 9:35 PM, Belisko Marek wrote: Hi Jonathan, On Tue, Feb 18, 2014 at 11:40 AM, Jonathan Cameron wrote: On 14/02/14 14:25, Marek Belisko wrote: Signed-off-by: Marek Belisko I wonder how this got missed. However, for those data elements to be useful, you will need to read them somewhere in the driver I think (if there is any magic that puts this in the relevant i2c locations then point it out to me!) There is a table called hmc5843_chip_info_tbl which contains entries for all models which this driver can handle. And magic is that correct model variant is set probe function: line: idata->variant = &hmc5843_chip_info_tbl[id->driver_data]; (id->driver_data contains model value). --- drivers/staging/iio/magnetometer/hmc5843.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c index d4f4dd9..f595fdc 100644 --- a/drivers/staging/iio/magnetometer/hmc5843.c +++ b/drivers/staging/iio/magnetometer/hmc5843.c @@ -630,7 +630,9 @@ static const struct i2c_device_id hmc5843_id[] = { MODULE_DEVICE_TABLE(i2c, hmc5843_id); static const struct of_device_id hmc5843_of_match[] = { - { .compatible = "honeywell,hmc5843" }, + { .compatible = "honeywell,hmc5843", .data = (void *)HMC5843_ID }, + { .compatible = "honeywell,hmc5883", .data = (void *)HMC5883_ID }, + { .compatible = "honeywell,hmc5883l", .data = (void *)HMC5883L_ID }, {} }; MODULE_DEVICE_TABLE(of, hmc5843_of_match); BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com BR, marek ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: iio: Coding style issues fix.
On 29/06/14 10:41, Federico Di Pierro wrote: Fix some little style issues in drivers/staging/iio/frequency/ad9832.c . This is my latest task of the eudyptula challenge (third attempt!) Signed-off-by: Federico Di Pierro I'd have preferred more meaty work on this driver, but I guess every little bit helps... Applied to the togreg branch of iio.git Thanks, --- drivers/staging/iio/frequency/ad9832.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c index c7d0307..b7c8351 100644 --- a/drivers/staging/iio/frequency/ad9832.c +++ b/drivers/staging/iio/frequency/ad9832.c @@ -57,7 +57,7 @@ static int ad9832_write_frequency(struct ad9832_state *st, } static int ad9832_write_phase(struct ad9832_state *st, - unsigned long addr, unsigned long phase) + unsigned long addr, unsigned long phase) { if (phase > (1 << AD9832_PHASE_BITS)) return -EINVAL; @@ -72,10 +72,8 @@ static int ad9832_write_phase(struct ad9832_state *st, return spi_sync(st->spi, &st->phase_msg); } -static ssize_t ad9832_write(struct device *dev, - struct device_attribute *attr, - const char *buf, - size_t len) +static ssize_t ad9832_write(struct device *dev, struct device_attribute *attr, + const char *buf, size_t len) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ad9832_state *st = iio_priv(indio_dev); @@ -109,11 +107,11 @@ static ssize_t ad9832_write(struct device *dev, ret = spi_sync(st->spi, &st->msg); break; case AD9832_FREQ_SYM: - if (val == 1) + if (val == 1) { st->ctrl_fp |= AD9832_FREQ; - else if (val == 0) + } else if (val == 0) { st->ctrl_fp &= ~AD9832_FREQ; - else { + } else { ret = -EINVAL; break; } ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: Anybody working on tidspbridge?
On Fri, Jun 20, 2014 at 07:05:17PM +0300, Kristina Martšenko wrote: > On 20/06/14 18:43, Kristina Martšenko wrote: > > Hi Omar, > > > > I'm helping Greg do a bit of cleanup in the staging tree. I noticed that > > nobody seems to have worked towards moving tidspbridge out of staging in > > over a year. Are there any plans to clean it up and move it out soon? > > Because otherwise we're going to have to delete the driver, as we don't > > want staging to become a permanent place for unfinished code. > > > > Thanks, > > Kristina > > Omar's email address in tidspbridge's TODO file seems to be outdated. > Resending to more recent addresses which hopefully won't bounce. Given the total lack of response here, I suggest just deleting the driver. No one has ever done the "real work" that is going to be required to get this code out of staging. It has had build errors causing it to not even be usable for some kernel versions with no one noticing, so I doubt anyone cares about it anymore here. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: media: msi3101: sdr-msi3101.c - replace with time_before_eq()
Moikka! That is already fixed by someone else and patch is somewhere Mauro or Hans queue. regards Antti On 06/29/2014 08:20 AM, Anil Belur wrote: From: Anil Belur - this fix replaces jiffies interval comparision with safer function to avoid any overflow and wrap around ? Signed-off-by: Anil Belur --- drivers/staging/media/msi3101/sdr-msi3101.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/msi3101/sdr-msi3101.c b/drivers/staging/media/msi3101/sdr-msi3101.c index 08d0d09..b828857 100644 --- a/drivers/staging/media/msi3101/sdr-msi3101.c +++ b/drivers/staging/media/msi3101/sdr-msi3101.c @@ -180,6 +180,7 @@ static int msi3101_convert_stream_504(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -208,7 +209,8 @@ static int msi3101_convert_stream_504(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + expires = s->jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; @@ -332,6 +334,7 @@ static int msi3101_convert_stream_384(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -360,7 +363,8 @@ static int msi3101_convert_stream_384(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + expires = s->jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; @@ -397,6 +401,7 @@ static int msi3101_convert_stream_336(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -425,7 +430,8 @@ static int msi3101_convert_stream_336(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + expires = s->jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; @@ -460,6 +466,7 @@ static int msi3101_convert_stream_252(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -488,7 +495,8 @@ static int msi3101_convert_stream_252(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + expires = s->jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; -- http://palosaari.fi/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/5] staging: octeon-usb: drop dequeue tasklet
Cancel requests synchronously instead of using the dequeue tasklet. Signed-off-by: Aaro Koskinen --- drivers/staging/octeon-usb/octeon-hcd.c | 38 + 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index c4c731f..fca4d34 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -422,8 +422,6 @@ struct cvmx_usb_state { struct octeon_hcd { spinlock_t lock; struct cvmx_usb_state usb; - struct tasklet_struct dequeue_tasklet; - struct list_head dequeue_list; }; /* This macro spins on a field waiting for it to reach a value */ @@ -2167,15 +2165,6 @@ static void octeon_usb_urb_complete_callback(struct cvmx_usb_state *usb, urb->actual_length = bytes_transferred; urb->hcpriv = NULL; - if (!list_empty(&urb->urb_list)) - /* -* It is on the dequeue_list, but we are going to call -* usb_hcd_giveback_urb(), so we must clear it from -* the list. We got to it before the -* octeon_usb_urb_dequeue_work() tasklet did. -*/ - list_del_init(&urb->urb_list); - /* For Isochronous transactions we need to update the URB packet status list from data in our private copy */ if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) { @@ -3304,7 +3293,6 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd, struct usb_host_endpoint *ep = urb->ep; urb->status = 0; - INIT_LIST_HEAD(&urb->urb_list); /* not enqueued on dequeue_list */ spin_lock_irqsave(&priv->lock, flags); if (!ep->hcpriv) { @@ -3461,23 +3449,6 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd, return 0; } -static void octeon_usb_urb_dequeue_work(unsigned long arg) -{ - struct urb *urb; - struct urb *next; - unsigned long flags; - struct octeon_hcd *priv = (struct octeon_hcd *)arg; - - spin_lock_irqsave(&priv->lock, flags); - - list_for_each_entry_safe(urb, next, &priv->dequeue_list, urb_list) { - list_del_init(&urb->urb_list); - cvmx_usb_cancel(&priv->usb, urb->ep->hcpriv, urb->hcpriv); - } - - spin_unlock_irqrestore(&priv->lock, flags); -} - static int octeon_usb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) @@ -3491,12 +3462,10 @@ static int octeon_usb_urb_dequeue(struct usb_hcd *hcd, spin_lock_irqsave(&priv->lock, flags); urb->status = status; - list_add_tail(&urb->urb_list, &priv->dequeue_list); + cvmx_usb_cancel(&priv->usb, urb->ep->hcpriv, urb->hcpriv); spin_unlock_irqrestore(&priv->lock, flags); - tasklet_schedule(&priv->dequeue_tasklet); - return 0; } @@ -3868,10 +3837,6 @@ static int octeon_usb_probe(struct platform_device *pdev) spin_lock_init(&priv->lock); - tasklet_init(&priv->dequeue_tasklet, octeon_usb_urb_dequeue_work, -(unsigned long)priv); - INIT_LIST_HEAD(&priv->dequeue_list); - status = cvmx_usb_initialize(&priv->usb, usb_num, initialize_flags); if (status) { dev_dbg(dev, "USB initialization failed with %d\n", status); @@ -3908,7 +3873,6 @@ static int octeon_usb_remove(struct platform_device *pdev) unsigned long flags; usb_remove_hcd(hcd); - tasklet_kill(&priv->dequeue_tasklet); spin_lock_irqsave(&priv->lock, flags); status = cvmx_usb_shutdown(&priv->usb); spin_unlock_irqrestore(&priv->lock, flags); -- 2.0.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/5] staging: octeon-usb: use usb_hcd_link_urb_to_ep()
The driver did not use link_urb_to_ep() / unlink_urb_from_ep(). This caused odd behaviour in some error recovery situations, all requests would start to fail after the first failure. Signed-off-by: Aaro Koskinen --- drivers/staging/octeon-usb/octeon-hcd.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index fca4d34..ab237c5 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -2230,6 +2230,7 @@ static void octeon_usb_urb_complete_callback(struct cvmx_usb_state *usb, urb->status = -EPROTO; break; } + usb_hcd_unlink_urb_from_ep(octeon_to_hcd(priv), urb); spin_unlock(&priv->lock); usb_hcd_giveback_urb(octeon_to_hcd(priv), urb, urb->status); spin_lock(&priv->lock); @@ -3291,10 +3292,17 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd, unsigned long flags; struct cvmx_usb_iso_packet *iso_packet; struct usb_host_endpoint *ep = urb->ep; + int rc; urb->status = 0; spin_lock_irqsave(&priv->lock, flags); + rc = usb_hcd_link_urb_to_ep(hcd, urb); + if (rc) { + spin_unlock_irqrestore(&priv->lock, flags); + return rc; + } + if (!ep->hcpriv) { enum cvmx_usb_transfer transfer_type; enum cvmx_usb_speed speed; @@ -3370,6 +3378,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd, >> 11) & 0x3, split_device, split_port); if (!pipe) { + usb_hcd_unlink_urb_from_ep(hcd, urb); spin_unlock_irqrestore(&priv->lock, flags); dev_dbg(dev, "Failed to create pipe\n"); return -ENOMEM; @@ -3440,6 +3449,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd, break; } if (!transaction) { + usb_hcd_unlink_urb_from_ep(hcd, urb); spin_unlock_irqrestore(&priv->lock, flags); dev_dbg(dev, "Failed to submit\n"); return -ENOMEM; @@ -3455,18 +3465,24 @@ static int octeon_usb_urb_dequeue(struct usb_hcd *hcd, { struct octeon_hcd *priv = hcd_to_octeon(hcd); unsigned long flags; + int rc; if (!urb->dev) return -EINVAL; spin_lock_irqsave(&priv->lock, flags); + rc = usb_hcd_check_unlink_urb(hcd, urb, status); + if (rc) + goto out; + urb->status = status; cvmx_usb_cancel(&priv->usb, urb->ep->hcpriv, urb->hcpriv); +out: spin_unlock_irqrestore(&priv->lock, flags); - return 0; + return rc; } static void octeon_usb_endpoint_disable(struct usb_hcd *hcd, -- 2.0.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/5] staging: octeon-usb: don't retry on data toggle error
On data toggle error, we don't know if and how many bytes were successfully transferred by DMA. We should just fail the transaction instead of trying a retry. Signed-off-by: Aaro Koskinen --- drivers/staging/octeon-usb/octeon-hcd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index ab237c5..59cf921 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -2840,8 +2840,9 @@ static int __cvmx_usb_poll_channel(struct cvmx_usb_state *usb, int channel) __cvmx_usb_perform_complete(usb, pipe, transaction, CVMX_USB_COMPLETE_BABBLEERR); } else if (usbc_hcint.s.datatglerr) { - /* We'll retry the exact same transaction again */ - transaction->retries++; + /* Data toggle error */ + __cvmx_usb_perform_complete(usb, pipe, transaction, + CVMX_USB_COMPLETE_DATATGLERR); } else if (usbc_hcint.s.nyet) { /* * NYET as a response is only allowed in three cases: as a -- 2.0.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/5] staging: octeon-usb: fix endianness bug
wHubCharacteristics gets wrong value on big-endian CPUs. Signed-off-by: Aaro Koskinen --- drivers/staging/octeon-usb/octeon-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index a65b708..095cc14 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -3628,7 +3628,7 @@ static int octeon_usb_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, desc->bDescLength = 9; desc->bDescriptorType = 0x29; desc->bNbrPorts = 1; - desc->wHubCharacteristics = 0x08; + desc->wHubCharacteristics = cpu_to_le16(0x08); desc->bPwrOn2PwrGood = 1; desc->bHubContrCurrent = 0; desc->u.hs.DeviceRemovable[0] = 0; -- 2.0.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/5] staging: octeon-usb: return transferred bytes only on success
Return transferred bytes only when transfer was successful. Signed-off-by: Aaro Koskinen --- drivers/staging/octeon-usb/octeon-hcd.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index 59cf921..a65b708 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -2162,7 +2162,11 @@ static void octeon_usb_urb_complete_callback(struct cvmx_usb_state *usb, struct usb_hcd *hcd = octeon_to_hcd(priv); struct device *dev = hcd->self.controller; - urb->actual_length = bytes_transferred; + if (likely(status == CVMX_USB_COMPLETE_SUCCESS)) + urb->actual_length = bytes_transferred; + else + urb->actual_length = 0; + urb->hcpriv = NULL; /* For Isochronous transactions we need to update the URB packet status -- 2.0.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/3] staging: cxt1e1: Remove useless OS_phystov() and OS_vtophys()
On Fri, Jun 27, 2014 at 06:52:26PM +0900, Daeseok Youn wrote: > OS_phystov()/OS_vtophys() are replaced with __va()/__pa(). No, you should use virt_to_phys() and phys_to_virt() instead of these internal macros which might not be correct for all architectures. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8188eu: re-use mac_pton() and hex2bin() helpers
On Fri, Jun 27, 2014 at 04:53:32PM +0300, Andy Shevchenko wrote: > The helper mac_pton() validates and converts MAC address from string format to > a number. Originally code uses simple code to do that. With mac_pton() the > driver now validates input as well. > > MEanwhile hex2bin() converts hexdecimal strings to its binary representation. > As the other helper it validates the input. > > Signed-off-by: Andy Shevchenko You are doing a lot of different things all at once here in this patch. Please break it up into doing "one thing per patch" series and resubmit. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/3] staging: cxt1e1: count fragmented packet properly.
On Fri, Jun 27, 2014 at 06:56:08PM +0900, Daeseok Youn wrote: > OS_mem_token_tlen() is same return value as OS_mem_token_len(). > That means packet count is always 1. So OS_mem_token_tlen() > must be total length of packet and OS_mem_token_len() has a > length of fragmented packet. And then it can count total > count of fragmented packets properly. > > And OS_mem_token_next() returns NULL, it will be dereferencing > a NULL pointer. So it must return next fragmented packet buffer as > sk_buff. > > Signed-off-by: Daeseok Youn > --- > I'm not sure of this patch and not tested.(just only build test). > Please review for this. > Thanks. Please refresh these last two based on the changes in the first one you should do. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: media: msi3101: sdr-msi3101.c - replace with time_before_eq()
On Monday 30 June 2014 12:47 AM, Antti Palosaari wrote: > Moikka! > That is already fixed by someone else and patch is somewhere Mauro or > Hans queue. > > regards > Antti > Moikka :) Ah no worries - I could not find the changes with the latest updates. Thanks ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: Anybody working on gdm72xx?
On Sat, Jun 28, 2014 at 2:49 AM, Michalis Pappas wrote: > > Hi Ben, > > would you be interested to work on this driver together? My reviewing > process is a bit slow as this is the first driver I'm going through and > I would like to understand how everything works in detail. I was > planning to submit a series of patches once I finished my review and got > my hands on some hardware for testing. > > On the other hand, if you would like to take over on your own, I am > happy to share my progress so far and switch to another driver (I have > the et131x in mind if it turns out that no one else is working on it). > > Thanks, > > Michalis > Hi Michalis, Thanks for your help. I'm happy to collaborate if you're interested too. I'm not the author of the driver, so my knowledge is limited to what I've read from the code and how we use it on Chrome OS. But I do have the hardware for testing certain portions (e.g. USB but not SDIO) of the driver. And I can help review and test patches. Excluding those false positives, most of the checkpatch warnings are now fixed. The remaining tasks include adding help messages to Kconfig and commenting the spinlock usage in the code. They are not done yet as I have to read and understand the code first. Thanks, Ben ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/3] staging: cxt1e1: Remove useless OS_phystov() and OS_vtophys()
Hi, Greg. 2014-06-30 6:21 GMT+09:00 Greg KH : > On Fri, Jun 27, 2014 at 06:52:26PM +0900, Daeseok Youn wrote: >> OS_phystov()/OS_vtophys() are replaced with __va()/__pa(). > > No, you should use virt_to_phys() and phys_to_virt() instead of these > internal macros which might not be correct for all architectures. OK, I will send this again after changing __pa/__va. Thanks. regards, Daeseok Youn > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/3] staging: cxt1e1: count fragmented packet properly.
2014-06-30 6:22 GMT+09:00 Greg KH : > On Fri, Jun 27, 2014 at 06:56:08PM +0900, Daeseok Youn wrote: >> OS_mem_token_tlen() is same return value as OS_mem_token_len(). >> That means packet count is always 1. So OS_mem_token_tlen() >> must be total length of packet and OS_mem_token_len() has a >> length of fragmented packet. And then it can count total >> count of fragmented packets properly. >> >> And OS_mem_token_next() returns NULL, it will be dereferencing >> a NULL pointer. So it must return next fragmented packet buffer as >> sk_buff. >> >> Signed-off-by: Daeseok Youn >> --- >> I'm not sure of this patch and not tested.(just only build test). >> Please review for this. >> Thanks. > > Please refresh these last two based on the changes in the first one you > should do. OK. I will sent these again after fixing 1/3. thanks. Daeseok Youn. > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH next-20140627] drivers/staging/rts5208/rtsx.c: sparse warning corrections
From: Sami Laine Sparse warning corrections for incorrect printk format characters. Signed-off-by: Sami Laine --- diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index c0a0e60..e0e8693 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -463,14 +463,14 @@ static int rtsx_control_thread(void *__dev) * the maximum known LUN */ else if (chip->srb->device->id) { - dev_err(&dev->pci->dev, "Bad target number (%d:%d)\n", + dev_err(&dev->pci->dev, "Bad target number (%d:%llu)\n", chip->srb->device->id, chip->srb->device->lun); chip->srb->result = DID_BAD_TARGET << 16; } else if (chip->srb->device->lun > chip->max_lun) { - dev_err(&dev->pci->dev, "Bad LUN (%d:%d)\n", + dev_err(&dev->pci->dev, "Bad LUN (%d:%llu)\n", chip->srb->device->id, chip->srb->device->lun); chip->srb->result = DID_BAD_TARGET << 16; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] hyperv: remove meaningless pr_err() in vmbus_recvpacket_raw()
All its callers depends on the return value of -ENOBUFS to reallocate a bigger buffer and retry the receiving. So there's no need to call pr_err() here since it was not a real issue, otherwise syslog will be flooded by this false warning. Cc: K. Y. Srinivasan Cc: Haiyang Zhang Signed-off-by: Jason Wang --- drivers/hv/channel.c |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 284cf66..531a593 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -808,12 +808,8 @@ int vmbus_recvpacket_raw(struct vmbus_channel *channel, void *buffer, *buffer_actual_len = packetlen; - if (packetlen > bufferlen) { - pr_err("Buffer too small - needed %d bytes but " - "got space for only %d bytes\n", - packetlen, bufferlen); + if (packetlen > bufferlen) return -ENOBUFS; - } *requestid = desc.trans_id; -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH next-20140627] drivers/staging/media/solo6x10: sparse warning corrections
From: Sami Laine Sparse warning correction: CHECK drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c drivers/staging/media/solo6x10/solo6x10-jpeg.h:113:21: warning: symbol 'jpeg_dqt ' was not declared. Should it be static? The symbol jpeg_dqt is used just in solo6x10-v4l2-enc.c, so I think it makes sense to declare it static, which suppresses the sparse warning. Signed-off-by: Sami Laine --- diff --git a/drivers/staging/media/solo6x10/solo6x10-jpeg.h b/drivers/staging/me index c5218ce..9e41185 100644 --- a/drivers/staging/media/solo6x10/solo6x10-jpeg.h +++ b/drivers/staging/media/solo6x10/solo6x10-jpeg.h @@ -110,7 +110,7 @@ static const unsigned char jpeg_header[] = { /* This is the byte marker for the start of the DQT */ #define DQT_START 17 #define DQT_LEN138 -const unsigned char jpeg_dqt[4][DQT_LEN] = { +static const unsigned char jpeg_dqt[4][DQT_LEN] = { { 0xff, 0xdb, 0x00, 0x43, 0x00, 0x08, 0x06, 0x06, 0x07, 0x06, 0x05, 0x08, 0x07, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/3 V2] staging: cxt1e1: Remove useless OS_phystov() and OS_vtophys()
OS_phystov()/OS_vtophys() are replaced with phys_to_virt()/virt_to_phys(). Signed-off-by: Daeseok Youn --- V2: use virt_to_phys()/phys_to_virt() instead of __pa()/__va(). drivers/staging/cxt1e1/musycc.c | 16 drivers/staging/cxt1e1/pmcc4_drv.c | 12 ++-- drivers/staging/cxt1e1/sbecom_inline_linux.h | 19 --- 3 files changed, 14 insertions(+), 33 deletions(-) diff --git a/drivers/staging/cxt1e1/musycc.c b/drivers/staging/cxt1e1/musycc.c index 9495c0b..0ae62b3 100644 --- a/drivers/staging/cxt1e1/musycc.c +++ b/drivers/staging/cxt1e1/musycc.c @@ -103,7 +103,7 @@ musycc_dump_rxbuffer_ring_locked(mch_t *ch) if (m->data) #endif { - dp = (u_int32_t *)OS_phystov((void *)(le32_to_cpu(m->data))); + dp = phys_to_virt(le32_to_cpu(m->data)); if (len >= 0x10) pr_info("%x[%x]: %08X %08X %08X %08x\n", (u_int32_t)dp, len, @@ -173,7 +173,7 @@ musycc_dump_txbuffer_ring_locked(mch_t *ch) len = status & LENGTH_MASK; if (m->data) { - dp = (u_int32_t *)OS_phystov((void *)(le32_to_cpu(m->data))); + dp = phys_to_virt(le32_to_cpu(m->data)); if (len >= 0x10) pr_info("%x[%x]: %08X %08X %08X %08x\n", (u_int32_t) dp, len, @@ -328,7 +328,7 @@ musycc_update_tx_thp(mch_t *ch) musycc_bh_tx_eom(ch->up, ch->gchan); } md = ch->txd_irq_srv; - ch->up->regram->thp[ch->gchan] = cpu_to_le32(OS_vtophys(md)); + ch->up->regram->thp[ch->gchan] = cpu_to_le32(virt_to_phys(md)); FLUSH_MEM_WRITE(); if (ch->tx_full) { @@ -729,7 +729,7 @@ musycc_chan_proto(int proto) static void __init musycc_init_port(mpi_t *pi) { - pci_write_32((u_int32_t *) &pi->reg->gbp, OS_vtophys(pi->regram)); + pci_write_32((u_int32_t *) &pi->reg->gbp, virt_to_phys(pi->regram)); pi->regram->grcd = __constant_cpu_to_le32(MUSYCC_GRCD_RX_ENABLE | @@ -817,7 +817,7 @@ musycc_init(ci_t *ci) ci->regram = ci->port[0].regram; musycc_serv_req(&ci->port[0], SR_CHIP_RESET); - pci_write_32((u_int32_t *) &ci->reg->gbp, OS_vtophys(ci->regram)); + pci_write_32((u_int32_t *) &ci->reg->gbp, virt_to_phys(ci->regram)); pci_flush_write(ci); #ifdef CONFIG_SBE_PMCC4_NCOMM ci->regram->__glcd = __constant_cpu_to_le32(GCD_MAGIC); @@ -827,7 +827,7 @@ musycc_init(ci_t *ci) MUSYCC_GCD_INTB_DISABLE); #endif - ci->regram->__iqp = cpu_to_le32(OS_vtophys(&ci->iqd_p[0])); + ci->regram->__iqp = cpu_to_le32(virt_to_phys(&ci->iqd_p[0])); ci->regram->__iql = __constant_cpu_to_le32(INT_QUEUE_SIZE - 1); pci_write_32((u_int32_t *) &ci->reg->dacbp, 0); FLUSH_MEM_WRITE(); @@ -1045,7 +1045,7 @@ musycc_bh_rx_eom(mpi_t *pi, int gchan) if (m2) { /* substitute the mbuf+cluster */ md->mem_token = m2; - md->data = cpu_to_le32(OS_vtophys( + md->data = cpu_to_le32(virt_to_phys( OS_mem_token_data(m2))); /* pass the received mbuf upward */ @@ -1698,7 +1698,7 @@ musycc_start_xmit(ci_t *ci, int channum, void *mem_token) */ md->mem_token = len ? NULL : mem_token; - md->data = cpu_to_le32(OS_vtophys(OS_mem_token_data(m2))); + md->data = cpu_to_le32(virt_to_phys(OS_mem_token_data(m2))); FLUSH_MEM_WRITE(); md->status = cpu_to_le32(u); --ch->txd_free; diff --git a/drivers/staging/cxt1e1/pmcc4_drv.c b/drivers/staging/cxt1e1/pmcc4_drv.c index 76bebdd..02f6770 100644 --- a/drivers/staging/cxt1e1/pmcc4_drv.c +++ b/drivers/staging/cxt1e1/pmcc4_drv.c @@ -919,7 +919,7 @@ c4_set_port (ci_t *ci, int portnum) pci_write_32 ((u_int32_t *) &ci->cpldbase->mclk, clck); pci_write_32 ((u_int32_t *) &ci->cpldbase->mcsr, PMCC4_CPLD_MCSR_IND); -pci_write_32 ((u_int32_t *) &pi->reg->gbp, OS_vtophys (pi->regram)); +pci_write_32 ((u_int32_t *) &pi->reg->gbp, virt_to_phys(pi->regram)); /*/ /* ERRATA: If transparent mode is used, do not set OOFMP_DISABLE bit */ @@ -1355,7 +1355,7 @@ c4_chan_up (ci_t *ci, int channum) { md->