Meine reagiert
Sehr geehrter Herr. Entschuldigen Sie meine Stцrung; Mein Name ist Lieutenant Andrew Ferrara, derzeit bin ich im aktiven Dienst in Afghanistan. Bitte, muss ich eine verdeckt Business-Angebot, die von gegenseitigem Nutzen fьr uns beide werden. Am Samstag 20. Juli, meine Kollegen und ich abgefangen einen radikalen Taliban-Kurier transportieren groЯe Mengen von Mitteln und auf diesem unglьcklichen Vorfall; Wir aufgerundet insgesamt 11,9 Millionen US-Dollar US-Dollar. Nach eingehender Erцrterung mit meinem Zug kamen wir zu einem Abschluss, wenn die Mittel der afghanischen Polizei ьbergeben werden, gibt es die Mцglichkeit, dass die Mittel fьr ihren eigenen Verbrauch beschlagnahmt werden werden. Daher war es meine Pflicht, einen Partner zu finden, der dieser Fonds zum Wohle von uns allen erhalten. Mit aller gebotenen Demut, ich will, dass du unsere Partner bei der Aufnahme dieses Mittel sein. Die Mittel aus diesem Land durch eine Luft-Fracht-Transportmittel verschoben werden, und alles, was Sie hierzu verpflichtet ist, die Mittel vertraulich fьr gegenseitigen Vorteil erhalten. Seien Sie versichert, dass dieser Fonds sorgfдltig eingedдmmt worden ist und keine Notwendigkeit der Quelle sorgen besteht, da wir nicht alles tun wird, die Probleme werden zu Ihnen bringen oder uns zurьckgefьhrt. Fьr Ihre ehrliche Teilnahme in diesem Geschдft sind wir bereit, sie in drei gleich groЯe Teile aufgeteilt und Sie halten einerseits fьr sich selbst und den Rest, die Sie senden, wo ich Sie unterrichten wird. Sir, bitte es geht nicht um das Geld, sondern die Tatsache, dass bei dieser Fonds werden es wahrscheinlich verwendet werden, um weitere Waffen kaufen und dazu fьhren, dass mehr tцten hier zurьckgegeben. Ich komme aus einer Generation von militдrisches Personal und ich weiЯ, dass mein Wort mein Leben ist, aber das aus der hand hier langsam wird und ich muss, also bitte tun, wenn Sie nicht mit uns zusammenarbeiten mцchten, kann ich verstehen. Siehe Link um mehr ьber meine Familie zu erfahren; http://www.huffingtonpost.com/2011/11/10/andrew-ferrara-soldier_n_1086991.html?icid=maing-grid7%7Cmain5%7Cdl1%7Csec1_lnk2%7C111643 Wenn Sie bereit sind, bitte senden Sie mir eine Email ASaP mit Ihrem Kontakt Telefon und Adresse an diese e-Mail-Adresse aus vertraulichen Grьnden: andrewferr...@rocketmail.com. Ihnen aufrichtig Lieutenant Andrew Ferrara andrewferr...@rocketmail.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: dgnc: tty.c: fixes pointer syntax
On Wed, Aug 21, 2013 at 01:27:15PM -0400, Lidza Louina wrote: This patch fixes the error: foo* bar should be foo *bar. I have a nit pick about this changelog. It's not something to resend over, of course, but for future patches. The word fix should only be used for bugfixes. The word clean up is the opposite and should not be used for changes which affect how the code works. It's pretty much kernel standard to separate fixes and cleanups as two different things. https://www.google.com/search?q=fix+clean+ups+linux+kernel A syntax error means something that breaks the compile. So I was expecting a fix for the compile. A better subject would be: [PATCH] staging: dgnc: tty.c: clean up pointer white space regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 08/12] staging: dgap: tty.c: fixes ioctl param list
On Wed, Aug 21, 2013 at 09:48:38PM -0400, Lidza Louina wrote: The declaration for the ioctl function has changed. The previous version of this declaration took struct file *file as a parameter and the new one does not. This patch removes that parameter. It also removes cases for the commands TIOCGETP TCGETS and TCGETA. These should be in two separate patches. Normally I would say to resend it, but since this driver doesn't compile I don't care very much. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V3] i2c: move of helpers into the core
On Thu, Aug 22, 2013 at 06:00:14PM +0200, Wolfram Sang wrote: I2C of helpers used to live in of_i2c.c but experience (from SPI) shows that it is much cleaner to have this in the core. This also removes a circular dependency between the helpers and the core, and so we can finally register child nodes in the core instead of doing this manually in each driver. So, fix the drivers and documentation, too. Acked-by: Rob Herring rob.herr...@calxeda.com Reviewed-by: Felipe Balbi ba...@ti.com Acked-by: Rafael J. Wysocki rafael.j.wyso...@intel.com Tested-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Wolfram Sang w...@the-dreams.de Applied to for-next! signature.asc Description: Digital signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 4/4] staging: ozwpan: Create deferred work to destroy PD object.
On Thu, Aug 22, 2013 at 05:38:51PM +0100, Rupesh Gujare wrote: +/*-- * Context: softirq-serialized */ Don't resend the patch, but these comments are not in kernel style. It's explained in Documentation/kernel-doc-nano-HOWTO.txt The main thing is that could you just delete all the lines? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 09/10] staging: vt6655: inherit addr_assign_type along with dev_addr
Cc: Forest Bond for...@alittletooquiet.net Signed-off-by: Bjørn Mork bj...@mork.no --- drivers/staging/vt6655/hostap.c |2 +- drivers/staging/vt6655/ioctl.c |2 +- drivers/staging/vt6655/wpactl.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index 57a08c5..8acff44 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -86,7 +86,7 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) apdev_priv = netdev_priv(pDevice-apdev); *apdev_priv = *pDevice; - memcpy(pDevice-apdev-dev_addr, dev-dev_addr, ETH_ALEN); + eth_hw_addr_inherit(pDevice-apdev, dev); pDevice-apdev-netdev_ops = apdev_netdev_ops; diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index 46e0e41..b5cd2e4 100644 --- a/drivers/staging/vt6655/ioctl.c +++ b/drivers/staging/vt6655/ioctl.c @@ -460,7 +460,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) } if (sValue.dwValue == 1) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO up wpadev\n); - memcpy(pDevice-wpadev-dev_addr, pDevice-dev-dev_addr, ETH_ALEN); + eth_hw_addr_inherit(pDevice-wpadev, pDevice-dev); pDevice-bWPADEVUp = true; } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO close wpadev\n); diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index 869f62c..e8d9ecd 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -96,7 +96,7 @@ static int wpa_init_wpadev(PSDevice pDevice) wpadev_priv = netdev_priv(pDevice-wpadev); *wpadev_priv = *pDevice; - memcpy(pDevice-wpadev-dev_addr, dev-dev_addr, ETH_ALEN); + eth_hw_addr_inherit(pDevice-wpadev, dev); pDevice-wpadev-base_addr = dev-base_addr; pDevice-wpadev-irq = dev-irq; pDevice-wpadev-mem_start = dev-mem_start; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next 00/10] set addr_assign_type when inheriting a dev_addr
Copying the dev_addr from a parent device is an operation common to a number of drivers. The addr_assign_type should be updated accordingly, either by reusing the value from the source device or explicitly indicating that the address is stolen by setting addr_assign_type to NET_ADDR_STOLEN. This patch set adds a helper copying both the dev_addr and the addr_assign_type, and use this helper in drivers which don't currently set the addr_assign_type. Using NET_ADDR_STOLEN might be more appropriate in some of these cases. Please let me know, and I'll update the patch accordingly. Bjørn Mork (10): net: etherdevice: add address inherit helper net: vlan: inherit addr_assign_type along with dev_addr net: dsa: inherit addr_assign_type along with dev_addr net: macvlan: inherit addr_assign_type along with dev_addr net: team: inherit addr_assign_type along with dev_addr net: airo: inherit addr_assign_type along with dev_addr net: hostap: inherit addr_assign_type along with dev_addr net: libertas: inherit addr_assign_type along with dev_addr staging: vt6655: inherit addr_assign_type along with dev_addr staging: vt6656: inherit addr_assign_type along with dev_addr drivers/net/macvlan.c |2 +- drivers/net/team/team.c |2 +- drivers/net/wireless/airo.c |2 +- drivers/net/wireless/hostap/hostap_hw.c |2 +- drivers/net/wireless/hostap/hostap_main.c |2 +- drivers/net/wireless/libertas/mesh.c |2 +- drivers/staging/vt6655/hostap.c |2 +- drivers/staging/vt6655/ioctl.c|2 +- drivers/staging/vt6655/wpactl.c |2 +- drivers/staging/vt6656/hostap.c |2 +- include/linux/etherdevice.h | 19 +++ net/8021q/vlan_dev.c |2 +- net/dsa/slave.c |2 +- 13 files changed, 31 insertions(+), 12 deletions(-) -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH net-next 10/10] staging: vt6656: inherit addr_assign_type along with dev_addr
On Fri, Aug 23, 2013 at 11:35:13AM +0200, Bjørn Mork wrote: Cc: Forest Bond for...@alittletooquiet.net Signed-off-by: Bjørn Mork bj...@mork.no --- The changlog is missing. Why does this patch help? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH net-next 10/10] staging: vt6656: inherit addr_assign_type along with dev_addr
Dan Carpenter dan.carpen...@oracle.com writes: On Fri, Aug 23, 2013 at 11:35:13AM +0200, Bjørn Mork wrote: Cc: Forest Bond for...@alittletooquiet.net Signed-off-by: Bjørn Mork bj...@mork.no --- The changlog is missing. Yes, right. Sorry about that. Why does this patch help? It ensures that addr_assign_type is set to the same value as the parent device the dev_addr is copied from. The initial reason was that I found it strange to see NET_ADDR_PERM on a vlan device which had inherited a random address from its parent. But I haven't verified whether that the parent device actually can have an addr_assign_type != NET_ADDR_PERM for every driver included. Bjørn ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 4/4] staging: ozwpan: Create deferred work to destroy PD object.
On 23/08/13 10:05, Dan Carpenter wrote: On Thu, Aug 22, 2013 at 05:38:51PM +0100, Rupesh Gujare wrote: +/*-- * Context: softirq-serialized */ Don't resend the patch, but these comments are not in kernel style. It's explained in Documentation/kernel-doc-nano-HOWTO.txt The main thing is that could you just delete all the lines? OK Dan, looks reasonable. -- Regards, Rupesh Gujare ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8187se: Remove pt_regs * irq handler parameter
struct pt_regs pointer is no longer passed as a irq handler argument. Signed-off-by: navin patidar nav...@cdac.in --- drivers/staging/rtl8187se/r8180_core.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index ca69155..d722bed 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -197,7 +197,7 @@ inline void force_pci_posting(struct net_device *dev) mb(); } -irqreturn_t rtl8180_interrupt(int irq, void *netdev, struct pt_regs *regs); +static irqreturn_t rtl8180_interrupt(int irq, void *netdev); void set_nic_rxring(struct net_device *dev); void set_nic_txring(struct net_device *dev); static struct net_device_stats *rtl8180_stats(struct net_device *dev); @@ -3537,7 +3537,7 @@ void rtl8180_tx_isr(struct net_device *dev, int pri, short error) spin_unlock_irqrestore(priv-tx_lock, flag); } -irqreturn_t rtl8180_interrupt(int irq, void *netdev, struct pt_regs *regs) +irqreturn_t rtl8180_interrupt(int irq, void *netdev) { struct net_device *dev = (struct net_device *) netdev; struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: comedi: bug-fix NULL pointer dereference on failed attach
Commit dcd7b8bd63cb81c5b973bf86510ca3c80bbbd162 (staging: comedi: put module _after_ detach by myself) reversed a couple of calls in `comedi_device_attach()` when recovering from an error returned by the low-level driver's 'attach' handler. Unfortunately, that introduced a NULL pointer dereference bug as `dev-driver` is NULL after the call to `comedi_device_detach()`. We still have a pointer to the low-level comedi driver structure in the `driv` variable, so use that instead. Signed-off-by: Ian Abbott abbo...@mev.co.uk Cc: sta...@vger.kernel.org # 3.10.x Cc: sta...@vger.kernel.org # 3.11.x --- drivers/staging/comedi/drivers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 60fd81c..317a821 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -537,7 +537,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it) ret = comedi_device_postconfig(dev); if (ret 0) { comedi_device_detach(dev); - module_put(dev-driver-module); + module_put(driv-module); } /* On success, the driver module count has been incremented. */ out: -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Meine reagiert
Sehr geehrter Herr. Entschuldigen Sie meine Stцrung; Mein Name ist Lieutenant Andrew Ferrara, derzeit bin ich im aktiven Dienst in Afghanistan. Bitte, muss ich eine verdeckt Business-Angebot, die von gegenseitigem Nutzen fьr uns beide werden. Am Samstag 20. Juli, meine Kollegen und ich abgefangen einen radikalen Taliban-Kurier transportieren groЯe Mengen von Mitteln und auf diesem unglьcklichen Vorfall; Wir aufgerundet insgesamt 11,9 Millionen US-Dollar US-Dollar. Nach eingehender Erцrterung mit meinem Zug kamen wir zu einem Abschluss, wenn die Mittel der afghanischen Polizei ьbergeben werden, gibt es die Mцglichkeit, dass die Mittel fьr ihren eigenen Verbrauch beschlagnahmt werden werden. Daher war es meine Pflicht, einen Partner zu finden, der dieser Fonds zum Wohle von uns allen erhalten. Mit aller gebotenen Demut, ich will, dass du unsere Partner bei der Aufnahme dieses Mittel sein. Die Mittel aus diesem Land durch eine Luft-Fracht-Transportmittel verschoben werden, und alles, was Sie hierzu verpflichtet ist, die Mittel vertraulich fьr gegenseitigen Vorteil erhalten. Seien Sie versichert, dass dieser Fonds sorgfдltig eingedдmmt worden ist und keine Notwendigkeit der Quelle sorgen besteht, da wir nicht alles tun wird, die Probleme werden zu Ihnen bringen oder uns zurьckgefьhrt. Fьr Ihre ehrliche Teilnahme in diesem Geschдft sind wir bereit, sie in drei gleich groЯe Teile aufgeteilt und Sie halten einerseits fьr sich selbst und den Rest, die Sie senden, wo ich Sie unterrichten wird. Sir, bitte es geht nicht um das Geld, sondern die Tatsache, dass bei dieser Fonds werden es wahrscheinlich verwendet werden, um weitere Waffen kaufen und dazu fьhren, dass mehr tцten hier zurьckgegeben. Ich komme aus einer Generation von militдrisches Personal und ich weiЯ, dass mein Wort mein Leben ist, aber das aus der hand hier langsam wird und ich muss, also bitte tun, wenn Sie nicht mit uns zusammenarbeiten mцchten, kann ich verstehen. Siehe Link um mehr ьber meine Familie zu erfahren; http://www.huffingtonpost.com/2011/11/10/andrew-ferrara-soldier_n_1086991.html?icid=maing-grid7%7Cmain5%7Cdl1%7Csec1_lnk2%7C111643 Wenn Sie bereit sind, bitte senden Sie mir eine Email ASaP mit Ihrem Kontakt Telefon und Adresse an diese e-Mail-Adresse aus vertraulichen Grьnden: andrewferr...@rocketmail.com. Ihnen aufrichtig Lieutenant Andrew Ferrara andrewferr...@rocketmail.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8187se: Remove pt_regs * irq handler parameter
On Fri, Aug 23, 2013 at 05:00:06PM +0530, navin patidar wrote: struct pt_regs pointer is no longer passed as a irq handler argument. Good eye. Could you also remove the cast to (void *) so the compiler can catch this in the future? - if (request_irq(dev-irq, (void *)rtl8180_interrupt, IRQF_SHARED, dev-name, dev)) { + if (request_irq(dev-irq, rtl8180_interrupt, IRQF_SHARED, dev-name, dev)) { regrds, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: dgnc: driver.c: Add missing #include linux/slab.h
m68k/sparc64 allmodconfig: drivers/staging/dgnc/dgnc_driver.c: In function ‘dgnc_cleanup_board’: drivers/staging/dgnc/dgnc_driver.c:459: error: implicit declaration of function ‘kfree’ drivers/staging/dgnc/dgnc_driver.c: In function ‘dgnc_driver_kzmalloc’: drivers/staging/dgnc/dgnc_driver.c:905: error: implicit declaration of function ‘kmalloc’ drivers/staging/dgnc/dgnc_driver.c:905: warning: initialization makes pointer from integer without a cast Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org --- http://kisskb.ellerman.id.au/kisskb/buildresult/9356764/ http://kisskb.ellerman.id.au/kisskb/buildresult/9356016/ drivers/staging/dgnc/dgnc_driver.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index fa4e91a..8032368 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -34,6 +34,7 @@ #include linux/version.h #include linux/module.h #include linux/pci.h +#include linux/slab.h #if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,39) #include linux/sched.h -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 08/12] staging: dgap: tty.c: fixes ioctl param list
On Fri, Aug 23, 2013 at 4:47 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Wed, Aug 21, 2013 at 09:48:38PM -0400, Lidza Louina wrote: The declaration for the ioctl function has changed. The previous version of this declaration took struct file *file as a parameter and the new one does not. This patch removes that parameter. It also removes cases for the commands TIOCGETP TCGETS and TCGETA. These should be in two separate patches. Normally I would say to resend it, but since this driver doesn't compile I don't care very much. Ok, I can see why that's important. I'll break up my future patches to do just one thing at a time. Also, the driver has been added to the build. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/15] staging: comedi: comedi_bond: don't map channels individually
The private data structure (`struct comedi_bond_private`) for the overall comedi_bond device maps each channel individually to a pointer to the `struct bonded_device` it belongs to via array member `chan_id_dev_map[MAX_CHANS]`. This speeds up look-ups from channel number to bonded device a bit, but the length of the array used to look this up is currently fixed at `MAX_CHANS` (256) and there are no overflow checks when filling the array. In practice, there will only be a few bonded devices (actually bonded subdevices) and it is practical to just skip through the list until we reach the one containing the desired channel. The only place where the bonded device is looked up from the channel number is in `bonding_dio_insn_config()`. Change it to do the look-up by skipping through the list of bonded devices and remove the `chan_id_dev_map[]` member. The `chanid_offset` member of `struct bonded_device` is also no longer needed as the value can be derived while skipping through the list of bonded devices, so remove that member as well. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/comedi_bond.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index c0a427c..493fdb7 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -53,18 +53,12 @@ #include ../comedilib.h #include ../comedidev.h -/* The maxiumum number of channels per subdevice. */ -#define MAX_CHANS 256 - struct bonded_device { struct comedi_device *dev; unsigned minor; unsigned subdev; unsigned subdev_type; unsigned nchans; - unsigned chanid_offset; /* The offset into our unified linear -* channel-id's of chanid 0 on this -* subdevice. */ }; struct comedi_bond_private { @@ -72,7 +66,6 @@ struct comedi_bond_private { char name[MAX_BOARD_NAME]; struct bonded_device **devs; unsigned ndevs; - struct bonded_device *chan_id_dev_map[MAX_CHANS]; unsigned nchans; }; @@ -133,12 +126,22 @@ static int bonding_dio_insn_config(struct comedi_device *dev, { struct comedi_bond_private *devpriv = dev-private; int chan = CR_CHAN(insn-chanspec), ret, io_bits = s-io_bits; + unsigned int chanid_offset; unsigned int io; struct bonded_device *bdev; + struct bonded_device **devs; if (chan 0 || chan = devpriv-nchans) return -EINVAL; - bdev = devpriv-chan_id_dev_map[chan]; + + /* +* Locate bonded subdevice. +*/ + chanid_offset = 0; + devs = devpriv-devs; + for (bdev = *devs++; chan = chanid_offset + bdev-nchans; +bdev = *devs++) + chanid_offset += bdev-nchans; /* * The input or output configuration of each digital line is @@ -165,7 +168,7 @@ static int bonding_dio_insn_config(struct comedi_device *dev, break; } /* 'real' channel id for this subdev.. */ - chan -= bdev-chanid_offset; + chan -= chanid_offset; ret = comedi_dio_config(bdev-dev, bdev-subdev, chan, io); if (ret != 1) return -EINVAL; @@ -252,12 +255,7 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it) bdev-subdev = sdev; bdev-subdev_type = COMEDI_SUBD_DIO; bdev-nchans = nchans; - bdev-chanid_offset = devpriv-nchans; - - /* map channel id's to bonded_device * pointer.. */ - while (nchans--) - devpriv-chan_id_dev_map[devpriv-nchans++] = - bdev; + devpriv-nchans += nchans; /* * Now put bdev pointer at end of devpriv-devs array -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/15] staging: comedi: comedi_bond: remove unused subdev_type
The `subdev_type` member of `struct bonded_device` is set but not used. Remove it. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/comedi_bond.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index 493fdb7..ab5451e 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -57,7 +57,6 @@ struct bonded_device { struct comedi_device *dev; unsigned minor; unsigned subdev; - unsigned subdev_type; unsigned nchans; }; @@ -253,7 +252,6 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it) bdev-dev = d; bdev-minor = minor; bdev-subdev = sdev; - bdev-subdev_type = COMEDI_SUBD_DIO; bdev-nchans = nchans; devpriv-nchans += nchans; -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/15] staging: comedi: comedi_bond: handle base channel for insn_bits
If a DIO subdevice has more than 32 channels, its 'insn_bits' handler is supposed to take account of the base channel from `CR_CHAN(insn-chanspec)`. (The comedi core will adjust the base channel to 0 and shift the mask and data to compensate if the subdevice has less than or equal to 32 channels.) The comedi_bond driver currently ignores the base channel and assumes it is 0. Replace `comedi_dio_bitfield()` in the kcomedilib module with `comedi_dio_bitfield2()` that takes account of the base channel, and rewrite the comedi_bond driver's 'insn_bits' handler (`bonding_dio_insn_bits()`) to take account of the base channel and use the new function. No other modules use `comedi_dio_bitfield()` so it is safe to replace it with `comedi_dio_bitfield2()`. The name follows that of the equivalent function in the user-space comedilib. If the base channel is non-zero and the subdevice has less than or equal to 32 channels it needs to adjust things in the same way as the comedi core (same as `parse_insn()` in comedi_fops.c) due to most drivers ignoring the base channel. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/comedilib.h | 5 +- drivers/staging/comedi/drivers/comedi_bond.c | 87 -- .../staging/comedi/kcomedilib/kcomedilib_main.c| 37 +++-- 3 files changed, 83 insertions(+), 46 deletions(-) diff --git a/drivers/staging/comedi/comedilib.h b/drivers/staging/comedi/comedilib.h index 47b1640..56baf85 100644 --- a/drivers/staging/comedi/comedilib.h +++ b/drivers/staging/comedi/comedilib.h @@ -25,8 +25,9 @@ int comedi_dio_get_config(struct comedi_device *dev, unsigned int subdev, unsigned int chan, unsigned int *io); int comedi_dio_config(struct comedi_device *dev, unsigned int subdev, unsigned int chan, unsigned int io); -int comedi_dio_bitfield(struct comedi_device *dev, unsigned int subdev, - unsigned int mask, unsigned int *bits); +int comedi_dio_bitfield2(struct comedi_device *dev, unsigned int subdev, +unsigned int mask, unsigned int *bits, +unsigned int base_channel); int comedi_find_subdevice_by_type(struct comedi_device *dev, int type, unsigned int subd); int comedi_get_n_channels(struct comedi_device *dev, unsigned int subdevice); diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index a1c51a2..8e2696c 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -73,48 +73,59 @@ static int bonding_dio_insn_bits(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { struct comedi_bond_private *devpriv = dev-private; -#define LSAMPL_BITS (sizeof(unsigned int)*8) - unsigned nchans = LSAMPL_BITS, num_done = 0, i; + unsigned int n_left, n_done, base_chan; + unsigned int write_mask, data_bits; + struct bonded_device **devs; - if (devpriv-nchans nchans) - nchans = devpriv-nchans; + write_mask = data[0]; + data_bits = data[1]; + base_chan = CR_CHAN(insn-chanspec); + /* do a maximum of 32 channels, starting from base_chan. */ + n_left = devpriv-nchans - base_chan; + if (n_left 32) + n_left = 32; - /* -* The insn data is a mask in data[0] and the new data -* in data[1], each channel cooresponding to a bit. -*/ - for (i = 0; num_done nchans i devpriv-ndevs; ++i) { - struct bonded_device *bdev = devpriv-devs[i]; - /* -* Grab the channel mask and data of only the bits corresponding -* to this subdevice.. need to shift them to zero position of -* course. -*/ - /* Bits corresponding to this subdev. */ - unsigned int subdev_mask = ((1 bdev-nchans) - 1); - unsigned int write_mask, data_bits; - - /* Argh, we have = LSAMPL_BITS chans.. take all bits */ - if (bdev-nchans = LSAMPL_BITS) - subdev_mask = (unsigned int)(-1); - - write_mask = (data[0] num_done) subdev_mask; - data_bits = (data[1] num_done) subdev_mask; - - /* Read/Write the new digital lines */ - if (comedi_dio_bitfield(bdev-dev, bdev-subdev, write_mask, - data_bits) != 2) - return -EINVAL; + n_done = 0; + devs = devpriv-devs; + do { + struct bonded_device *bdev = *devs++; - /* Make room for the new bits in data[1], the return value */ - data[1] = ~(subdev_mask num_done); - /* Put the bits in the return value */ - data[1] |= (data_bits
[PATCH 10/15] staging: comedi: comedi_bond: no need to free dev-private on detach
The comedi core will free `dev-private` if it is non-NULL after calling the detach handler (`bonding_detach()`), so don't bother freeing it in `bonding_detach()`. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/comedi_bond.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index ab5451e..a2cc285 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -355,8 +355,6 @@ static void bonding_detach(struct comedi_device *dev) } kfree(devpriv-devs); devpriv-devs = NULL; - kfree(devpriv); - dev-private = NULL; } } -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/15] staging: comedi: comedi_bond: change return value of bonding_attach()
`bonding_attach()` is the comedi attach handler for the driver. Any non-negative return value is treated as successful, but 0 is the preferred return value on success. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/comedi_bond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index 4a1135b..dd93e4f 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -336,7 +336,7 @@ static int bonding_attach(struct comedi_device *dev, dev-driver-driver_name, dev-board_name, devpriv-nchans, devpriv-ndevs); - return 1; + return 0; } static void bonding_detach(struct comedi_device *dev) -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/15] staging: comedi: comedi_bond: no need to initialize file[]
The `char file[]` variable in `do_dev_config()` doesn't need to be initialized as it gets overwritten with a `snprintf()`. It just needs to be long enough. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/comedi_bond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index 253a67d..00c065a 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -200,7 +200,7 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it) * building our device list. */ for (i = 0; i COMEDI_NDEVCONFOPTS (!i || it-options[i]); ++i) { - char file[] = /dev/comediXX; + char file[sizeof(/dev/comediXX)]; int minor = it-options[i]; struct comedi_device *d; int sdev = -1, nchans, tmp; -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/15] staging: comedi: comedi_bond: return error code in do_dev_config()
Change `do_dev_config()` to return an error code on failure and 0 on success, instead of 0 on failure and 1 on success. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/comedi_bond.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index 00c065a..4a1135b 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -209,17 +209,17 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it) if (minor 0 || minor = COMEDI_NUM_BOARD_MINORS) { dev_err(dev-class_dev, Minor %d is invalid!\n, minor); - return 0; + return -EINVAL; } if (minor == dev-minor) { dev_err(dev-class_dev, Cannot bond this driver to itself!\n); - return 0; + return -EINVAL; } if (devs_opened[minor]) { dev_err(dev-class_dev, Minor %d specified more than once!\n, minor); - return 0; + return -EINVAL; } snprintf(file, sizeof(file), /dev/comedi%u, minor); @@ -230,7 +230,7 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it) if (!d) { dev_err(dev-class_dev, Minor %u could not be opened\n, minor); - return 0; + return -ENODEV; } /* Do DIO, as that's all we support now.. */ @@ -241,11 +241,11 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it) dev_err(dev-class_dev, comedi_get_n_channels() returned %d on minor %u subdev %d!\n, nchans, minor, sdev); - return 0; + return -EINVAL; } bdev = kmalloc(sizeof(*bdev), GFP_KERNEL); if (!bdev) - return 0; + return -ENOMEM; bdev-dev = d; bdev-minor = minor; @@ -272,7 +272,7 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it) if (!devpriv-devs) { dev_err(dev-class_dev, Could not allocate memory. Out of memory?\n); - return 0; + return -ENOMEM; } devpriv-devs[devpriv-ndevs - 1] = bdev; @@ -292,10 +292,10 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it) if (!devpriv-nchans) { dev_err(dev-class_dev, No channels found!\n); - return 0; + return -EINVAL; } - return 1; + return 0; } static int bonding_attach(struct comedi_device *dev, @@ -312,8 +312,9 @@ static int bonding_attach(struct comedi_device *dev, /* * Setup our bonding from config params.. sets up our private struct.. */ - if (!do_dev_config(dev, it)) - return -EINVAL; + ret = do_dev_config(dev, it); + if (ret) + return ret; dev-board_name = devpriv-name; -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/15] staging: comedi: comedi_bond: some bug fixes and tidy up
The comedi_bond driver can be used to map the DIO subdevices of some other comedi devices into one, giant, uber DIO subdevice. However, it has a few bugs such as memory leaks (but only if a memory allocation fails), buffer overflow when more than 256 channels are added, not handling `COMEDI_INSN_BITS` properly when there are more than 32 channels, and various other problems. Also it needs tidying up a bit due to the use of CamelCase, etc. Some of the changes involve changes to the kcomedilib module as well, but that is only used by the comedi_bond module (for in-tree modules, anyway, which is all we care about at the moment). 01) staging: comedi: comedi_bond: reformat some comments 02) staging: comedi: comedi_bond: shorten module description 03) staging: comedi: comedi_bond: rename CamelCase identifiers 04) staging: comedi: comedi_bond: no need to initialize file[] 05) staging: comedi: comedi_bond: return error code in do_dev_config() 06) staging: comedi: comedi_bond: change return value of bonding_attach() 07) staging: comedi: comedi_bond: use bitmap to record opened/closed minors 08) staging: comedi: comedi_bond: don't map channels individually 09) staging: comedi: comedi_bond: remove unused subdev_type 10) staging: comedi: comedi_bond: no need to free dev-private on detach 11) staging: comedi: comedi_bond: just check devprivs-devs once on detach 12) staging: comedi: comedi_bond: get INSN_CONFIG_DIO_QUERY info from horse's mouth 13) staging: comedi: comedi_bond: handle base channel for insn_bits 14) staging: comedi: comedi_bond: use krealloc() and fix memory leak 15) staging: comedi: comedi_bond: use correct minor device numbers in name drivers/staging/comedi/comedilib.h | 7 +- drivers/staging/comedi/drivers/comedi_bond.c | 361 ++--- .../staging/comedi/kcomedilib/kcomedilib_main.c| 58 +++- 3 files changed, 230 insertions(+), 196 deletions(-) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/15] staging: comedi: comedi_bond: reformat some comments
Reformat some comments according to CodingStyle and remove some comments inherited from the comedi 'skel' example driver. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/comedi_bond.c | 141 ++- 1 file changed, 73 insertions(+), 68 deletions(-) diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index 7e20bf0..32a26f2 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -1,49 +1,50 @@ /* -comedi/drivers/comedi_bond.c -A Comedi driver to 'bond' or merge multiple drivers and devices as one. - -COMEDI - Linux Control and Measurement Device Interface -Copyright (C) 2000 David A. Schleef d...@schleef.org -Copyright (C) 2005 Calin A. Culianu ca...@ajvar.org - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -*/ + * comedi_bond.c + * A Comedi driver to 'bond' or merge multiple drivers and devices as one. + * + * COMEDI - Linux Control and Measurement Device Interface + * Copyright (C) 2000 David A. Schleef d...@schleef.org + * Copyright (C) 2005 Calin A. Culianu ca...@ajvar.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + /* -Driver: comedi_bond -Description: A driver to 'bond' (merge) multiple subdevices from multiple -devices together as one. -Devices: -Author: ds -Updated: Mon, 10 Oct 00:18:25 -0500 -Status: works - -This driver allows you to 'bond' (merge) multiple comedi subdevices -(coming from possibly difference boards and/or drivers) together. For -example, if you had a board with 2 different DIO subdevices, and -another with 1 DIO subdevice, you could 'bond' them with this driver -so that they look like one big fat DIO subdevice. This makes writing -applications slightly easier as you don't have to worry about managing -different subdevices in the application -- you just worry about -indexing one linear array of channel id's. - -Right now only DIO subdevices are supported as that's the personal itch -I am scratching with this driver. If you want to add support for AI and AO -subdevs, go right on ahead and do so! - -Commands aren't supported -- although it would be cool if they were. - -Configuration Options: - List of comedi-minors to bond. All subdevices of the same type - within each minor will be concatenated together in the order given here. -*/ + * Driver: comedi_bond + * Description: A driver to 'bond' (merge) multiple subdevices from multiple + * devices together as one. + * Devices: + * Author: ds + * Updated: Mon, 10 Oct 00:18:25 -0500 + * Status: works + * + * This driver allows you to 'bond' (merge) multiple comedi subdevices + * (coming from possibly difference boards and/or drivers) together. For + * example, if you had a board with 2 different DIO subdevices, and + * another with 1 DIO subdevice, you could 'bond' them with this driver + * so that they look like one big fat DIO subdevice. This makes writing + * applications slightly easier as you don't have to worry about managing + * different subdevices in the application -- you just worry about + * indexing one linear array of channel id's. + * + * Right now only DIO subdevices are supported as that's the personal itch + * I am scratching with this driver. If you want to add support for AI and AO + * subdevs, go right on ahead and do so! + * + * Commands aren't supported -- although it would be cool if they were. + * + * Configuration Options: + * List of comedi-minors to bond. All subdevices of the same type + * within each minor will be concatenated together in the order given here. + */ #include linux/module.h #include linux/string.h @@ -62,13 +63,10 @@ struct BondedDevice { unsigned subdev_type; unsigned nchans; unsigned chanid_offset; /* The offset into our unified linear - channel-id's of chanid 0 on this - subdevice. */ +* channel-id's of chanid 0 on this +
[PATCH 03/15] staging: comedi: comedi_bond: rename CamelCase identifiers
Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/comedi_bond.c | 47 ++-- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index a995b0b..253a67d 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -56,7 +56,7 @@ /* The maxiumum number of channels per subdevice. */ #define MAX_CHANS 256 -struct BondedDevice { +struct bonded_device { struct comedi_device *dev; unsigned minor; unsigned subdev; @@ -70,9 +70,9 @@ struct BondedDevice { struct comedi_bond_private { # define MAX_BOARD_NAME 256 char name[MAX_BOARD_NAME]; - struct BondedDevice **devs; + struct bonded_device **devs; unsigned ndevs; - struct BondedDevice *chanIdDevMap[MAX_CHANS]; + struct bonded_device *chan_id_dev_map[MAX_CHANS]; unsigned nchans; }; @@ -92,32 +92,32 @@ static int bonding_dio_insn_bits(struct comedi_device *dev, * in data[1], each channel cooresponding to a bit. */ for (i = 0; num_done nchans i devpriv-ndevs; ++i) { - struct BondedDevice *bdev = devpriv-devs[i]; + struct bonded_device *bdev = devpriv-devs[i]; /* * Grab the channel mask and data of only the bits corresponding * to this subdevice.. need to shift them to zero position of * course. */ /* Bits corresponding to this subdev. */ - unsigned int subdevMask = ((1 bdev-nchans) - 1); - unsigned int writeMask, dataBits; + unsigned int subdev_mask = ((1 bdev-nchans) - 1); + unsigned int write_mask, data_bits; /* Argh, we have = LSAMPL_BITS chans.. take all bits */ if (bdev-nchans = LSAMPL_BITS) - subdevMask = (unsigned int)(-1); + subdev_mask = (unsigned int)(-1); - writeMask = (data[0] num_done) subdevMask; - dataBits = (data[1] num_done) subdevMask; + write_mask = (data[0] num_done) subdev_mask; + data_bits = (data[1] num_done) subdev_mask; /* Read/Write the new digital lines */ - if (comedi_dio_bitfield(bdev-dev, bdev-subdev, writeMask, - dataBits) != 2) + if (comedi_dio_bitfield(bdev-dev, bdev-subdev, write_mask, + data_bits) != 2) return -EINVAL; /* Make room for the new bits in data[1], the return value */ - data[1] = ~(subdevMask num_done); + data[1] = ~(subdev_mask num_done); /* Put the bits in the return value */ - data[1] |= (dataBits subdevMask) num_done; + data[1] |= (data_bits subdev_mask) num_done; /* Save the new bits to the saved state.. */ s-state = data[1]; @@ -134,11 +134,11 @@ static int bonding_dio_insn_config(struct comedi_device *dev, struct comedi_bond_private *devpriv = dev-private; int chan = CR_CHAN(insn-chanspec), ret, io_bits = s-io_bits; unsigned int io; - struct BondedDevice *bdev; + struct bonded_device *bdev; if (chan 0 || chan = devpriv-nchans) return -EINVAL; - bdev = devpriv-chanIdDevMap[chan]; + bdev = devpriv-chan_id_dev_map[chan]; /* * The input or output configuration of each digital line is @@ -177,7 +177,7 @@ static int bonding_dio_insn_config(struct comedi_device *dev, return insn-n; } -static void *Realloc(const void *oldmem, size_t newlen, size_t oldlen) +static void *realloc(const void *oldmem, size_t newlen, size_t oldlen) { void *newmem = kmalloc(newlen, GFP_KERNEL); @@ -187,7 +187,7 @@ static void *Realloc(const void *oldmem, size_t newlen, size_t oldlen) return newmem; } -static int doDevConfig(struct comedi_device *dev, struct comedi_devconfig *it) +static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it) { struct comedi_bond_private *devpriv = dev-private; int i; @@ -204,7 +204,7 @@ static int doDevConfig(struct comedi_device *dev, struct comedi_devconfig *it) int minor = it-options[i]; struct comedi_device *d; int sdev = -1, nchans, tmp; - struct BondedDevice *bdev = NULL; + struct bonded_device *bdev = NULL; if (minor 0 || minor = COMEDI_NUM_BOARD_MINORS) { dev_err(dev-class_dev, @@ -254,9 +254,10 @@ static int doDevConfig(struct comedi_device *dev, struct comedi_devconfig *it) bdev-nchans =
[PATCH] staging: bcm: Fix typo in comments
Correct spelling typo in staging/bcm Signed-off-by: Masanari Iida standby2...@gmail.com --- drivers/staging/bcm/Ioctl.h | 2 +- drivers/staging/bcm/Misc.c | 2 +- drivers/staging/bcm/nvm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/bcm/Ioctl.h b/drivers/staging/bcm/Ioctl.h index e253c08..797f862 100644 --- a/drivers/staging/bcm/Ioctl.h +++ b/drivers/staging/bcm/Ioctl.h @@ -175,7 +175,7 @@ struct bcm_flash2x_copy_section { /* * This section provide the complete bitmap of the Flash. - * using this map lib/APP will isssue read/write command. + * using this map lib/APP will issue read/write command. * Fields are defined as : * Bit [0] = section is present //1:present, 0: Not present * Bit [1] = section is valid //1: valid, 0: not valid diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index d23eeeb..4cfc2c3 100644 --- a/drivers/staging/bcm/Misc.c +++ b/drivers/staging/bcm/Misc.c @@ -210,7 +210,7 @@ exit_download: * @ingroup ctrl_pkt_functions * This function copies the contents of given buffer * to the control packet and queues it for transmission. - * @note Do not acquire the spinock, as it it already acquired. + * @note Do not acquire the spinlock, as it it already acquired. * @return SUCCESS/FAILURE. * Arguments: * Logical Adapter diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c index bea1330..91a5715 100644 --- a/drivers/staging/bcm/nvm.c +++ b/drivers/staging/bcm/nvm.c @@ -2966,7 +2966,7 @@ int BcmFlash2xBulkWrite(struct bcm_mini_adapter *Adapter, * @Adapter :-Drivers private Data Structure * * Return Value:- - * Return STATUS_SUCESS if get success in setting the right DSD else negaive error code + * Return STATUS_SUCESS if get success in setting the right DSD else negative error code * */ -- 1.8.4.rc4.1.g0d8beaa ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH 13/15] staging: comedi: comedi_bond: handle base channel for insn_bits
On Friday, August 23, 2013 6:45 AM, Ian Abbott wrote: If a DIO subdevice has more than 32 channels, its 'insn_bits' handler is supposed to take account of the base channel from `CR_CHAN(insn-chanspec)`. (The comedi core will adjust the base channel to 0 and shift the mask and data to compensate if the subdevice has less than or equal to 32 channels.) The comedi_bond driver currently ignores the base channel and assumes it is 0. Replace `comedi_dio_bitfield()` in the kcomedilib module with `comedi_dio_bitfield2()` that takes account of the base channel, and rewrite the comedi_bond driver's 'insn_bits' handler (`bonding_dio_insn_bits()`) to take account of the base channel and use the new function. No other modules use `comedi_dio_bitfield()` so it is safe to replace it with `comedi_dio_bitfield2()`. The name follows that of the equivalent function in the user-space comedilib. If the base channel is non-zero and the subdevice has less than or equal to 32 channels it needs to adjust things in the same way as the comedi core (same as `parse_insn()` in comedi_fops.c) due to most drivers ignoring the base channel. Signed-off-by: Ian Abbott abbo...@mev.co.uk Ian, I have not had a chance to look this series over yet but I had an off topic comment about kcomedilib. Is it too late to rename the exports from that driver? It would be a lot clearer if the core exports were prefixed with comedi_ and the exports provided to the kernel by kcomedilib where prefixed differently, maybe as kcomedi_ or even komedi_. Right now I think the only driver using kcomedilib is the comedi_bond driver. Thanks, Hartley ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/3] staging: ozwpan: Fix wrong error check.
schedule_work() returns true if succeeded false on failure, error check was doing exactly reverse. Also removes extra variable. Signed-off-by: Rupesh Gujare rupesh.guj...@atmel.com --- drivers/staging/ozwpan/ozpd.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index 5d24af3..d39a3df 100644 --- a/drivers/staging/ozwpan/ozpd.c +++ b/drivers/staging/ozwpan/ozpd.c @@ -261,17 +261,13 @@ void oz_pd_free(struct work_struct *work) */ void oz_pd_destroy(struct oz_pd *pd) { - int ret; - if (hrtimer_active(pd-timeout)) hrtimer_cancel(pd-timeout); if (hrtimer_active(pd-heartbeat)) hrtimer_cancel(pd-heartbeat); INIT_WORK(pd-workitem, oz_pd_free); - ret = schedule_work(pd-workitem); - - if (ret) + if (!schedule_work(pd-workitem)) oz_pd_dbg(pd, ON, failed to schedule workitem\n); } -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V8 11/33] dio: Convert direct_IO to use iov_iter
On Thu, Jul 25, 2013 at 7:50 PM, Dave Kleikamp dave.kleik...@oracle.com wrote: Change the direct_IO aop to take an iov_iter argument rather than an iovec. This will get passed down through most filesystems so that only the __blockdev_direct_IO helper need be aware of whether user or kernel memory is being passed to the function. Lustre in -next also needs to be updated: drivers/staging/lustre/lustre/llite/rw26.c:549: warning: initialization from incompatible pointer type Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer or something like that. -- Linus Torvalds ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH -next] staging: lustre: Use proper constant types for L*_POISON values
On 32-bit m68k, I get lots of warnings like: warning: integer constant is too large for ‘long’ type Switch the L*_POISON definitions from too-large constants and casts to the proper constant types to fix this. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org --- The values in drivers/staging/lustre/lustre/include/linux/lustre_lib.h don't seem to be used, as LP_POISON is already defined at that point? .../lustre/include/linux/libcfs/linux/kp30.h | 10 +++--- .../lustre/lustre/include/linux/lustre_lib.h | 10 -- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/kp30.h b/drivers/staging/lustre/include/linux/libcfs/linux/kp30.h index 073f4d1..c204b67 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/kp30.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/kp30.h @@ -187,9 +187,13 @@ extern int lwt_snapshot (cfs_cycles_t *now, int *ncpu, int *total_size, # endif #endif -# define LI_POISON ((int)0x5a5a5a5a5a5a5a5a) -# define LL_POISON ((long)0x5a5a5a5a5a5a5a5a) -# define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a) +# define LI_POISON 0x5a5a5a5a +#if BITS_PER_LONG 32 +# define LL_POISON 0x5a5a5a5a5a5a5a5aL +#else +# define LL_POISON 0x5a5a5a5aL +#endif +# define LP_POISON ((void *)LL_POISON) /* this is a bit chunky */ diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_lib.h b/drivers/staging/lustre/lustre/include/linux/lustre_lib.h index b2f755a..57f3b01 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_lib.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_lib.h @@ -53,15 +53,13 @@ # include linux/lustre_common.h #ifndef LP_POISON +# define LI_POISON 0x5a5a5a5a #if BITS_PER_LONG 32 -# define LI_POISON ((int)0x5a5a5a5a5a5a5a5a) -# define LL_POISON ((long)0x5a5a5a5a5a5a5a5a) -# define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a) +# define LL_POISON 0x5a5a5a5a5a5a5a5aL #else -# define LI_POISON ((int)0x5a5a5a5a) -# define LL_POISON ((long)0x5a5a5a5a) -# define LP_POISON ((void *)(long)0x5a5a5a5a) +# define LL_POISON 0x5a5a5a5aL #endif +# define LP_POISON ((void *)LL_POISON) #endif /* This macro is only for compatibility reasons with older Linux Lustre user -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH -next] staging: dgnc: driver.c: Add missing #include linux/slab.h
On Fri, Aug 23, 2013 at 02:23:49PM +0200, Geert Uytterhoeven wrote: m68k/sparc64 allmodconfig: drivers/staging/dgnc/dgnc_driver.c: In function ‘dgnc_cleanup_board’: drivers/staging/dgnc/dgnc_driver.c:459: error: implicit declaration of function ‘kfree’ drivers/staging/dgnc/dgnc_driver.c: In function ‘dgnc_driver_kzmalloc’: drivers/staging/dgnc/dgnc_driver.c:905: error: implicit declaration of function ‘kmalloc’ drivers/staging/dgnc/dgnc_driver.c:905: warning: initialization makes pointer from integer without a cast Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org This already went into my tree yesterday, so all should be good now. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/6] staging: ozwpan: Convert hard coded value to Macro
Use macro instead of hard coded value for readability. Signed-off-by: Rupesh Gujare rupesh.guj...@atmel.com --- drivers/staging/ozwpan/ozhcd.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index 83ed64c..89e498b 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -73,6 +73,7 @@ struct oz_urb_link { /* Holds state information about a USB endpoint. */ +#define OZ_EP_BUFFER_SIZE_ISOC (1024 * 24) struct oz_endpoint { struct list_head urb_list; /* List of oz_urb_link items. */ struct list_head link; /* For isoc ep, links in to isoc @@ -1261,7 +1262,7 @@ static int oz_build_endpoints_for_interface(struct usb_hcd *hcd, switch (hep-desc.bmAttributes USB_ENDPOINT_XFERTYPE_MASK) { case USB_ENDPOINT_XFER_ISOC: - buffer_size = 24*1024; + buffer_size = OZ_EP_BUFFER_SIZE_ISOC; break; case USB_ENDPOINT_XFER_INT: buffer_size = 128; -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] staging: ozwpan: change variable type.
We have icreased interrupt end point buffer size to 512 bytes, Change variable data type to accomodate it. Signed-off-by: Rupesh Gujare rupesh.guj...@atmel.com --- drivers/staging/ozwpan/ozhcd.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index 16fd60b..3548860 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -441,9 +441,9 @@ static void oz_complete_buffered_urb(struct oz_port *port, struct oz_endpoint *ep, struct urb *urb) { - u8 data_len, available_space, copy_len; + int data_len, available_space, copy_len; - memcpy(data_len, ep-buffer[ep-out_ix], sizeof(u8)); + data_len = ep-buffer[ep-out_ix]; if (data_len = urb-transfer_buffer_length) available_space = data_len; else -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/6] staging: ozwpan: change max. TX frame size supported.
Max. TX frame size supported is changed to 760 bytes. Signed-off-by: Rupesh Gujare rupesh.guj...@atmel.com --- drivers/staging/ozwpan/ozproto.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ozwpan/ozproto.h b/drivers/staging/ozwpan/ozproto.h index e532347..0c49c8a 100644 --- a/drivers/staging/ozwpan/ozproto.h +++ b/drivers/staging/ozwpan/ozproto.h @@ -19,7 +19,7 @@ #define OZ_PRESLEEP_TOUT 11 /* Maximun sizes of tx frames. */ -#define OZ_MAX_TX_SIZE 1514 +#define OZ_MAX_TX_SIZE 760 /* Maximum number of uncompleted isoc frames that can be pending in network. */ #define OZ_MAX_SUBMITTED_ISOC 16 -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 08/12] staging: dgap: tty.c: fixes ioctl param list
On Wed, Aug 21, 2013 at 09:48:38PM -0400, Lidza Louina wrote: -static int dgap_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, +static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) Btw, now that this file compiles I see it in my static checker runs. dgap_tty_ioctl() takes a lock but always returns before unlocking. { struct board_t *bd; @@ -3423,41 +3423,6 @@ static int dgap_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned in return(-ENOIOCTLCMD); In other words, these return statements should be breaks so we hit the call to: DGNC_UNLOCK(ch-ch_lock, lock_flags); regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel