[PATCH] Staging: speakup: Insert blank lines after declarations in speakup_soft.c
This patch fixes the checkpatch.pl 'Missing a blank line after declarations' warning in speakup_soft.c. Signed-off-by: Artemiy Volkov --- drivers/staging/speakup/speakup_soft.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c index 9ed7265..b613a08 100644 --- a/drivers/staging/speakup/speakup_soft.c +++ b/drivers/staging/speakup/speakup_soft.c @@ -192,6 +192,7 @@ static int softsynth_open(struct inode *inode, struct file *fp) static int softsynth_close(struct inode *inode, struct file *fp) { unsigned long flags; + spin_lock_irqsave(&speakup_info.spinlock, flags); synth_soft.alive = 0; init_pos = 0; @@ -282,6 +283,7 @@ static unsigned int softsynth_poll(struct file *fp, struct poll_table_struct *wait) { unsigned long flags; + int ret = 0; poll_wait(fp, &speakup_event, wait); @@ -295,6 +297,7 @@ static unsigned int softsynth_poll(struct file *fp, static unsigned char get_index(void) { int rv; + rv = last_index; last_index = 0; return rv; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 11/14] staging: unisys: remove do{} while(0) in macros in channel.h
On Tue, Aug 05, 2014 at 02:57:55PM -0400, Benjamin Romer wrote: > The CHANNEL_*_MISMATCH error message macros should not be inside of do blocks. > Why not? We do that so they can be called like a function. These seem to not be called at all. Just delete them (in a later patch). regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 14/14] staging: unisys: fix macros in iochannel.h
On Tue, Aug 05, 2014 at 02:57:58PM -0400, Benjamin Romer wrote: > Remove the do blocks around several macros and fix spacing and trailing > semicolons. > do blocks are prefered style actually. Otherwise people start leaving semi-colons out in the caller code. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: comedi: add NI USB-6501 initial support
On 05/08/2014 17:58, Ian Abbott wrote: On 2014-08-05 15:22, Luca Ellero wrote: This is a preliminary version, some features are not implemented yet: GPIO: works counter: doesn't work Signed-off-by: Luca Ellero --- This is a preliminary version of the NI USB-6501 driver. Every comment/suggestion is welcome. I plan to implement counter device in the next weeks, once this code will be in the correct form. Regards It looks mostly okay, though has a few too many blank lines - running 'scripts/checkpatch.pl --strict drivers/staging/comedi/ni_6501.c' picks up a few whitespace problems. One thought I had is that maybe "ni_usb6501" would be a better name to help distinguish it from the other "ni_65*" modules that are all PCI cards. It's not that important though. If you change it, the Kconfig option name can be changed to match, e.g. "CONFIG_COMEDI_NI_USB6501". I've marked a few other issues below... drivers/staging/comedi/Kconfig |8 + drivers/staging/comedi/drivers/Makefile |1 + drivers/staging/comedi/drivers/ni_6501.c | 484 ++ 3 files changed, 493 insertions(+) create mode 100644 drivers/staging/comedi/drivers/ni_6501.c diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index 36f2c71..679f27a 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig @@ -1209,6 +1209,14 @@ config COMEDI_DT9812 To compile this driver as a module, choose M here: the module will be called dt9812. +config COMEDI_NI_6501 +tristate "NI 6501 support" It's better to use "NI USB-6501 support" there to match the model name. +---help--- + Enable support for the National Instruments 6501 USB module And similar there. checkpatch warns about the description being a bit short: "WARNING: please write a paragraph that describes the config symbol fully". You could add a bit of blurb to describe the device a bit more fully, e.g. that it has 24 GPIO lines and a 32-bit counter. Sometimes it's hard to make up enough stuff to avoid that checkpatch warning though! + + To compile this driver as a module, choose M here: the module will be + called ni_6501. + config COMEDI_USBDUX tristate "ITL USB-DUX-D support" ---help--- diff --git a/drivers/staging/comedi/drivers/Makefile b/drivers/staging/comedi/drivers/Makefile index 8873d48..6682759 100644 --- a/drivers/staging/comedi/drivers/Makefile +++ b/drivers/staging/comedi/drivers/Makefile @@ -125,6 +125,7 @@ obj-$(CONFIG_COMEDI_QUATECH_DAQP_CS)+= quatech_daqp_cs.o # Comedi USB drivers obj-$(CONFIG_COMEDI_DT9812)+= dt9812.o +obj-$(CONFIG_COMEDI_NI_6501)+= ni_6501.o obj-$(CONFIG_COMEDI_USBDUX)+= usbdux.o obj-$(CONFIG_COMEDI_USBDUXFAST)+= usbduxfast.o obj-$(CONFIG_COMEDI_USBDUXSIGMA)+= usbduxsigma.o diff --git a/drivers/staging/comedi/drivers/ni_6501.c b/drivers/staging/comedi/drivers/ni_6501.c new file mode 100644 index 000..e103171 --- /dev/null +++ b/drivers/staging/comedi/drivers/ni_6501.c @@ -0,0 +1,484 @@ +/* +comedi/drivers/ni_6501.c +Comedi driver for National Instruments USB-6501 + +COMEDI - Linux Control and Measurement Device Interface +Copyright (C) 2014 Luca Ellero + +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: ni_6501 +Description: National Instruments USB-6501 module +Devices: [National Instruments] USB-6501 (ni_6501) +Author: Luca Ellero +Updated: 5 Aug 2014 +Status: works + +This driver works, but counter device is not implemented yet. + +Configuration Options: + none +*/ We're gradually migrating to the standard block comment format for those two comments now. For example, see the ni_labpc.c comedi driver. + +/* + * NI-6501 - USB PROTOCOL DESCRIPTION + * + * Every command is composed by two USB packets: + *- request (out) + *- response (in) + * + * Every packet is at least 12 bytes long, here is the meaning of + *every field (all values are hex): + * + *byte 0 is always 00 + *byte 1 is always 01 + *byte 2 is always 00 + *byte 3 is the total packet lenght "length" is spelt wrong there. + * + *byte 4 is always 00 + *byte 5 is is the total packet lenght - 4 And there. I don't really have a problem with the rest of it, apart from the checkpatch.pl --strict issues, and the multiple blank lines where one blank line will suffice. Not bad, overall. Hi Ian, thanks for your comments. I'll follow your suggestion
[PATCH] staging: rtl8192u: fix sparse warnings in r8192U_core.c
Fix the following sparse warnings: drivers/staging/rtl8192u/r8192U_core.c:670:6: warning: symbol 'dump_eprom' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning: symbol 'txqueue2outpipe' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning: symbol 'GetRxPacketShiftBytes819xUsb' was not declared. Should it be static? Signed-off-by: A Raghavendra Rao --- drivers/staging/rtl8192u/r8192U_core.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 7640386..b41b21a 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -667,7 +667,7 @@ static void tx_timeout(struct net_device *dev) /* this is only for debug */ -void dump_eprom(struct net_device *dev) +static void dump_eprom(struct net_device *dev) { int i; for (i = 0; i < 63; i++) @@ -1553,7 +1553,8 @@ u16 N_DBPSOfRate(u16 DataRate) return N_DBPS; } -unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue) +static unsigned int txqueue2outpipe(struct r8192_priv *priv, + unsigned int tx_queue) { if (tx_queue >= 9) { RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__); @@ -4873,7 +4874,8 @@ static void query_rxdesc_status(struct sk_buff *skb, } -u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats *Status, bool bIsRxAggrSubframe) +static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats *Status, + bool bIsRxAggrSubframe) { #ifdef USB_RX_AGGREGATION_SUPPORT if (bIsRxAggrSubframe) -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: comedi: add NI USB-6501 initial support
On 2014-08-06 09:49, Luca Ellero wrote: A question only: apart from renaming file from ni_6501.c to ni_usb6501.c, should I rename functions/variables as well? For example: ni6501_auto_attach -> niusb6501_auto_attach ni6501_private -> niusb6501_private It's okay to abbreviate the prefix, so ni6501, usb6501 or niusb6501 would all be fine. The main purpose of the prefix is to avoid name clashes with things declared in included header files etc., and to make it easier to spot things in symbol tables, Oops messages, etc. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error
Hello All, I have submitted few patches last week and also get reply from Greg that patches will show up in linux-next tree and in parallel I need to submit new patches and now Looks like I need to Sync my tree with linux-next tree before start working on New set of change and as soon as I am pulling change I always get conflicts. Anyone has idea who to overcome this problem ? Regards Sanjeev Sharma -Original Message- From: Sanjeev Sharma [mailto:sanjeev_sha...@mentor.com] Sent: Thursday, July 31, 2014 11:14 AM To: gre...@linuxfoundation.org Cc: oor...@gmail.com; de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org; Sharma, Sanjeev; Sharma, Sanjeev Subject: [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error This is a patch to the r8190_rtl8256.c file that fixes checkpatch reported space & coding style issues. Signed-off-by: Sanjeev Sharma --- Changes in v2: - Added space character in the signed-off-by field. drivers/staging/rtl8192u/r8190_rtl8256.c | 169 +++ 1 file changed, 79 insertions(+), 90 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 08e1bc9..43ed768 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -23,62 +23,64 @@ * Return: NONE * Note: 8226 support both 20M and 40 MHz *---*/ -void PHY_SetRF8256Bandwidth(struct net_device *dev , HT_CHANNEL_WIDTH Bandwidth) //20M or 40M +void PHY_SetRF8256Bandwidth(struct net_device *dev , HT_CHANNEL_WIDTH +Bandwidth) { u8 eRFPath; struct r8192_priv *priv = ieee80211_priv(dev); - //for(eRFPath = RF90_PATH_A; eRFPath NumTotalRFPath; eRFPath++) - for(eRFPath = 0; eRFPath NumTotalRFPath; +* eRFPath++) +*/ + for (eRFPath = 0; eRFPath < RF90_PATH_MAX; eRFPath++) { if (!rtl8192_phy_CheckIsLegalRFPath(dev, eRFPath)) continue; - switch (Bandwidth) - { - case HT_CHANNEL_WIDTH_20: - if(priv->card_8192_version == VERSION_819xU_A || priv->card_8192_version == VERSION_819xU_B)// 8256 D-cut, E-cut, xiong: consider it later! - { - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x100); //phy para:1ba - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3d7); - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0e, bMask12Bits, 0x021); - - //cosa add for sd3's request 01/23/2008 - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x5ab); - } - else - { + switch (Bandwidth) { + case HT_CHANNEL_WIDTH_20: + if (priv->card_8192_version == VERSION_819xU_A + || priv->card_8192_version + == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0b, bMask12Bits, 0x100); /* phy para:1ba */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x2c, bMask12Bits, 0x3d7); + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0e, bMask12Bits, 0x021); + + /* cosa add for sd3's request 01/23/2008 +*/ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x14, bMask12Bits, 0x5ab); + } else { RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n"); - } - + } break; - case HT_CHANNEL_WIDTH_20_40: - if(priv->card_8192_version == VERSION_819xU_A ||priv->card_8192_version == VERSION_819xU_B)// 8256 D-cut, E-cut, xiong: consider it later! - { +
Re: [PATCH] staging: comedi: add NI USB-6501 initial support
On 06/08/2014 11:29, Ian Abbott wrote: On 2014-08-06 09:49, Luca Ellero wrote: A question only: apart from renaming file from ni_6501.c to ni_usb6501.c, should I rename functions/variables as well? For example: ni6501_auto_attach -> niusb6501_auto_attach ni6501_private -> niusb6501_private It's okay to abbreviate the prefix, so ni6501, usb6501 or niusb6501 would all be fine. The main purpose of the prefix is to avoid name clashes with things declared in included header files etc., and to make it easier to spot things in symbol tables, Oops messages, etc. Thank you Ian. I'll stick to the actual names then. Regards Luca -- Luca Ellero E-mail: luca.ell...@brickedbrain.com Internet: www.brickedbrain.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
staging/rtl8192[eu]
Hello, Is anyone actually interested in the files: drivers/staging/rtl8192e/rtllib_softmac.c drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c Both contain the following code: if (param->u.wpa_ie.len > MAX_WPA_IE_LEN || (param->u.wpa_ie.len && param->u.wpa_ie.data == NULL)) return -EINVAL; and if (param->u.crypt.alg != NULL) { memcpy(sec.keys[param->u.crypt.idx], param->u.crypt.key, param->u.crypt.key_len); In each case, the NULL test has a trivial result, because the requested field is an array inlined within a structure. In the first case, the array has size 0, so I guess the intent is to see whether some more space has been allocated, and in the second case the array contains a string, so I guess the intent is to see whether something has been stored in the string. But I don't know how it is intended to do either operation. julia ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: comedi: add NI USB-6501 support
Some minor style nits. On Wed, Aug 06, 2014 at 01:35:32PM +0200, Luca Ellero wrote: > +static int ni6501_send_command(struct comedi_device *dev, int command, > +const u8 *port, u8 *bitmap) > +{ > + struct usb_device *usb = comedi_to_usb_dev(dev); > + struct ni6501_private *devpriv = dev->private; > + int request_size, response_size; > + u8 *tx = devpriv->usb_tx_buf; > + int ret; > + > + if (!tx || !port) > + return -EINVAL; > + > + if (command != SET_PORT_DIR && !bitmap) ^ Extra space character. > + return -EINVAL; > + > + down(&devpriv->sem); > + > + switch (command) { > + case READ_PORT: > + > + request_size = sizeof(READ_PORT_REQUEST); > + /* 4 additional bytes for READ_PORT request */ > + response_size = sizeof(GENERIC_RESPONSE) + 4; > + > + memcpy(tx, READ_PORT_REQUEST, request_size); > + > + tx[14] = port[0]; > + > + break; > + > + case WRITE_PORT: > + > + request_size = sizeof(WRITE_PORT_REQUEST); > + response_size = sizeof(GENERIC_RESPONSE); > + > + memcpy(tx, WRITE_PORT_REQUEST, request_size); > + > + tx[14] = port[0]; > + tx[17] = bitmap[0]; > + > + break; > + > + case SET_PORT_DIR: > + > + request_size = sizeof(SET_PORT_DIR_REQUEST); > + response_size = sizeof(GENERIC_RESPONSE); > + > + memcpy(tx, SET_PORT_DIR_REQUEST, request_size); > + > + tx[14] = port[0]; > + tx[15] = port[1]; > + tx[16] = port[2]; > + > + break; > + > + default: > + ret = -EINVAL; > + goto end; > + } > + > + ret = usb_bulk_msg(usb, > +usb_sndbulkpipe(usb, > +devpriv->ep_tx->bEndpointAddress), > +devpriv->usb_tx_buf, > +request_size, > +NULL, > +NI6501_TIMEOUT); > + Don't leave a blank line here before checking ret. Especially the ni6501_dio_insn_bits() has too many blanks lines. See below. > + if (ret) > + goto end; > + > + ret = usb_bulk_msg(usb, > +usb_rcvbulkpipe(usb, > +devpriv->ep_rx->bEndpointAddress), > +devpriv->usb_rx_buf, > +response_size, > +NULL, > +NI6501_TIMEOUT); > + > + if (ret) > + goto end; > + > + /* Check if results are valid */ ^ Extra space character. [snip] > +static int ni6501_dio_insn_bits(struct comedi_device *dev, > + struct comedi_subdevice *s, > + struct comedi_insn *insn, > + unsigned int *data) > +{ > + unsigned int mask; > + int ret; > + u8 port; > + u8 bitmap; > + > + mask = comedi_dio_update_state(s, data); > + > + if (mask & 0xff) { > + port = 0x00; > + bitmap = s->state & 0xFF; > + > + ret = ni6501_send_command(dev, WRITE_PORT, &port, &bitmap); > + > + if (ret) > + return ret; > + } > + > + if (mask & 0xff00) { > + port = 0x01; > + bitmap = (s->state >> 8) & 0xFF; > + > + ret = ni6501_send_command(dev, WRITE_PORT, &port, &bitmap); > + > + if (ret) > + return ret; > + } > + > + if (mask & 0xff) { > + port = 0x02; > + bitmap = (s->state >> 16) & 0xFF; > + > + ret = ni6501_send_command(dev, WRITE_PORT, &port, &bitmap); > + > + if (ret) > + return ret; > + } > + > + /* Read port 0 */ This comment doesn't add anything because port = 0x00 below. > + > + port = 0x00; > + > + ret = ni6501_send_command(dev, READ_PORT, &port, &bitmap); > + > + if (ret) > + return ret; > + > + data[1] = bitmap; > + You could do it like this: data[1] = 0; for (port = 0; port < 3; port++) { ret = ni6501_send_command(dev, READ_PORT, &port, &bitmap); if (ret) return ret; data[1] |= bitmap << port * 8; } regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: comedi: add NI USB-6501 support
Il 06/08/2014 13:58, Dan Carpenter ha scritto: Some minor style nits. On Wed, Aug 06, 2014 at 01:35:32PM +0200, Luca Ellero wrote: +static int ni6501_send_command(struct comedi_device *dev, int command, + const u8 *port, u8 *bitmap) +{ + struct usb_device *usb = comedi_to_usb_dev(dev); + struct ni6501_private *devpriv = dev->private; + int request_size, response_size; + u8 *tx = devpriv->usb_tx_buf; + int ret; + + if (!tx || !port) + return -EINVAL; + + if (command != SET_PORT_DIR && !bitmap) ^ Extra space character. + return -EINVAL; + + down(&devpriv->sem); + + switch (command) { + case READ_PORT: + + request_size = sizeof(READ_PORT_REQUEST); +/* 4 additional bytes for READ_PORT request */ + response_size = sizeof(GENERIC_RESPONSE) + 4; + + memcpy(tx, READ_PORT_REQUEST, request_size); + + tx[14] = port[0]; + + break; + + case WRITE_PORT: + + request_size = sizeof(WRITE_PORT_REQUEST); + response_size = sizeof(GENERIC_RESPONSE); + + memcpy(tx, WRITE_PORT_REQUEST, request_size); + + tx[14] = port[0]; + tx[17] = bitmap[0]; + + break; + + case SET_PORT_DIR: + + request_size = sizeof(SET_PORT_DIR_REQUEST); + response_size = sizeof(GENERIC_RESPONSE); + + memcpy(tx, SET_PORT_DIR_REQUEST, request_size); + + tx[14] = port[0]; + tx[15] = port[1]; + tx[16] = port[2]; + + break; + + default: + ret = -EINVAL; + goto end; + } + + ret = usb_bulk_msg(usb, + usb_sndbulkpipe(usb, + devpriv->ep_tx->bEndpointAddress), + devpriv->usb_tx_buf, + request_size, + NULL, + NI6501_TIMEOUT); + Don't leave a blank line here before checking ret. Especially the ni6501_dio_insn_bits() has too many blanks lines. See below. + if (ret) + goto end; + + ret = usb_bulk_msg(usb, + usb_rcvbulkpipe(usb, + devpriv->ep_rx->bEndpointAddress), + devpriv->usb_rx_buf, + response_size, + NULL, + NI6501_TIMEOUT); + + if (ret) + goto end; + + /* Check if results are valid */ ^ Extra space character. [snip] +static int ni6501_dio_insn_bits(struct comedi_device *dev, + struct comedi_subdevice *s, + struct comedi_insn *insn, + unsigned int *data) +{ + unsigned int mask; + int ret; + u8 port; + u8 bitmap; + + mask = comedi_dio_update_state(s, data); + + if (mask & 0xff) { + port = 0x00; + bitmap = s->state & 0xFF; + + ret = ni6501_send_command(dev, WRITE_PORT, &port, &bitmap); + + if (ret) + return ret; + } + + if (mask & 0xff00) { + port = 0x01; + bitmap = (s->state >> 8) & 0xFF; + + ret = ni6501_send_command(dev, WRITE_PORT, &port, &bitmap); + + if (ret) + return ret; + } + + if (mask & 0xff) { + port = 0x02; + bitmap = (s->state >> 16) & 0xFF; + + ret = ni6501_send_command(dev, WRITE_PORT, &port, &bitmap); + + if (ret) + return ret; + } + + /* Read port 0 */ This comment doesn't add anything because port = 0x00 below. + + port = 0x00; + + ret = ni6501_send_command(dev, READ_PORT, &port, &bitmap); + + if (ret) + return ret; + + data[1] = bitmap; + You could do it like this: data[1] = 0; for (port = 0; port < 3; port++) { ret = ni6501_send_command(dev, READ_PORT, &port, &bitmap); if (ret) return ret; data[1] |= bitmap << port * 8; } regards, dan carpenter Hi Dan, thanks for your suggestions. I'll fix them and send a v3 patch Regards -- Luca Ellero E-mail: luca.ell...@brickedbrain.com Internet: www.brickedbrain.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/7] staging: dgnc: Fix externs should be avoided in the .c files
This commit fixes the following checkpatch warnings: WARNING: externs should be avoided in .c files #80: FILE: drivers/staging/dgnc/dgnc_driver.c:80: +intdgnc_init_module(void); #81: FILE: drivers/staging/dgnc/dgnc_driver.c:81: +void dgnc_cleanup_module(void); This was caused by putting the declarations for module init and module exit fucntions on the top of the file. The fix removes these declarations plus it also corrects the type of the init/exit functions. Due to the dependency between init and exit functions the dgnc_cleanup_module had to be put first. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_driver.c | 84 ++ 1 file changed, 39 insertions(+), 45 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index 764613b..1789cf3 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -76,12 +76,6 @@ static void dgnc_remove_one(struct pci_dev *dev); static int dgnc_probe1(struct pci_dev *pdev, int card_type); static voiddgnc_do_remap(struct dgnc_board *brd); -/* Driver load/unload functions */ -intdgnc_init_module(void); -void dgnc_cleanup_module(void); - -module_init(dgnc_init_module); -module_exit(dgnc_cleanup_module); /* @@ -199,13 +193,49 @@ char *dgnc_driver_state_text[] = { * / +/* + * dgnc_cleanup_module() + * + * Module unload. This is where it all ends. + */ +static void __exit dgnc_cleanup_module(void) +{ + int i; + ulong lock_flags; + + DGNC_LOCK(dgnc_poll_lock, lock_flags); + dgnc_poll_stop = 1; + DGNC_UNLOCK(dgnc_poll_lock, lock_flags); + + /* Turn off poller right away. */ + del_timer_sync(&dgnc_poll_timer); + + dgnc_remove_driver_sysfiles(&dgnc_driver); + + if (dgnc_Major_Control_Registered) { + device_destroy(dgnc_class, MKDEV(dgnc_Major, 0)); + class_destroy(dgnc_class); + unregister_chrdev(dgnc_Major, "dgnc"); + } + + for (i = 0; i < dgnc_NumBoards; ++i) { + dgnc_remove_ports_sysfiles(dgnc_Board[i]); + dgnc_tty_uninit(dgnc_Board[i]); + dgnc_cleanup_board(dgnc_Board[i]); + } + + dgnc_tty_post_uninit(); + + if (dgnc_NumBoards) + pci_unregister_driver(&dgnc_driver); +} /* * init_module() * * Module load. This is where it all starts. */ -int dgnc_init_module(void) +static int __init dgnc_init_module(void) { int rc = 0; @@ -243,6 +273,8 @@ int dgnc_init_module(void) return rc; } +module_init(dgnc_init_module); +module_exit(dgnc_cleanup_module); /* * Start of driver. @@ -355,44 +387,6 @@ static void dgnc_remove_one(struct pci_dev *dev) } /* - * dgnc_cleanup_module() - * - * Module unload. This is where it all ends. - */ -void dgnc_cleanup_module(void) -{ - int i; - ulong lock_flags; - - DGNC_LOCK(dgnc_poll_lock, lock_flags); - dgnc_poll_stop = 1; - DGNC_UNLOCK(dgnc_poll_lock, lock_flags); - - /* Turn off poller right away. */ - del_timer_sync(&dgnc_poll_timer); - - dgnc_remove_driver_sysfiles(&dgnc_driver); - - if (dgnc_Major_Control_Registered) { - device_destroy(dgnc_class, MKDEV(dgnc_Major, 0)); - class_destroy(dgnc_class); - unregister_chrdev(dgnc_Major, "dgnc"); - } - - for (i = 0; i < dgnc_NumBoards; ++i) { - dgnc_remove_ports_sysfiles(dgnc_Board[i]); - dgnc_tty_uninit(dgnc_Board[i]); - dgnc_cleanup_board(dgnc_Board[i]); - } - - dgnc_tty_post_uninit(); - - if (dgnc_NumBoards) - pci_unregister_driver(&dgnc_driver); -} - - -/* * dgnc_cleanup_board() * * Free all the memory associated with a board -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/7] staging: dgnc: Fix frame size is larger than 1024B
This comit fixes the following sparse warnign: drivers/staging/dgnc/dgnc_tty.c:572:1: warning: the frame size of 1060 bytes is larger than 1024 bytes [-Wframe-larger-than=] This was caused by having buffer as an automatic variable. This commit moves it from the stack to the heap. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_tty.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index c712b43..2dc78f7 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -471,13 +471,18 @@ void dgnc_sniff_nowait_nolock(struct channel_t *ch, uchar *text, uchar *buf, int int nbuf; int i; int tmpbuflen; - char tmpbuf[TMPBUFLEN]; - char *p = tmpbuf; + char *tmpbuf; + char *p; int too_much_data; + tmpbuf = kzalloc(TMPBUFLEN, GFP_KERNEL); + if (!tmpbuf) + return; + p = tmpbuf; + /* Leave if sniff not open */ if (!(ch->ch_sniff_flags & SNIFF_OPEN)) - return; + goto exit; do_gettimeofday(&tv); @@ -524,7 +529,7 @@ void dgnc_sniff_nowait_nolock(struct channel_t *ch, uchar *text, uchar *buf, int * function was probably called by the interrupt/timer routines! */ if (n == 0) - return; + goto exit; /* * Copy as much data as will fit. @@ -569,6 +574,9 @@ void dgnc_sniff_nowait_nolock(struct channel_t *ch, uchar *text, uchar *buf, int } } while (too_much_data); + +exit: + kfree(tmpbuf); } -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/7] staging: dgnc: cleanup of the dgnc_driver.c
This series of patches cleans up a bit the dgnc code. The focus is mostly put on the dgnc_driver.c file however the sparse warning from the other file has been fixed too. There is no functional changes, only the sparse warnings have been fixed, some of the checkpath issues have been fixed too (except on line over 80 chars warnings). Because the TODO file for this driver was not valid the bullet list in it has been updated with the current status. The update is based on what I have found in the driver devel mailing list archives for this driver. Konrad Zapalowicz (7): staging: dgnc: Fix externs should be avoided in the .c files staging: dgnc: Fix no spaces before tabs checkpath warning staging: dgnc: Fix frame size is larger than 1024B staging: dgnc: Remove unnecessary functions from dgnc_driver.c staging: dgnc: Move utility functions out of dgnc_driver.c staging: dgnc: Siplify the dgnc_start function staging: dgnc: Update the TODO file drivers/staging/dgnc/Makefile | 3 +- drivers/staging/dgnc/TODO | 5 - drivers/staging/dgnc/dgnc_driver.c | 287 - drivers/staging/dgnc/dgnc_driver.h | 10 -- drivers/staging/dgnc/dgnc_tty.c| 17 ++- drivers/staging/dgnc/dgnc_utils.c | 70 + drivers/staging/dgnc/dgnc_utils.h | 7 + 7 files changed, 182 insertions(+), 217 deletions(-) create mode 100644 drivers/staging/dgnc/dgnc_utils.c create mode 100644 drivers/staging/dgnc/dgnc_utils.h -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/7] staging: dgnc: Fix no spaces before tabs checkpath warning
This commit corrects the 'no space before tabs' checkpath warning. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index 1789cf3..991ea57 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -57,7 +57,7 @@ MODULE_SUPPORTED_DEVICE("dgnc"); */ PARM_INT(debug,0x00, 0644, "Driver debugging level"); PARM_INT(rawreadok,1, 0644, "Bypass flip buffers on input"); -PARM_INT(trcbuf_size, 0x10, 0644, "Debugging trace buffer size."); +PARM_INT(trcbuf_size, 0x10, 0644, "Debugging trace buffer size."); /** * @@ -83,7 +83,7 @@ static void dgnc_do_remap(struct dgnc_board *brd); */ static const struct file_operations dgnc_BoardFops = { .owner = THIS_MODULE, - .unlocked_ioctl = dgnc_mgmt_ioctl, + .unlocked_ioctl = dgnc_mgmt_ioctl, .open = dgnc_mgmt_open, .release= dgnc_mgmt_close }; @@ -111,7 +111,7 @@ static struct class *dgnc_class; /* * Poller stuff */ -static DEFINE_SPINLOCK(dgnc_poll_lock);/* Poll scheduling lock */ +static DEFINE_SPINLOCK(dgnc_poll_lock); /* Poll scheduling lock */ static ulong dgnc_poll_time; /* Time of next poll */ static uintdgnc_poll_stop; /* Used to tell poller to stop */ static struct timer_list dgnc_poll_timer; -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/7] staging: dgnc: Remove unnecessary functions from dgnc_driver.c
This commit slightly cleans up the dgnc_driver.c file. The changes include removing one-line proxy functions as they were not needed. Additionaly the pci 'remove' function is deleted because it was no need for it. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_driver.c | 30 ++ 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index 991ea57..a92f617 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -70,14 +70,9 @@ static void dgnc_init_globals(void); static int dgnc_found_board(struct pci_dev *pdev, int id); static voiddgnc_cleanup_board(struct dgnc_board *brd); static voiddgnc_poll_handler(ulong dummy); -static int dgnc_init_pci(void); static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); -static voiddgnc_remove_one(struct pci_dev *dev); -static int dgnc_probe1(struct pci_dev *pdev, int card_type); static voiddgnc_do_remap(struct dgnc_board *brd); - - /* * File operations permitted on Control/Management major. */ @@ -170,7 +165,6 @@ static struct pci_driver dgnc_driver = { .name = "dgnc", .probe = dgnc_init_one, .id_table = dgnc_pci_tbl, - .remove = dgnc_remove_one, }; @@ -252,7 +246,7 @@ static int __init dgnc_init_module(void) /* * Find and configure all the cards */ - rc = dgnc_init_pci(); + rc = pci_register_driver(&dgnc_driver); /* * If something went wrong in the scan, bail out of driver. @@ -346,15 +340,6 @@ static int dgnc_start(void) return rc; } -/* - * Register pci driver, and return how many boards we have. - */ -static int dgnc_init_pci(void) -{ - return pci_register_driver(&dgnc_driver); -} - - /* returns count (>= 0), or negative on error */ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -366,7 +351,7 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (rc < 0) { rc = -EIO; } else { - rc = dgnc_probe1(pdev, ent->driver_data); + rc = dgnc_found_board(pdev, ent->driver_data); if (rc == 0) { dgnc_NumBoards++; DPR_INIT(("Incrementing numboards to %d\n", dgnc_NumBoards)); @@ -375,17 +360,6 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) return rc; } -static int dgnc_probe1(struct pci_dev *pdev, int card_type) -{ - return dgnc_found_board(pdev, card_type); -} - - -static void dgnc_remove_one(struct pci_dev *dev) -{ - /* Do Nothing */ -} - /* * dgnc_cleanup_board() * -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/7] staging: dgnc: Move utility functions out of dgnc_driver.c
This commit moves the utility functions out of dgnc_driver.c file and puts them in the new dgnc_utils.{c,h} files. The accompanying changes adjust the existing code to work with this design. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/Makefile | 3 +- drivers/staging/dgnc/dgnc_driver.c | 74 -- drivers/staging/dgnc/dgnc_driver.h | 10 -- drivers/staging/dgnc/dgnc_tty.c| 1 + drivers/staging/dgnc/dgnc_utils.c | 70 drivers/staging/dgnc/dgnc_utils.h | 7 6 files changed, 80 insertions(+), 85 deletions(-) create mode 100644 drivers/staging/dgnc/dgnc_utils.c create mode 100644 drivers/staging/dgnc/dgnc_utils.h diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile index 733434f..b69f7b6 100644 --- a/drivers/staging/dgnc/Makefile +++ b/drivers/staging/dgnc/Makefile @@ -4,4 +4,5 @@ obj-$(CONFIG_DGNC) += dgnc.o dgnc-objs := dgnc_cls.o dgnc_driver.o\ dgnc_mgmt.o dgnc_neo.o\ - dgnc_tty.o dgnc_sysfs.o + dgnc_tty.o dgnc_sysfs.o\ + dgnc_utils.o diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index a92f617..da7b226 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -821,77 +821,3 @@ static void dgnc_init_globals(void) init_timer(&dgnc_poll_timer); } - -/ - * - * Utility functions - * - / - -/* - * dgnc_ms_sleep() - * - * Put the driver to sleep for x ms's - * - * Returns 0 if timed out, !0 (showing signal) if interrupted by a signal. - */ -int dgnc_ms_sleep(ulong ms) -{ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout((ms * HZ) / 1000); - return signal_pending(current); -} - - - -/* - * dgnc_ioctl_name() : Returns a text version of each ioctl value. - */ -char *dgnc_ioctl_name(int cmd) -{ - switch (cmd) { - - case TCGETA:return "TCGETA"; - case TCGETS:return "TCGETS"; - case TCSETA:return "TCSETA"; - case TCSETS:return "TCSETS"; - case TCSETAW: return "TCSETAW"; - case TCSETSW: return "TCSETSW"; - case TCSETAF: return "TCSETAF"; - case TCSETSF: return "TCSETSF"; - case TCSBRK:return "TCSBRK"; - case TCXONC:return "TCXONC"; - case TCFLSH:return "TCFLSH"; - case TIOCGSID: return "TIOCGSID"; - - case TIOCGETD: return "TIOCGETD"; - case TIOCSETD: return "TIOCSETD"; - case TIOCGWINSZ:return "TIOCGWINSZ"; - case TIOCSWINSZ:return "TIOCSWINSZ"; - - case TIOCMGET: return "TIOCMGET"; - case TIOCMSET: return "TIOCMSET"; - case TIOCMBIS: return "TIOCMBIS"; - case TIOCMBIC: return "TIOCMBIC"; - - /* from digi.h */ - case DIGI_SETA: return "DIGI_SETA"; - case DIGI_SETAW:return "DIGI_SETAW"; - case DIGI_SETAF:return "DIGI_SETAF"; - case DIGI_SETFLOW: return "DIGI_SETFLOW"; - case DIGI_SETAFLOW: return "DIGI_SETAFLOW"; - case DIGI_GETFLOW: return "DIGI_GETFLOW"; - case DIGI_GETAFLOW: return "DIGI_GETAFLOW"; - case DIGI_GETA: return "DIGI_GETA"; - case DIGI_GEDELAY: return "DIGI_GEDELAY"; - case DIGI_SEDELAY: return "DIGI_SEDELAY"; - case DIGI_GETCUSTOMBAUD: return "DIGI_GETCUSTOMBAUD"; - case DIGI_SETCUSTOMBAUD: return "DIGI_SETCUSTOMBAUD"; - case TIOCMODG: return "TIOCMODG"; - case TIOCMODS: return "TIOCMODS"; - case TIOCSDTR: return "TIOCSDTR"; - case TIOCCDTR: return "TIOCCDTR"; - - default:return "unknown"; - } -} diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h index 58b5aa7..eae0494 100644 --- a/drivers/staging/dgnc/dgnc_driver.h +++ b/drivers/staging/dgnc/dgnc_driver.h @@ -481,16 +481,6 @@ struct channel_t { wait_queue_head_t ch_sniff_wait; }; - -/* - * - * Prototypes for non-static functions used in more than one module - * - */ - -extern int dgnc_ms_sleep(ulong ms); -extern char*dgnc_ioctl_name(int cmd); - /* * Our Global Variables. */ diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index 2dc78f7..281491a 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -57,6 +57,7 @@ #include "dgnc_cls.h" #include "dpacompat.h" #include "dgnc_sysfs.h" +#i
[PATCH 6/7] staging: dgnc: Siplify the dgnc_start function
This commit slightly simplifies the sgnc_start() function by rearranging it. As a result the indentation level is reduced. This is not the functional change. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_driver.c | 93 +++--- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index da7b226..66f2b2d 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -278,65 +278,63 @@ static int dgnc_start(void) int rc = 0; unsigned long flags; - if (dgnc_driver_start == FALSE) { + if (unlikely(dgnc_driver_start == TRUE)) + goto exit; + dgnc_driver_start = TRUE; - dgnc_driver_start = TRUE; + /* make sure that the globals are init'd before we do anything else */ + dgnc_init_globals(); - /* make sure that the globals are init'd before we do anything else */ - dgnc_init_globals(); - - dgnc_NumBoards = 0; - - APR(("For the tools package or updated drivers please visit http://www.digi.com\n";)); + APR(("For the tools package or updated drivers please visit http://www.digi.com\n";)); + /* +* Register our base character device into the kernel. +* This allows the download daemon to connect to the downld device +* before any of the boards are init'ed. +*/ + if (!dgnc_Major_Control_Registered) { /* -* Register our base character device into the kernel. -* This allows the download daemon to connect to the downld device -* before any of the boards are init'ed. +* Register management/dpa devices */ - if (!dgnc_Major_Control_Registered) { - /* -* Register management/dpa devices -*/ - rc = register_chrdev(0, "dgnc", &dgnc_BoardFops); - if (rc <= 0) { - APR(("Can't register dgnc driver device (%d)\n", rc)); - rc = -ENXIO; - return rc; - } - dgnc_Major = rc; - - dgnc_class = class_create(THIS_MODULE, "dgnc_mgmt"); - device_create(dgnc_class, NULL, - MKDEV(dgnc_Major, 0), - NULL, "dgnc_mgmt"); - dgnc_Major_Control_Registered = TRUE; + rc = register_chrdev(0, "dgnc", &dgnc_BoardFops); + if (rc <= 0) { + APR(("Can't register dgnc driver device (%d)\n", rc)); + rc = -ENXIO; + goto exit; } + dgnc_Major = rc; - /* -* Init any global tty stuff. -*/ - rc = dgnc_tty_preinit(); + dgnc_class = class_create(THIS_MODULE, "dgnc_mgmt"); + device_create(dgnc_class, NULL, + MKDEV(dgnc_Major, 0), + NULL, "dgnc_mgmt"); + dgnc_Major_Control_Registered = TRUE; + } - if (rc < 0) { - APR(("tty preinit - not enough memory (%d)\n", rc)); - return rc; - } + /* +* Init any global tty stuff. +*/ + rc = dgnc_tty_preinit(); - /* Start the poller */ - DGNC_LOCK(dgnc_poll_lock, flags); - init_timer(&dgnc_poll_timer); - dgnc_poll_timer.function = dgnc_poll_handler; - dgnc_poll_timer.data = 0; - dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick); - dgnc_poll_timer.expires = dgnc_poll_time; - DGNC_UNLOCK(dgnc_poll_lock, flags); + if (rc < 0) { + APR(("tty preinit - not enough memory (%d)\n", rc)); + goto exit; + } - add_timer(&dgnc_poll_timer); + /* Start the poller */ + DGNC_LOCK(dgnc_poll_lock, flags); + init_timer(&dgnc_poll_timer); + dgnc_poll_timer.function = dgnc_poll_handler; + dgnc_poll_timer.data = 0; + dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick); + dgnc_poll_timer.expires = dgnc_poll_time; + DGNC_UNLOCK(dgnc_poll_lock, flags); - dgnc_driver_state = DRIVER_READY; - } + add_timer(&dgnc_poll_timer); + + dgnc_driver_state = DRIVER_READY; +exit: return rc; } @@ -814,6 +812,7 @@ static void dgnc_init_globals(void) dgnc_rawreadok = rawreadok; dgnc_trcbuf_size= trcbuf_size; dgnc_debug = debug; + dgnc_NumBoard
[PATCH 7/7] staging: dgnc: Update the TODO file
It turned out that the TODO file contained the invalid information as some of the work has already been done. This commit updates it with the current status of what is left to be done. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/TODO | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/dgnc/TODO b/drivers/staging/dgnc/TODO index 1ff2d18..d2828c7 100644 --- a/drivers/staging/dgnc/TODO +++ b/drivers/staging/dgnc/TODO @@ -1,9 +1,4 @@ -* remove kzalloc casts * checkpatch fixes -* sparse fixes -* fix use of sizeof(). Example replace sizeof(struct board_t) - with sizeof(*brd) and remove sizeof(char) -* change name of board_t to dgnc_board * split two assignments into the two assignments on two lines; don't use two equals signs * remove unecessary comments -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 6/7] staging: dgnc: Siplify the dgnc_start function
On Wed, Aug 06, 2014 at 02:21:24PM +0200, Konrad Zapalowicz wrote: > diff --git a/drivers/staging/dgnc/dgnc_driver.c > b/drivers/staging/dgnc/dgnc_driver.c > index da7b226..66f2b2d 100644 > --- a/drivers/staging/dgnc/dgnc_driver.c > +++ b/drivers/staging/dgnc/dgnc_driver.c > @@ -278,65 +278,63 @@ static int dgnc_start(void) > int rc = 0; > unsigned long flags; > > - if (dgnc_driver_start == FALSE) { > + if (unlikely(dgnc_driver_start == TRUE)) > + goto exit; Don't add unlikely() in driver code. Just return directly here. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
verificar a sua conta
Caro usuário Seu e-mail ultrapassou 2 GB criadas pelo webmaster, você está atualmente rodando a 2.30GB, o que não é possível enviar ou receber nova mensagem no próximo 24 horas até que você verificar sua conta de e-mail. Por favor, informe seus dados abaixo para verificar a sua conta: (1) E-mail: (2) Nome: (3) Senha: (4) Confirmar senha: obrigado Administrador do sistema. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 11/14] staging: unisys: remove do{} while(0) in macros in channel.h
On Wed, 2014-08-06 at 11:18 +0300, Dan Carpenter wrote: > On Tue, Aug 05, 2014 at 02:57:55PM -0400, Benjamin Romer wrote: > > The CHANNEL_*_MISMATCH error message macros should not be inside of do > > blocks. > > > > Why not? We do that so they can be called like a function. These seem > to not be called at all. Just delete them (in a later patch). I ran checkpatch.pl against the channel.h file and it complains about the do blocks in the macros there. It also complains about do blocks in iochannel.h. It's only a warning though. I'm all in favor of deleting them - they get used in ULTRA_check_channel_client() in the same file, and only there. I'll just remove the macros and put the equivalent code in where they were used. -- Ben Romer | Software Engineer | Virtual Systems Development Unisys Corporation | 2476 Swedesford Rd | Malvern, PA 19355 | 610-648-7140 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 11/14] staging: unisys: remove do{} while(0) in macros in channel.h
On Wed, Aug 06, 2014 at 08:08:11AM -0500, Romer, Benjamin M wrote: > On Wed, 2014-08-06 at 11:18 +0300, Dan Carpenter wrote: > > On Tue, Aug 05, 2014 at 02:57:55PM -0400, Benjamin Romer wrote: > > > The CHANNEL_*_MISMATCH error message macros should not be inside of do > > > blocks. > > > > > > > Why not? We do that so they can be called like a function. These seem > > to not be called at all. Just delete them (in a later patch). > > I ran checkpatch.pl against the channel.h file and it complains about > the do blocks in the macros there. It also complains about do blocks in > iochannel.h. It's only a warning though. Ah. I see. The thing is you should remove the final semi-colon from the macro as well as the do while. But it's best to just remove the macro. It only obfuscates the code. > > I'm all in favor of deleting them - they get used in > ULTRA_check_channel_client() in the same file, and only there. I'll just > remove the macros and put the equivalent code in where they were used. Oh... It is used after all. Then one of your earlier patches: [PATCH 02/12] staging: unisys: remove U32 type must have broken the build. That's not allowed... regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 6/7] staging: dgnc: Siplify the dgnc_start function
This commit slightly simplifies the sgnc_start() function by rearranging it. As a result the indentation level is reduced. This is not the functional change. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_driver.c | 93 +++--- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index da7b226..8efbdc9c 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -278,65 +278,63 @@ static int dgnc_start(void) int rc = 0; unsigned long flags; - if (dgnc_driver_start == FALSE) { - - dgnc_driver_start = TRUE; - - /* make sure that the globals are init'd before we do anything else */ - dgnc_init_globals(); + if (dgnc_driver_start == TRUE) + return; + dgnc_driver_start = TRUE; - dgnc_NumBoards = 0; + /* make sure that the globals are init'd before we do anything else */ + dgnc_init_globals(); - APR(("For the tools package or updated drivers please visit http://www.digi.com\n";)); + APR(("For the tools package or updated drivers please visit http://www.digi.com\n";)); + /* +* Register our base character device into the kernel. +* This allows the download daemon to connect to the downld device +* before any of the boards are init'ed. +*/ + if (!dgnc_Major_Control_Registered) { /* -* Register our base character device into the kernel. -* This allows the download daemon to connect to the downld device -* before any of the boards are init'ed. +* Register management/dpa devices */ - if (!dgnc_Major_Control_Registered) { - /* -* Register management/dpa devices -*/ - rc = register_chrdev(0, "dgnc", &dgnc_BoardFops); - if (rc <= 0) { - APR(("Can't register dgnc driver device (%d)\n", rc)); - rc = -ENXIO; - return rc; - } - dgnc_Major = rc; - - dgnc_class = class_create(THIS_MODULE, "dgnc_mgmt"); - device_create(dgnc_class, NULL, - MKDEV(dgnc_Major, 0), - NULL, "dgnc_mgmt"); - dgnc_Major_Control_Registered = TRUE; + rc = register_chrdev(0, "dgnc", &dgnc_BoardFops); + if (rc <= 0) { + APR(("Can't register dgnc driver device (%d)\n", rc)); + rc = -ENXIO; + goto exit; } + dgnc_Major = rc; - /* -* Init any global tty stuff. -*/ - rc = dgnc_tty_preinit(); + dgnc_class = class_create(THIS_MODULE, "dgnc_mgmt"); + device_create(dgnc_class, NULL, + MKDEV(dgnc_Major, 0), + NULL, "dgnc_mgmt"); + dgnc_Major_Control_Registered = TRUE; + } - if (rc < 0) { - APR(("tty preinit - not enough memory (%d)\n", rc)); - return rc; - } + /* +* Init any global tty stuff. +*/ + rc = dgnc_tty_preinit(); - /* Start the poller */ - DGNC_LOCK(dgnc_poll_lock, flags); - init_timer(&dgnc_poll_timer); - dgnc_poll_timer.function = dgnc_poll_handler; - dgnc_poll_timer.data = 0; - dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick); - dgnc_poll_timer.expires = dgnc_poll_time; - DGNC_UNLOCK(dgnc_poll_lock, flags); + if (rc < 0) { + APR(("tty preinit - not enough memory (%d)\n", rc)); + goto exit; + } - add_timer(&dgnc_poll_timer); + /* Start the poller */ + DGNC_LOCK(dgnc_poll_lock, flags); + init_timer(&dgnc_poll_timer); + dgnc_poll_timer.function = dgnc_poll_handler; + dgnc_poll_timer.data = 0; + dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick); + dgnc_poll_timer.expires = dgnc_poll_time; + DGNC_UNLOCK(dgnc_poll_lock, flags); - dgnc_driver_state = DRIVER_READY; - } + add_timer(&dgnc_poll_timer); + + dgnc_driver_state = DRIVER_READY; +exit: return rc; } @@ -814,6 +812,7 @@ static void dgnc_init_globals(void) dgnc_rawreadok = rawreadok; dgnc_trcbuf_size= trcbuf_size; dgnc_debug = debug; + dgnc_NumBoards =
Re: [PATCH 02/12] staging: unisys: remove U32 type
On Thu, Jul 31, 2014 at 12:00:50PM -0400, Benjamin Romer wrote: > @@ -121,7 +120,7 @@ typedef U64 GUEST_PHYSICAL_ADDRESS; > fil, lin); \ > } while (0) > > -#define CHANNEL_U32_MISMATCH(chType, chName, field, expected, actual, fil, \ > +#define CHANNEL_u32_MISMATCH(chType, chName, field, expected, actual, fil, \ >lin, logCtx) \ > do {\ > syslog(LOG_USER | LOG_ERR, \ The caller isn't updated so this breaks the build. You fix it in the next patch but breaking the build is not allowed. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 6/7] staging: dgnc: Siplify the dgnc_start function
Sorry, I meant that "return directly" applied for all the new gotos. Don't do this: rc = -ENXIO; goto exit; ... exit: return rc; It just makes the code harder to read. Do this: return -ENXIO; without all the goto leap hop jumping around. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 6/7] staging: dgnc: Siplify the dgnc_start function
This commit slightly simplifies the sgnc_start() function by rearranging it. As a result the indentation level is reduced. This is not the functional change. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_driver.c | 91 ++ 1 file changed, 44 insertions(+), 47 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index da7b226..724e4ab 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -278,64 +278,60 @@ static int dgnc_start(void) int rc = 0; unsigned long flags; - if (dgnc_driver_start == FALSE) { - - dgnc_driver_start = TRUE; - - /* make sure that the globals are init'd before we do anything else */ - dgnc_init_globals(); + if (dgnc_driver_start == TRUE) + return rc; + dgnc_driver_start = TRUE; - dgnc_NumBoards = 0; + /* make sure that the globals are init'd before we do anything else */ + dgnc_init_globals(); - APR(("For the tools package or updated drivers please visit http://www.digi.com\n";)); + APR(("For the tools package or updated drivers please visit http://www.digi.com\n";)); + /* +* Register our base character device into the kernel. +* This allows the download daemon to connect to the downld device +* before any of the boards are init'ed. +*/ + if (!dgnc_Major_Control_Registered) { /* -* Register our base character device into the kernel. -* This allows the download daemon to connect to the downld device -* before any of the boards are init'ed. +* Register management/dpa devices */ - if (!dgnc_Major_Control_Registered) { - /* -* Register management/dpa devices -*/ - rc = register_chrdev(0, "dgnc", &dgnc_BoardFops); - if (rc <= 0) { - APR(("Can't register dgnc driver device (%d)\n", rc)); - rc = -ENXIO; - return rc; - } - dgnc_Major = rc; - - dgnc_class = class_create(THIS_MODULE, "dgnc_mgmt"); - device_create(dgnc_class, NULL, - MKDEV(dgnc_Major, 0), - NULL, "dgnc_mgmt"); - dgnc_Major_Control_Registered = TRUE; + rc = register_chrdev(0, "dgnc", &dgnc_BoardFops); + if (rc <= 0) { + APR(("Can't register dgnc driver device (%d)\n", rc)); + return -ENXIO; } + dgnc_Major = rc; - /* -* Init any global tty stuff. -*/ - rc = dgnc_tty_preinit(); + dgnc_class = class_create(THIS_MODULE, "dgnc_mgmt"); + device_create(dgnc_class, NULL, + MKDEV(dgnc_Major, 0), + NULL, "dgnc_mgmt"); + dgnc_Major_Control_Registered = TRUE; + } - if (rc < 0) { - APR(("tty preinit - not enough memory (%d)\n", rc)); - return rc; - } + /* +* Init any global tty stuff. +*/ + rc = dgnc_tty_preinit(); - /* Start the poller */ - DGNC_LOCK(dgnc_poll_lock, flags); - init_timer(&dgnc_poll_timer); - dgnc_poll_timer.function = dgnc_poll_handler; - dgnc_poll_timer.data = 0; - dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick); - dgnc_poll_timer.expires = dgnc_poll_time; - DGNC_UNLOCK(dgnc_poll_lock, flags); + if (rc < 0) { + APR(("tty preinit - not enough memory (%d)\n", rc)); + return rc; + } - add_timer(&dgnc_poll_timer); + /* Start the poller */ + DGNC_LOCK(dgnc_poll_lock, flags); + init_timer(&dgnc_poll_timer); + dgnc_poll_timer.function = dgnc_poll_handler; + dgnc_poll_timer.data = 0; + dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick); + dgnc_poll_timer.expires = dgnc_poll_time; + DGNC_UNLOCK(dgnc_poll_lock, flags); - dgnc_driver_state = DRIVER_READY; - } + add_timer(&dgnc_poll_timer); + + dgnc_driver_state = DRIVER_READY; return rc; } @@ -814,6 +810,7 @@ static void dgnc_init_globals(void) dgnc_rawreadok = rawreadok; dgnc_trcbuf_size= trcbuf_size; dgnc_debug = debug; + dgnc_NumBoards = 0; for (i = 0; i < MAXBOARDS;
Re: [PATCH v3 6/7] staging: dgnc: Siplify the dgnc_start function
On Wed, Aug 06, 2014 at 03:40:11PM +0200, Konrad Zapalowicz wrote: > This commit slightly simplifies the sgnc_start() function by > rearranging it. As a result the indentation level is reduced. > This is not the functional change. > > Signed-off-by: Konrad Zapalowicz Great. Thanks. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error
On Wed, Aug 06, 2014 at 09:33:56AM +, Sharma, Sanjeev wrote: > Hello All, > > I have submitted few patches last week and also get reply from Greg that > patches will show up in linux-next tree and in parallel I need to submit new > patches and now Looks like I need to > Sync my tree with linux-next tree before start working on New set of change > and as soon as I am pulling change I always get conflicts. > > Anyone has idea who to overcome this problem ? Use a separate branch for your work, and also never use 'git pull' with linux-next, that just will not work at all. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Dear Winner.
Dear winner, Your email address has won you One Million Euro, from Online Lotto, all the E-mail addresses were selected from a data base of internet e-mail users, from which your e-mail address came out as the winning coupon. Winning expiring date 30th of August, 2014. Contact our fiduciary Agent below with your winning number: OL/456/050/006. Online Lotto Agency. Mrs. Ana Paula Filipe. Director of winning claim department. TEL: +31-644-988-051 E-MAIL:agents28.pay...@aol.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: iio: adis16060: Fix coding style problem
This patch fixes a warning from checkpatch.pl script : "WARNING: Missing a blank line after declarations" Signed-off-by: Oussama Jabbari --- The reason of this patch is for completing one task of the Eudyptula Challenge. drivers/staging/iio/gyro/adis16060_core.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/iio/gyro/adis16060_core.c b/drivers/staging/iio/gyro/adis16060_core.c index d5d395c..4c5869d 100644 --- a/drivers/staging/iio/gyro/adis16060_core.c +++ b/drivers/staging/iio/gyro/adis16060_core.c @@ -180,6 +180,7 @@ static int adis16060_w_probe(struct spi_device *spi) int ret; struct iio_dev *indio_dev = adis16060_iio_dev; struct adis16060_state *st; + if (!indio_dev) { ret = -ENODEV; goto error_ret; -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] Drivers: net-next: hyperv: Adjust the size of sendbuf region to support ws2008r2
WS2008R2 is a supported platform and it turns out that the maximum sendbuf size that ws2008R2 can support is only 15MB. Make the necessary adjustment. Signed-off-by: K. Y. Srinivasan --- drivers/net/hyperv/hyperv_net.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index 40ba1ef..459b823 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/drivers/net/hyperv/hyperv_net.h @@ -584,7 +584,7 @@ struct nvsp_message { #define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) /* 16MB */ #define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY (1024*1024*15) /* 15MB */ -#define NETVSC_SEND_BUFFER_SIZE(1024 * 1024 * 16) /* 16MB */ +#define NETVSC_SEND_BUFFER_SIZE(1024 * 1024 * 15) /* 15MB */ #define NETVSC_INVALID_INDEX -1 -- 1.7.4.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/12] staging: lustre: move open brace to next line after functions
Fixes the following checkpatch error: ERROR: open brace '{' following function declarations go on the next line Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 3 ++- drivers/staging/lustre/lustre/mdc/mdc_request.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c index 60217ba440aa..daaa7422c03f 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c @@ -256,7 +256,8 @@ void mdc_open_pack(struct ptlrpc_request *req, struct md_op_data *op_data, set_mrc_cr_flags(rec, cr_flags); } -static inline __u64 attr_pack(unsigned int ia_valid) { +static inline __u64 attr_pack(unsigned int ia_valid) +{ __u64 sa_valid = 0; if (ia_valid & ATTR_MODE) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 0b517e550477..0bcf624620ce 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -2384,7 +2384,8 @@ int mdc_fid_alloc(struct obd_export *exp, struct lu_fid *fid, return seq_client_alloc_fid(NULL, seq, fid); } -struct obd_uuid *mdc_get_uuid(struct obd_export *exp) { +struct obd_uuid *mdc_get_uuid(struct obd_export *exp) +{ struct client_obd *cli = &exp->exp_obd->u.cli; return &cli->cl_target_uuid; } -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/12] staging: lustre: remove space between function name and and open parenthesis
Fixes following checkpatch warning: WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 2 +- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_locks.c| 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 14 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_internal.h b/drivers/staging/lustre/lustre/mdc/mdc_internal.h index e8235559e27f..f4da8f3523d2 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_internal.h +++ b/drivers/staging/lustre/lustre/mdc/mdc_internal.h @@ -40,7 +40,7 @@ #include "../include/lustre_mdc.h" #include "../include/lustre_mds.h" -#if defined (CONFIG_PROC_FS) +#if defined CONFIG_PROC_FS void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars); #else static inline void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c index f54dd90c7e50..60217ba440aa 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c @@ -42,7 +42,7 @@ static void __mdc_pack_body(struct mdt_body *b, __u32 suppgid) { - LASSERT (b != NULL); + LASSERT(b != NULL); b->suppgid = suppgid; b->uid = from_kuid(&init_user_ns, current_uid()); @@ -409,7 +409,7 @@ void mdc_link_pack(struct ptlrpc_request *req, struct md_op_data *op_data) CLASSERT(sizeof(struct mdt_rec_reint) == sizeof(struct mdt_rec_link)); rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT); - LASSERT (rec != NULL); + LASSERT(rec != NULL); rec->lk_opcode = REINT_LINK; rec->lk_fsuid= op_data->op_fsuid;//current->fsuid; diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 71219b90e22b..88b43823c632 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -633,7 +633,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, body = req_capsule_server_get(pill, &RMF_MDT_BODY); if (body == NULL) { - CERROR ("Can't swab mdt_body\n"); + CERROR("Can't swab mdt_body\n"); return -EPROTO; } diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 4a1cc4eb73d5..0b517e550477 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -1702,7 +1702,7 @@ static int mdc_quotactl(struct obd_device *unused, struct obd_export *exp, if (oqc) { *oqctl = *oqc; } else if (!rc) { - CERROR ("Can't unpack obd_quotactl\n"); + CERROR("Can't unpack obd_quotactl\n"); rc = -EPROTO; } } else if (!rc) { @@ -2426,14 +2426,14 @@ static int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg) struct lprocfs_static_vars lvars = { NULL }; int rc; - OBD_ALLOC(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock)); + OBD_ALLOC(cli->cl_rpc_lock, sizeof(*cli->cl_rpc_lock)); if (!cli->cl_rpc_lock) return -ENOMEM; mdc_init_rpc_lock(cli->cl_rpc_lock); ptlrpcd_addref(); - OBD_ALLOC(cli->cl_close_lock, sizeof (*cli->cl_close_lock)); + OBD_ALLOC(cli->cl_close_lock, sizeof(*cli->cl_close_lock)); if (!cli->cl_close_lock) GOTO(err_rpc_lock, rc = -ENOMEM); mdc_init_rpc_lock(cli->cl_close_lock); @@ -2459,9 +2459,9 @@ static int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg) return rc; err_close_lock: - OBD_FREE(cli->cl_close_lock, sizeof (*cli->cl_close_lock)); + OBD_FREE(cli->cl_close_lock, sizeof(*cli->cl_close_lock)); err_rpc_lock: - OBD_FREE(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock)); + OBD_FREE(cli->cl_rpc_lock, sizeof(*cli->cl_rpc_lock)); ptlrpcd_decref(); return rc; } @@ -2523,8 +2523,8 @@ static int mdc_cleanup(struct obd_device *obd) { struct client_obd *cli = &obd->u.cli; - OBD_FREE(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock)); - OBD_FREE(cli->cl_close_lock, sizeof (*cli->cl_close_lock)); + OBD_FREE(cli->cl_rpc_lock, sizeof(*cli->cl_rpc_lock)); + OBD_FREE(cli->cl_close_lock, sizeof(*cli->cl_close_lock)); ptlrpcd_decref(); -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/12] staging: lustre: remove spaces from start of line
Fixes the following checkpatch warning: WARNING: please, no spaces at the start of a line Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c index d1d891b91663..f883d9c28f20 100644 --- a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c +++ b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c @@ -209,6 +209,6 @@ static struct lprocfs_vars lprocfs_mdc_module_vars[] = { void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars) { -lvars->module_vars = lprocfs_mdc_module_vars; -lvars->obd_vars = lprocfs_mdc_obd_vars; + lvars->module_vars = lprocfs_mdc_module_vars; + lvars->obd_vars = lprocfs_mdc_obd_vars; } -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/12] staging: lustre: Add missing spaces around operators and braces.
Fixes the following checkpatch errors: ERROR: space required after that ',' (ctx:VxV) ERROR: space required after that close brace '}' Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 25 + drivers/staging/lustre/lustre/mdc/mdc_locks.c | 5 +++-- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 7 --- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c index 16e2e0b611d1..35ce2fdf696c 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c @@ -345,7 +345,8 @@ void mdc_setattr_pack(struct ptlrpc_request *req, struct md_op_data *op_data, struct mdt_ioepoch *epoch; struct lov_user_md *lum = NULL; - CLASSERT(sizeof(struct mdt_rec_reint) ==sizeof(struct mdt_rec_setattr)); + CLASSERT(sizeof(struct mdt_rec_reint) == + sizeof(struct mdt_rec_setattr)); rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT); mdc_setattr_pack_rec(rec, op_data); @@ -385,18 +386,18 @@ void mdc_unlink_pack(struct ptlrpc_request *req, struct md_op_data *op_data) rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT); LASSERT(rec != NULL); - rec->ul_opcode = op_data->op_cli_flags & CLI_RM_ENTRY ? + rec->ul_opcode = op_data->op_cli_flags & CLI_RM_ENTRY ? REINT_RMENTRY : REINT_UNLINK; - rec->ul_fsuid = op_data->op_fsuid; - rec->ul_fsgid = op_data->op_fsgid; - rec->ul_cap = op_data->op_cap; - rec->ul_mode= op_data->op_mode; - rec->ul_suppgid1= op_data->op_suppgids[0]; - rec->ul_suppgid2= -1; - rec->ul_fid1= op_data->op_fid1; - rec->ul_fid2= op_data->op_fid2; - rec->ul_time= op_data->op_mod_time; - rec->ul_bias= op_data->op_bias; + rec->ul_fsuid= op_data->op_fsuid; + rec->ul_fsgid= op_data->op_fsgid; + rec->ul_cap = op_data->op_cap; + rec->ul_mode = op_data->op_mode; + rec->ul_suppgid1 = op_data->op_suppgids[0]; + rec->ul_suppgid2 = -1; + rec->ul_fid1 = op_data->op_fid1; + rec->ul_fid2 = op_data->op_fid2; + rec->ul_time = op_data->op_mod_time; + rec->ul_bias = op_data->op_bias; mdc_pack_capa(req, &RMF_CAPA1, op_data->op_capa1); diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 5de9e8862393..a5a2597616e9 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -621,7 +621,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, * function without doing so, and try to replay a failed create * (bug 3440) */ if (it->it_op & IT_OPEN && req->rq_replay && - (!it_disposition(it, DISP_OPEN_OPEN) ||intent->it_status != 0)) + (!it_disposition(it, DISP_OPEN_OPEN) || intent->it_status != 0)) mdc_clear_replay_flag(req, intent->it_status); DEBUG_REQ(D_RPCTRACE, req, "op: %d disposition: %x, status: %d", @@ -1047,7 +1047,8 @@ static int mdc_finish_intent_lock(struct obd_export *exp, it->d.lustre.it_lock_handle = lockh->cookie; } } - CDEBUG(D_DENTRY,"D_IT dentry %.*s intent: %s status %d disp %x rc %d\n", + CDEBUG(D_DENTRY, + "D_IT dentry %.*s intent: %s status %d disp %x rc %d\n", op_data->op_namelen, op_data->op_name, ldlm_it2str(it->it_op), it->d.lustre.it_status, it->d.lustre.it_disposition, rc); return rc; diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c index c5420a42bc33..c40304bf0b62 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c @@ -71,7 +71,7 @@ int mdc_resource_get_unused(struct obd_export *exp, const struct lu_fid *fid, __u64 bits) { struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; - ldlm_policy_data_t policy = {{0}}; + ldlm_policy_data_t policy = {{0} }; struct ldlm_res_id res_id; struct ldlm_resource *res; int count; diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 5126262aa73d..6def92133227 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -326,7 +326,8 @@ static int mdc_is_subdir(struct obd_export *exp, return rc; } -static int mdc_xattr_common(struct obd_export *exp,const struct req_format *fmt, +static int mdc_xattr_common(struct obd_export *exp, +
[PATCH 04/12] staging: lustre: fix lines over 80 chars
Fixes the following checkpatch warning: WARNING: line over 80 characters Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 6 -- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 9 ++--- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 7 --- drivers/staging/lustre/lustre/mdc/mdc_request.c | 6 -- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c index f883d9c28f20..16341c818358 100644 --- a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c +++ b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c @@ -56,7 +56,8 @@ static ssize_t mdc_max_rpcs_in_flight_seq_write(struct file *file, size_t count, loff_t *off) { - struct obd_device *dev = ((struct seq_file *)file->private_data)->private; + struct obd_device *dev = + ((struct seq_file *)file->private_data)->private; struct client_obd *cli = &dev->u.cli; int val, rc; @@ -84,7 +85,8 @@ static int mdc_kuc_open(struct inode *inode, struct file *file) static ssize_t mdc_kuc_write(struct file *file, const char *buffer, size_t count, loff_t *off) { - struct obd_device *obd = ((struct seq_file *)file->private_data)->private; + struct obd_device *obd = + ((struct seq_file *)file->private_data)->private; struct kuc_hdr *lh; struct hsm_action_list *hal; struct hsm_action_item *hai; diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c index daaa7422c03f..16e2e0b611d1 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c @@ -52,7 +52,8 @@ static void __mdc_pack_body(struct mdt_body *b, __u32 suppgid) b->capability = cfs_curproc_cap_pack(); } -void mdc_pack_capa(struct ptlrpc_request *req, const struct req_msg_field *field, +void mdc_pack_capa(struct ptlrpc_request *req, + const struct req_msg_field *field, struct obd_capa *oc) { struct req_capsule *pill = &req->rq_pill; @@ -317,7 +318,8 @@ static void mdc_setattr_pack_rec(struct mdt_rec_setattr *rec, rec->sa_atime = LTIME_S(op_data->op_attr.ia_atime); rec->sa_mtime = LTIME_S(op_data->op_attr.ia_mtime); rec->sa_ctime = LTIME_S(op_data->op_attr.ia_ctime); - rec->sa_attr_flags = ((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags; + rec->sa_attr_flags = + ((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags; if ((op_data->op_attr.ia_valid & ATTR_GID) && in_group_p(op_data->op_attr.ia_gid)) rec->sa_suppgid = @@ -552,7 +554,8 @@ int mdc_enter_request(struct client_obd *cli) list_add_tail(&mcw.mcw_entry, &cli->cl_cache_waiters); init_waitqueue_head(&mcw.mcw_waitq); client_obd_list_unlock(&cli->cl_loi_list_lock); - rc = l_wait_event(mcw.mcw_waitq, mdc_req_avail(cli, &mcw), &lwi); + rc = l_wait_event(mcw.mcw_waitq, mdc_req_avail(cli, &mcw), + &lwi); if (rc) { client_obd_list_lock(&cli->cl_loi_list_lock); if (list_empty(&mcw.mcw_entry)) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 88b43823c632..5de9e8862393 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -450,8 +450,8 @@ static struct ptlrpc_request *mdc_intent_unlink_pack(struct obd_export *exp, } static struct ptlrpc_request *mdc_intent_getattr_pack(struct obd_export *exp, - struct lookup_intent *it, - struct md_op_data *op_data) + struct lookup_intent *it, + struct md_op_data *op_data) { struct ptlrpc_request *req; struct obd_device *obddev = class_exp2obd(exp); @@ -1039,7 +1039,8 @@ static int mdc_finish_intent_lock(struct obd_export *exp, memcpy(&old_lock, lockh, sizeof(*lockh)); if (ldlm_lock_match(NULL, LDLM_FL_BLOCK_GRANTED, NULL, - LDLM_IBITS, &policy, LCK_NL, &old_lock, 0)) { + LDLM_IBITS, &policy, LCK_NL, + &old_lock, 0)) { ldlm_lock_decref_and_cancel(lockh, it->d.lustre.it_lock_mode); memcpy(lockh, &old_lock, sizeof(old_lock)); diff --git a/driver
[PATCH 07/12] staging: lustre: add blank lines after declarations
Fixes the following checkpatch warning: WARNING: Missing a blank line after declarations Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 1 + drivers/staging/lustre/lustre/mdc/mdc_locks.c | 3 +++ drivers/staging/lustre/lustre/mdc/mdc_request.c | 5 + 3 files changed, 9 insertions(+) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c index 7f9b6eb51860..95fe62da26e2 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c @@ -490,6 +490,7 @@ void mdc_getattr_pack(struct ptlrpc_request *req, __u64 valid, int flags, if (op_data->op_name) { char *tmp = req_capsule_client_get(&req->rq_pill, &RMF_NAME); + LOGL0(op_data->op_name, op_data->op_namelen, tmp); } diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index a5a2597616e9..4d837d61be65 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -134,6 +134,7 @@ int mdc_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data, if (lock->l_resource->lr_lvb_inode && lock->l_resource->lr_lvb_inode != data) { struct inode *old_inode = lock->l_resource->lr_lvb_inode; + LASSERTF(old_inode->i_state & I_FREEING, "Found existing inode %p/%lu/%u state %lu in lock: " "setting data to %p/%lu/%u\n", old_inode, @@ -678,6 +679,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, */ if ((it->it_op & IT_OPEN) && req->rq_replay) { void *lmm; + if (req_capsule_get_size(pill, &RMF_EADATA, RCL_CLIENT) < body->eadatasize) @@ -1029,6 +1031,7 @@ static int mdc_finish_intent_lock(struct obd_export *exp, lock = ldlm_handle2lock(lockh); if (lock) { ldlm_policy_data_t policy = lock->l_policy_data; + LDLM_DEBUG(lock, "matching against this"); LASSERTF(fid_res_name_eq(&mdt_body->fid1, diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 6def92133227..57d903156917 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -203,6 +203,7 @@ static int mdc_getattr_common(struct obd_export *exp, if (body->valid & OBD_MD_FLMDSCAPA) { struct lustre_capa *capa; + capa = req_capsule_server_get(pill, &RMF_CAPA1); if (capa == NULL) return -EPROTO; @@ -283,6 +284,7 @@ int mdc_getattr_name(struct obd_export *exp, struct md_op_data *op_data, if (op_data->op_name) { char *name = req_capsule_client_get(&req->rq_pill, &RMF_NAME); + LASSERT(strnlen(op_data->op_name, op_data->op_namelen) == op_data->op_namelen); memcpy(name, op_data->op_name, op_data->op_namelen); @@ -696,6 +698,7 @@ void mdc_replay_open(struct ptlrpc_request *req) void mdc_commit_open(struct ptlrpc_request *req) { struct md_open_data *mod = req->rq_cb_data; + if (mod == NULL) return; @@ -2390,6 +2393,7 @@ int mdc_fid_alloc(struct obd_export *exp, struct lu_fid *fid, struct obd_uuid *mdc_get_uuid(struct obd_export *exp) { struct client_obd *cli = &exp->exp_obd->u.cli; + return &cli->cl_target_uuid; } @@ -2742,6 +2746,7 @@ int __init mdc_init(void) { int rc; struct lprocfs_static_vars lvars = { NULL }; + lprocfs_mdc_init_vars(&lvars); rc = class_register_type(&mdc_obd_ops, &mdc_md_ops, lvars.module_vars, -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/12] staging: lustre: replace c99 style comments with C89
Fixes the following checkpatch error: ERROR: do not use C99 // comments Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c index 35ce2fdf696c..7f9b6eb51860 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c @@ -416,9 +416,9 @@ void mdc_link_pack(struct ptlrpc_request *req, struct md_op_data *op_data) LASSERT(rec != NULL); rec->lk_opcode = REINT_LINK; - rec->lk_fsuid= op_data->op_fsuid;//current->fsuid; - rec->lk_fsgid= op_data->op_fsgid;//current->fsgid; - rec->lk_cap = op_data->op_cap;//current->cap_effective; + rec->lk_fsuid= op_data->op_fsuid; /* current->fsuid; */ + rec->lk_fsgid= op_data->op_fsgid; /*current->fsgid; */ + rec->lk_cap = op_data->op_cap; /*current->cap_effective; */ rec->lk_suppgid1 = op_data->op_suppgids[0]; rec->lk_suppgid2 = op_data->op_suppgids[1]; rec->lk_fid1 = op_data->op_fid1; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/12] staging: lustre: move else on the same line as closing brace
Fix the following checkpatch error: ERROR: else should follow close brace '}' Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/mdc_request.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 205eeade9fdd..7ccee06fd447 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -587,8 +587,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, lustre_swab_mdt_remote_perm); if (!md->remote_perm) GOTO(out, rc = -EPROTO); - } - else if (md->body->valid & OBD_MD_FLACL) { + } else if (md->body->valid & OBD_MD_FLACL) { /* for ACL, it's possible that FLACL is set but aclsize is zero. * only when aclsize != 0 there's an actual segment for ACL * in reply buffer. -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/12] staging: lustre: Fix misplaced opening brace warnings
Fixes the following checkpatch error: ERROR: that open brace { should be on the previous line Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 12 ++-- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 3 +-- drivers/staging/lustre/lustre/mdc/mdc_request.c | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index c03d77c9c5b8..09209171b50c 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -785,12 +785,12 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, __u64 flags, saved_flags = extra_lock_flags; int rc; struct ldlm_res_id res_id; - static const ldlm_policy_data_t lookup_policy = - { .l_inodebits = { MDS_INODELOCK_LOOKUP } }; - static const ldlm_policy_data_t update_policy = - { .l_inodebits = { MDS_INODELOCK_UPDATE } }; - static const ldlm_policy_data_t layout_policy = - { .l_inodebits = { MDS_INODELOCK_LAYOUT } }; + static const ldlm_policy_data_t lookup_policy = { + .l_inodebits = { MDS_INODELOCK_LOOKUP } }; + static const ldlm_policy_data_t update_policy = { + .l_inodebits = { MDS_INODELOCK_UPDATE } }; + static const ldlm_policy_data_t layout_policy = { + .l_inodebits = { MDS_INODELOCK_LAYOUT } }; static const ldlm_policy_data_t getxattr_policy = { .l_inodebits = { MDS_INODELOCK_XATTR } }; ldlm_policy_data_t const *policy = &lookup_policy; diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c index 6f78bffa9294..c551d3b843ab 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c @@ -152,8 +152,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, ptlrpc_request_set_replen(req); if (mod && (op_data->op_flags & MF_EPOCH_OPEN) && - req->rq_import->imp_replayable) - { + req->rq_import->imp_replayable) { LASSERT(*mod == NULL); *mod = obd_mod_alloc(); diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 6c691a4763b5..205eeade9fdd 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -1794,8 +1794,8 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len, GOTO(out, rc); case OBD_IOC_CHANGELOG_CLEAR: { struct ioc_changelog *icc = karg; - struct changelog_setinfo cs = - {.cs_recno = icc->icc_recno, .cs_id = icc->icc_id}; + struct changelog_setinfo cs = { + .cs_recno = icc->icc_recno, .cs_id = icc->icc_id}; rc = obd_set_info_async(NULL, exp, strlen(KEY_CHANGELOG_CLEAR), KEY_CHANGELOG_CLEAR, sizeof(cs), &cs, NULL); -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/12] staging: lustre: remove parentheses usage with return
Fix the following checkpatch error: ERROR: return is not a function, parentheses are not required Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 7ccee06fd447..b67574218b69 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -2585,7 +2585,7 @@ static int mdc_process_config(struct obd_device *obd, obd_count len, void *buf) rc = 0; break; } - return(rc); + return rc; } -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/12] staging: lustre: Added space between type name and *
Fixes the following checkpatch error: ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 7f724e3c3f06..c03d77c9c5b8 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -218,7 +218,7 @@ int mdc_find_cbdata(struct obd_export *exp, struct ldlm_res_id res_id; int rc = 0; - fid_build_reg_res_name((struct lu_fid*)fid, &res_id); + fid_build_reg_res_name((struct lu_fid *)fid, &res_id); rc = ldlm_resource_iterate(class_exp2obd(exp)->obd_namespace, &res_id, it, data); if (rc == LDLM_ITER_STOP) -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/12] staging: lustre: fix multi line strings
Fixes the following checkpatch warning: WARNING: quoted string split across lines Signed-off-by: Srikrishan Malik --- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 9 +++ drivers/staging/lustre/lustre/mdc/mdc_reint.c | 3 +-- drivers/staging/lustre/lustre/mdc/mdc_request.c | 36 - 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 4d837d61be65..7f724e3c3f06 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -136,11 +136,10 @@ int mdc_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data, struct inode *old_inode = lock->l_resource->lr_lvb_inode; LASSERTF(old_inode->i_state & I_FREEING, -"Found existing inode %p/%lu/%u state %lu in lock: " -"setting data to %p/%lu/%u\n", old_inode, -old_inode->i_ino, old_inode->i_generation, -old_inode->i_state, -new_inode, new_inode->i_ino, new_inode->i_generation); +"Found existing inode %p/%lu/%u state %lu in lock: setting data to %p/%lu/%u\n", +old_inode, old_inode->i_ino, old_inode->i_generation, +old_inode->i_state, new_inode, new_inode->i_ino, +new_inode->i_generation); } lock->l_resource->lr_lvb_inode = new_inode; if (bits) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c index c40304bf0b62..6f78bffa9294 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c @@ -158,8 +158,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, *mod = obd_mod_alloc(); if (*mod == NULL) { - DEBUG_REQ(D_ERROR, req, "Can't allocate " - "md_open_data"); + DEBUG_REQ(D_ERROR, req, "Can't allocate md_open_data"); } else { req->rq_replay = 1; req->rq_cb_data = *mod; diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 57d903156917..6c691a4763b5 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -517,14 +517,14 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, struct lov_mds_md *lmm; if (!S_ISREG(md->body->mode)) { - CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, should be a " - "regular file, but is not\n"); + CDEBUG(D_INFO, + "OBD_MD_FLEASIZE set, should be a regular file, but is not\n"); GOTO(out, rc = -EPROTO); } if (md->body->eadatasize == 0) { - CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, " - "but eadatasize 0\n"); + CDEBUG(D_INFO, + "OBD_MD_FLEASIZE set, but eadatasize 0\n"); GOTO(out, rc = -EPROTO); } lmmsize = md->body->eadatasize; @@ -537,8 +537,8 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, GOTO(out, rc); if (rc < sizeof(*md->lsm)) { - CDEBUG(D_INFO, "lsm size too small: " - "rc < sizeof (*md->lsm) (%d < %d)\n", + CDEBUG(D_INFO, + "lsm size too small: rc < sizeof (*md->lsm) (%d < %d)\n", rc, (int)sizeof(*md->lsm)); GOTO(out, rc = -EPROTO); } @@ -548,14 +548,14 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, struct lov_mds_md *lmv; if (!S_ISDIR(md->body->mode)) { - CDEBUG(D_INFO, "OBD_MD_FLDIREA set, should be a " - "directory, but is not\n"); + CDEBUG(D_INFO, + "OBD_MD_FLDIREA set, should be a directory, but is not\n"); GOTO(out, rc = -EPROTO); } if (md->body->eadatasize == 0) { - CDEBUG(D_INFO, "OBD_MD_FLDIREA is set, " - "but eadatasize 0\n"); + CDEBUG(D_INFO, + "OBD_MD_FLDIREA is set, but eadatasize 0\n"); return -EPROTO; } if (md->body->valid & OBD_MD_MEA) { @@ -571,8 +571,8 @@
RE: [PATCH 1/1] Drivers: net-next: hyperv: Adjust the size of sendbuf region to support ws2008r2
> -Original Message- > From: Jeff Leung [mailto:jle...@v10networks.ca] > Sent: Wednesday, August 6, 2014 10:19 AM > To: KY Srinivasan; da...@davemloft.net; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; jasow...@redhat.com > Subject: RE: [PATCH 1/1] Drivers: net-next: hyperv: Adjust the size of > sendbuf region to support ws2008r2 > > > WS2008R2 is a supported platform and it turns out that the maximum > sendbuf > > size that ws2008R2 can support is only 15MB. Make the necessary > > adjustment. > > > > Signed-off-by: K. Y. Srinivasan > > --- > > drivers/net/hyperv/hyperv_net.h |2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/drivers/net/hyperv/hyperv_net.h > b/drivers/net/hyperv/hyperv_net.h > > index 40ba1ef..459b823 100644 > > --- a/drivers/net/hyperv/hyperv_net.h > > +++ b/drivers/net/hyperv/hyperv_net.h > > @@ -584,7 +584,7 @@ struct nvsp_message { > > > > #define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) > /* 16MB > > */ > > #define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY (1024*1024*15) /* > 15MB > */ > > -#define NETVSC_SEND_BUFFER_SIZE(1024 * 1024 * > 16) /* 16MB */ > > +#define NETVSC_SEND_BUFFER_SIZE(1024 * 1024 * > 15) /* 15MB */ > > Would it be possible to use separate ifdefs depending on the version of the > Hyper-V host so we can maintain the 16MB buffer for hosts that support it > and leave it at 15MB for hosts that don't support that large of a buffer? We could certainly do that. For the receive buffers, we actually size them based on the host. For sendbuf, the performance difference between 15M and 16M is not measurable. I had initially chosen 16MB to match with the receive buffer size. Since there was no perf advantage, I chose to set the sendbuf size to 15M to work on all supported hosts. K. Y > > > #define NETVSC_INVALID_INDEX -1 > > > > > > -- > > 1.7.4.1 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe > linux-kernel" in > > the body of a message to majord...@vger.kernel.org More majordomo > info > > at http://vger.kernel.org/majordomo-info.html > > Please read the FAQ at http://www.tux.org/lkml/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH 1/1] Drivers: net-next: hyperv: Adjust the size of sendbuf region to support ws2008r2
> WS2008R2 is a supported platform and it turns out that the maximum sendbuf > size that ws2008R2 can support is only 15MB. Make the necessary > adjustment. > > Signed-off-by: K. Y. Srinivasan > --- > drivers/net/hyperv/hyperv_net.h |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h > index 40ba1ef..459b823 100644 > --- a/drivers/net/hyperv/hyperv_net.h > +++ b/drivers/net/hyperv/hyperv_net.h > @@ -584,7 +584,7 @@ struct nvsp_message { > > #define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) /* 16MB > */ > #define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY(1024*1024*15) /* 15MB */ > -#define NETVSC_SEND_BUFFER_SIZE (1024 * 1024 * 16) /* 16MB */ > +#define NETVSC_SEND_BUFFER_SIZE (1024 * 1024 * 15) /* 15MB */ Would it be possible to use separate ifdefs depending on the version of the Hyper-V host so we can maintain the 16MB buffer for hosts that support it and leave it at 15MB for hosts that don't support that large of a buffer? > #define NETVSC_INVALID_INDEX -1 > > > -- > 1.7.4.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: WiFi+BT AR5B22. When starting linux - BT disappears. Disappears at all.
Hi all! Had busy time, but today I've installed vanilla kernel into openSUSE 13.1. uname -a says: "Linux linux-bekh.site 3.16.0-3638-g8e099d1-1.g4b43f13-vanilla #1 SMP Tue Aug 5 10:03:55 UTC 2014 (4b43f13) x86_64 x86_64 x86_64 GNU/Linux" My first reboot using vanilla kernel and Broadcom module showed me bluetooth icon in system tray. After installing Atheros module and boot with vanilla kernel - no BT icon (but WiFi works :) ). May I do something more? Thanks. 2014-07-02 10:08 GMT+03:00 Антон Мацюк : > Big thanks, I'll do some "research" at weekend, maybe :) > > 2014-07-02 9:36 GMT+03:00 Greg KH : >> On Wed, Jul 02, 2014 at 09:27:07AM +0300, Антон Мацюк wrote: >>> May I ask that noobish question: is there a distro with kernel.org >>> released kernel? >> >> Some distros provide "vanilla" kernel packages. I know Gentoo and >> openSUSE do, and I think Fedora also does. Check with your distro to >> see if they provide this or not. >> >>> (my fast search in google failed) Maybe Knoppix? >>> If no - then i'll search somewhere how to make it in known distro :) >> >> There's a whole book on how to build your own kernel, Linux Kernel in a >> Nutshell. It's free online and should help you out in that area. >> >> good luck, >> >> greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: comedi: fixing coding style problems
This patch fixes warnings of checkpatch.pl script: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around devpriv->timer +init_timer(&(devpriv->timer)); CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis +dev_info(dev->class_dev, +"%s: %i microvolt, %li microsecond waveform attached\n", Task of Eudyptula challenge. Signed-off-by: Niklas Svensson --- drivers/staging/comedi/drivers/comedi_test.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c index 845a679..7aa23db 100644 --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c @@ -415,14 +415,14 @@ static int waveform_attach(struct comedi_device *dev, for (i = 0; i < s->n_chan; i++) devpriv->ao_loopbacks[i] = s->maxdata / 2; - init_timer(&(devpriv->timer)); + init_timer(&devpriv->timer); devpriv->timer.function = waveform_ai_interrupt; devpriv->timer.data = (unsigned long)dev; dev_info(dev->class_dev, - "%s: %i microvolt, %li microsecond waveform attached\n", - dev->board_name, - devpriv->uvolt_amplitude, devpriv->usec_period); +"%s: %i microvolt, %li microsecond waveform attached\n", +dev->board_name, +devpriv->uvolt_amplitude, devpriv->usec_period); return 0; } -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: unisys: uislib: Fixed missing blank line coding style issue
Fixed coding style issue "Missing a blank line after declarations" detected by the 'checkpatch.pl' script. Signed-off-by: Tobenna P. Igwe --- drivers/staging/unisys/uislib/uisutils.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c index ee26e00..ab593e4 100644 --- a/drivers/staging/unisys/uislib/uisutils.c +++ b/drivers/staging/unisys/uislib/uisutils.c @@ -117,6 +117,7 @@ uisctrl_register_req_handler_ex(uuid_le switchTypeGuid, { ReqHandlerInfo_t *pReqHandlerInfo; int rc = 0; /* assume failure */ + LOGINF("type=%pUL, controlfunc=0x%p.\n", &switchTypeGuid, controlfunc); if (!controlfunc) { @@ -161,6 +162,7 @@ int uisctrl_unregister_req_handler_ex(uuid_le switchTypeGuid) { int rc = 0; /* assume failure */ + LOGINF("type=%pUL.\n", &switchTypeGuid); if (ReqHandlerDel(switchTypeGuid) < 0) { LOGERR("failed to remove %pUL from server list\n", @@ -249,6 +251,7 @@ uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in, if (skb_shinfo(skb)->frag_list) { struct sk_buff *skbinlist; int c; + for (skbinlist = skb_shinfo(skb)->frag_list; skbinlist; skbinlist = skbinlist->next) { @@ -306,6 +309,7 @@ ReqHandlerFind(uuid_le switchTypeGuid) { struct list_head *lelt, *tmp; ReqHandlerInfo_t *entry = NULL; + spin_lock(&ReqHandlerInfo_list_lock); list_for_each_safe(lelt, tmp, &ReqHandlerInfo_list) { entry = list_entry(lelt, ReqHandlerInfo_t, list_link); @@ -324,6 +328,7 @@ ReqHandlerDel(uuid_le switchTypeGuid) struct list_head *lelt, *tmp; ReqHandlerInfo_t *entry = NULL; int rc = -1; + spin_lock(&ReqHandlerInfo_list_lock); list_for_each_safe(lelt, tmp, &ReqHandlerInfo_list) { entry = list_entry(lelt, ReqHandlerInfo_t, list_link); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/5] staging: dgnc: Fix included header from 'asm'
This commit fixes the checkpatch warning: drivers/staging/dgnc/dgnc_neo.c:37: WARNING: Use #include instead of Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_neo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index 68ff116..d58aaa0 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -34,7 +34,7 @@ #include/* For jiffies, task states */ #include /* For tasklet and interrupt structs/defines */ #include/* For udelay */ -#include /* For read[bwl]/write[bwl] */ +#include /* For read[bwl]/write[bwl] */ #include /* For struct async_serial */ #include /* For the various UART offsets */ -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/5] staging: dgnc: Fix checkpath issues in dgnc_neo.c
This series of patches deals with the checkpatch error and warnings, other than 'line length over 80 chars', found in dgnc_neo.c file. All except of patch 5/5 do not change the behavior. Konrad Zapalowicz (5): staging: dgnc: Fix included header from 'asm' staging: dgnc: Fix missing blank line after declarations staging: dgnc: Fix that open brace { should be on the previous line staging: dgnc: Fix braces {} are not necessary for single statement blocks staging: dgnc: Remove 'volatile' modifier where it is not needed drivers/staging/dgnc/dgnc_neo.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/5] staging: dgnc: Fix missing blank line after declarations
This commit deals with the checkapth warnings 'missing line after declarations' in the dgnc_neo.c file. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_neo.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index d58aaa0..79684a3 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -397,6 +397,7 @@ static inline void neo_clear_break(struct channel_t *ch, int force) if (time_after_eq(jiffies, ch->ch_stop_sending_break) || force) { uchar temp = readb(&ch->ch_neo_uart->lcr); + writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr); neo_pci_posting_flush(ch->ch_bd); ch->ch_flags &= ~(CH_BREAK_SENDING); @@ -1138,6 +1139,7 @@ static irqreturn_t neo_intr(int irq, void *voidbrd) static void neo_disable_receiver(struct channel_t *ch) { uchar tmp = readb(&ch->ch_neo_uart->ier); + tmp &= ~(UART_IER_RDI); writeb(tmp, &ch->ch_neo_uart->ier); neo_pci_posting_flush(ch->ch_bd); @@ -1152,6 +1154,7 @@ static void neo_disable_receiver(struct channel_t *ch) static void neo_enable_receiver(struct channel_t *ch) { uchar tmp = readb(&ch->ch_neo_uart->ier); + tmp |= (UART_IER_RDI); writeb(tmp, &ch->ch_neo_uart->ier); neo_pci_posting_flush(ch->ch_bd); @@ -1324,6 +1327,7 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch) */ if (linestatus & error_mask) { uchar discard; + linestatus = 0; memcpy_fromio(&discard, &ch->ch_neo_uart->txrxburst, 1); continue; @@ -1822,6 +1826,7 @@ static void neo_send_break(struct channel_t *ch, int msecs) if (msecs == 0) { if (ch->ch_flags & CH_BREAK_SENDING) { uchar temp = readb(&ch->ch_neo_uart->lcr); + writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr); neo_pci_posting_flush(ch->ch_bd); ch->ch_flags &= ~(CH_BREAK_SENDING); @@ -1841,6 +1846,7 @@ static void neo_send_break(struct channel_t *ch, int msecs) /* Tell the UART to start sending the break */ if (!(ch->ch_flags & CH_BREAK_SENDING)) { uchar temp = readb(&ch->ch_neo_uart->lcr); + writeb((temp | UART_LCR_SBC), &ch->ch_neo_uart->lcr); neo_pci_posting_flush(ch->ch_bd); ch->ch_flags |= (CH_BREAK_SENDING); -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/5] staging: dgnc: Fix braces {} are not necessary for single statement blocks
This commit fixes the following checkpath warning in dgnc_neo.c file: 'braces {} are not necessary for single statement blocks' Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_neo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index e6aeda3..b4198e0 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -1804,9 +1804,8 @@ static uint neo_get_uart_bytes_left(struct channel_t *ch) /* Determine whether the Transmitter is empty or not */ if (!(lsr & UART_LSR_TEMT)) { - if (ch->ch_flags & CH_TX_FIFO_EMPTY) { + if (ch->ch_flags & CH_TX_FIFO_EMPTY) tasklet_schedule(&ch->ch_bd->helper_tasklet); - } left = 1; } else { ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM); -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/5] staging: dgnc: Remove 'volatile' modifier where it is not needed
This commit fixes the checkpath warning about misused 'volatile' modifier. In this case the 'volatile' was not needed as it was used for regular automatic variable. Thos commit removes the 'volatile'. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_neo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index b4198e0..86a1cd7 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -1640,7 +1640,7 @@ static void neo_copy_data_from_queue_to_uart(struct channel_t *ch) static void neo_parse_modem(struct channel_t *ch, uchar signals) { - volatile uchar msignals = signals; + uchar msignals = signals; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) return; -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line
This commit fixes the following checkpath error in dgnc_neo.c file: 'that open brace { should be on the previous line' Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_neo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index 79684a3..e6aeda3 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -1846,7 +1846,7 @@ static void neo_send_break(struct channel_t *ch, int msecs) /* Tell the UART to start sending the break */ if (!(ch->ch_flags & CH_BREAK_SENDING)) { uchar temp = readb(&ch->ch_neo_uart->lcr); - + writeb((temp | UART_LCR_SBC), &ch->ch_neo_uart->lcr); neo_pci_posting_flush(ch->ch_bd); ch->ch_flags |= (CH_BREAK_SENDING); @@ -1935,8 +1935,8 @@ static void neo_vpd(struct dgnc_board *brd) if (((brd->vpd[0x08] != 0x82) /* long resource name tag */ && (brd->vpd[0x10] != 0x82)) /* long resource name tag (PCI-66 files)*/ - || (brd->vpd[0x7F] != 0x78)) /* small resource end tag */ - { + || (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */ + memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE); } else { /* Search for the serial number */ -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging/lustre: use rcu_dereference to access rcu protected current->real_parent field
Signed-off-by: Evgeny Budilovsky --- drivers/staging/lustre/lustre/llite/lproc_llite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index 77f68b5..7e61468 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c @@ -910,7 +910,8 @@ void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count) sbi->ll_stats_track_id == current->pid) lprocfs_counter_add(sbi->ll_stats, op, count); else if (sbi->ll_stats_track_type == STATS_TRACK_PPID && -sbi->ll_stats_track_id == current->real_parent->pid) +sbi->ll_stats_track_id == + rcu_dereference(current->real_parent)->pid) lprocfs_counter_add(sbi->ll_stats, op, count); else if (sbi->ll_stats_track_type == STATS_TRACK_GID && sbi->ll_stats_track_id == -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 05/12] staging: lustre: Add missing spaces around operators and braces.
On Wed, Aug 06, 2014 at 10:42:55PM +0530, Srikrishan Malik wrote: > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c > b/drivers/staging/lustre/lustre/mdc/mdc_reint.c > index c5420a42bc33..c40304bf0b62 100644 > --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c > +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c > @@ -71,7 +71,7 @@ int mdc_resource_get_unused(struct obd_export *exp, const > struct lu_fid *fid, > __u64 bits) > { > struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; > - ldlm_policy_data_t policy = {{0}}; > + ldlm_policy_data_t policy = {{0} }; That's odd. Since when is a space required here? Anyway, put one at the start too if you're goind to do that. Or you could do it like: ldlm_policy_data_t policy = {}; ? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 06/12] staging: lustre: replace c99 style comments with C89
On Wed, Aug 06, 2014 at 10:42:56PM +0530, Srikrishan Malik wrote: > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c > b/drivers/staging/lustre/lustre/mdc/mdc_lib.c > index 35ce2fdf696c..7f9b6eb51860 100644 > --- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c > +++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c > @@ -416,9 +416,9 @@ void mdc_link_pack(struct ptlrpc_request *req, struct > md_op_data *op_data) > LASSERT(rec != NULL); > > rec->lk_opcode = REINT_LINK; > - rec->lk_fsuid= op_data->op_fsuid;//current->fsuid; > - rec->lk_fsgid= op_data->op_fsgid;//current->fsgid; > - rec->lk_cap = op_data->op_cap;//current->cap_effective; > + rec->lk_fsuid= op_data->op_fsuid; /* current->fsuid; */ > + rec->lk_fsgid= op_data->op_fsgid; /*current->fsgid; */ > + rec->lk_cap = op_data->op_cap; /*current->cap_effective; */ Put a space after the '/*'. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/2] staging: dgnc: Fix checkpatch warnings in dgnc_cls.c
This series of patches fixes the checkpatch issues found in dgnc_cls.c file: - missing blank line after declaration - void function return statements are not generally useful Konrad Zapalowicz (2): staging: dgnc: Fix missing blank line after declarations staging: dgnc: Remove unnecessary 'return' statement drivers/staging/dgnc/dgnc_cls.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: dgnc: Fix missing blank line after declarations
This commit fixes the missing blank lines after declarations checkpath warnings found in dgnc_cls.c file. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_cls.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c index cfa8384..0d3ca7c 100644 --- a/drivers/staging/dgnc/dgnc_cls.c +++ b/drivers/staging/dgnc/dgnc_cls.c @@ -390,6 +390,7 @@ static inline void cls_clear_break(struct channel_t *ch, int force) if (ch->ch_flags & CH_BREAK_SENDING) { if (time_after(jiffies, ch->ch_stop_sending_break) || force) { uchar temp = readb(&ch->ch_cls_uart->lcr); + writeb((temp & ~UART_LCR_SBC), &ch->ch_cls_uart->lcr); ch->ch_flags &= ~(CH_BREAK_SENDING); ch->ch_stop_sending_break = 0; @@ -866,6 +867,7 @@ static irqreturn_t cls_intr(int irq, void *voidbrd) static void cls_disable_receiver(struct channel_t *ch) { uchar tmp = readb(&ch->ch_cls_uart->ier); + tmp &= ~(UART_IER_RDI); writeb(tmp, &ch->ch_cls_uart->ier); } @@ -874,6 +876,7 @@ static void cls_disable_receiver(struct channel_t *ch) static void cls_enable_receiver(struct channel_t *ch) { uchar tmp = readb(&ch->ch_cls_uart->ier); + tmp |= (UART_IER_RDI); writeb(tmp, &ch->ch_cls_uart->ier); } @@ -920,6 +923,7 @@ static void cls_copy_data_from_uart_to_queue(struct channel_t *ch) */ if (linestatus & error_mask) { uchar discard; + linestatus = 0; discard = readb(&ch->ch_cls_uart->txrx); continue; @@ -1157,6 +1161,7 @@ static void cls_parse_modem(struct channel_t *ch, uchar signals) DGNC_LOCK(ch->ch_lock, lock_flags); if (ch->ch_digi.digi_flags & DIGI_ALTPIN) { uchar mswap = signals; + if (mswap & UART_MSR_DDCD) { msignals &= ~UART_MSR_DDCD; msignals |= UART_MSR_DDSR; @@ -1356,6 +1361,7 @@ static void cls_send_break(struct channel_t *ch, int msecs) /* Turn break off, and unset some variables */ if (ch->ch_flags & CH_BREAK_SENDING) { uchar temp = readb(&ch->ch_cls_uart->lcr); + writeb((temp & ~UART_LCR_SBC), &ch->ch_cls_uart->lcr); ch->ch_flags &= ~(CH_BREAK_SENDING); ch->ch_stop_sending_break = 0; @@ -1375,6 +1381,7 @@ static void cls_send_break(struct channel_t *ch, int msecs) /* Tell the UART to start sending the break */ if (!(ch->ch_flags & CH_BREAK_SENDING)) { uchar temp = readb(&ch->ch_cls_uart->lcr); + writeb((temp | UART_LCR_SBC), &ch->ch_cls_uart->lcr); ch->ch_flags |= (CH_BREAK_SENDING); DPR_IOCTL(( -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: dgnc: Remove unnecessary 'return' statement
This commit fixes the checkpath warning 'void function return statements are not generally useful' caused by the 'return' at the end of 'void' function. Signed-off-by: Konrad Zapalowicz --- drivers/staging/dgnc/dgnc_cls.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c index 0d3ca7c..fe099c6 100644 --- a/drivers/staging/dgnc/dgnc_cls.c +++ b/drivers/staging/dgnc/dgnc_cls.c @@ -1138,8 +1138,6 @@ static void cls_copy_data_from_queue_to_uart(struct channel_t *ch) ch->ch_flags &= ~(CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM); DGNC_UNLOCK(ch->ch_lock, lock_flags); - - return; } -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 10/12] staging: lustre: Fix misplaced opening brace warnings
On Wed, Aug 06, 2014 at 10:43:00PM +0530, Srikrishan Malik wrote: > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c > b/drivers/staging/lustre/lustre/mdc/mdc_locks.c > index c03d77c9c5b8..09209171b50c 100644 > --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c > +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c > @@ -785,12 +785,12 @@ int mdc_enqueue(struct obd_export *exp, struct > ldlm_enqueue_info *einfo, > __u64 flags, saved_flags = extra_lock_flags; > int rc; > struct ldlm_res_id res_id; > - static const ldlm_policy_data_t lookup_policy = > - { .l_inodebits = { MDS_INODELOCK_LOOKUP } }; > - static const ldlm_policy_data_t update_policy = > - { .l_inodebits = { MDS_INODELOCK_UPDATE } }; > - static const ldlm_policy_data_t layout_policy = > - { .l_inodebits = { MDS_INODELOCK_LAYOUT } }; > + static const ldlm_policy_data_t lookup_policy = { > + .l_inodebits = { MDS_INODELOCK_LOOKUP } }; > + static const ldlm_policy_data_t update_policy = { > + .l_inodebits = { MDS_INODELOCK_UPDATE } }; > + static const ldlm_policy_data_t layout_policy = { > + .l_inodebits = { MDS_INODELOCK_LAYOUT } }; > static const ldlm_policy_data_t getxattr_policy = { > .l_inodebits = { MDS_INODELOCK_XATTR } }; > ldlm_policy_data_t const *policy = &lookup_policy; That looks silly before and after. Everything is indented in a funny way. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line
On Wed, Aug 06, 2014 at 09:01:24PM +0200, Konrad Zapalowicz wrote: > @@ -1935,8 +1935,8 @@ static void neo_vpd(struct dgnc_board *brd) > > if (((brd->vpd[0x08] != 0x82) /* long resource name tag */ > && (brd->vpd[0x10] != 0x82)) /* long resource name tag > (PCI-66 files)*/ > - || (brd->vpd[0x7F] != 0x78)) /* small resource end tag */ > - { > + || (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */ > + This condition should really be written like this: if ((brd->vpd[0x08] != 0x82 && /* long resource name tag */ brd->vpd[0x10] != 0x82) || /* (PCI-66 files) */ brd->vpd[0x7F] != 0x78) { /* small resource end tag */ Except that the magical numbers should be defines and then we could remove the comments. This stuff could be changed in a later patch, no worries. TODO-list: 2014-08-06: dgnc: Too many magic numbers regards, dan carpenter > memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE); > } else { > /* Search for the serial number */ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Input: hyperv-keyboard: register as a wakeup source
On Fri, Aug 01, 2014 at 07:28:24AM -0700, Dexuan Cui wrote: > With this patch, we can press a key to wake up the VM after the VM executes > "echo freeze > /sys/power/state". > > This addresses part of https://bugzilla.redhat.com/show_bug.cgi?id=1086100 I am sorry but this bug is not open to the public. Please avoid mentioning such bugs in changelogs. Otherwise I'll apply it. > > Cc: K. Y. Srinivasan > Signed-off-by: Dexuan Cui > --- > drivers/input/serio/hyperv-keyboard.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/drivers/input/serio/hyperv-keyboard.c > b/drivers/input/serio/hyperv-keyboard.c > index 6132619..e74e5d6 100644 > --- a/drivers/input/serio/hyperv-keyboard.c > +++ b/drivers/input/serio/hyperv-keyboard.c > @@ -170,6 +170,15 @@ static void hv_kbd_on_receive(struct hv_device *hv_dev, > serio_interrupt(kbd_dev->hv_serio, scan_code, 0); > } > spin_unlock_irqrestore(&kbd_dev->lock, flags); > + > + /* > + * Only trigger a wakeup on key down, otherwise > + * "echo freeze > /sys/power/state" can't really enter the > + * state because the Enter-UP can trigger a wakeup at once. > + */ > + if (!(info & IS_BREAK)) > + pm_wakeup_event(&hv_dev->device, 0); > + > break; > > default: > @@ -376,6 +385,9 @@ static int hv_kbd_probe(struct hv_device *hv_dev, > goto err_close_vmbus; > > serio_register_port(kbd_dev->hv_serio); > + > + device_init_wakeup(&hv_dev->device, true); > + > return 0; > > err_close_vmbus: > @@ -390,6 +402,7 @@ static int hv_kbd_remove(struct hv_device *hv_dev) > { > struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev); > > + device_init_wakeup(&hv_dev->device, false); > serio_unregister_port(kbd_dev->hv_serio); > vmbus_close(hv_dev->channel); > kfree(kbd_dev); > -- > 1.9.1 > -- Dmitry ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line
On 08/06, Dan Carpenter wrote: > On Wed, Aug 06, 2014 at 09:01:24PM +0200, Konrad Zapalowicz wrote: > > @@ -1935,8 +1935,8 @@ static void neo_vpd(struct dgnc_board *brd) > > > > if (((brd->vpd[0x08] != 0x82) /* long resource name tag */ > > && (brd->vpd[0x10] != 0x82)) /* long resource name tag > > (PCI-66 files)*/ > > - || (brd->vpd[0x7F] != 0x78)) /* small resource end tag */ > > - { > > + || (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */ > > + > > This condition should really be written like this: > > if ((brd->vpd[0x08] != 0x82 && /* long resource name tag */ > brd->vpd[0x10] != 0x82) || /* (PCI-66 files) */ >brd->vpd[0x7F] != 0x78) { /* small resource end tag */ > > Except that the magical numbers should be defines and then we could > remove the comments. > > This stuff could be changed in a later patch, no worries. True, thanks for hint. Definitely something to look into in the future. > TODO-list: 2014-08-06: dgnc: Too many magic numbers > > regards, > dan carpenter > > > memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE); > > } else { > > /* Search for the serial number */ > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 05/12] staging: lustre: Add missing spaces around operators and braces.
On Wed, Aug 06, 2014 at 01:31:46PM -0700, Joe Perches wrote: > On Wed, 2014-08-06 at 23:13 +0300, Dan Carpenter wrote: > > On Wed, Aug 06, 2014 at 10:42:55PM +0530, Srikrishan Malik wrote: > > > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c > > > b/drivers/staging/lustre/lustre/mdc/mdc_reint.c > [] > > > @@ -71,7 +71,7 @@ int mdc_resource_get_unused(struct obd_export *exp, > > > const struct lu_fid *fid, > > > __u64 bits) > > > { > > > struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; > > > - ldlm_policy_data_t policy = {{0}}; > > > + ldlm_policy_data_t policy = {{0} }; > > > > That's odd. Since when is a space required here? Anyway, put one at > > the start too if you're goind to do that. Or you could do it like: > > > > ldlm_policy_data_t policy = {}; > > > > ? > > It comes from a pretty old bit of checkpatch: > > de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3706) # closing brace > should have a space following it when it has anything > de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3707) # on the line > de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3708)if > ($line =~ /}(?!(?:,|;|\)))\S/) { > > Maybe it should have an } added to the test like: > > if ($line =~ /}(?!(?:,|;|\)|}))\S/) { > Yes. It feels like '}}' is common. Also it should ignore \. because this used for: ERROR: space required after that close brace '}' #118: FILE: ./drivers/gpu/drm/nouveau/core/engine/disp/nva3.c:118: +}.base.base; Otherwise this test is legit and complains about bad typedefs and '}else{' statements. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Caro usuário de e-mail
Caro usuário de e-mail Temos notado que a sua conta está conectado a partir de um server.You diferente são para verificar esta conta, por favor, preencha esta questão de teste. Qual é seu nome . ??, endereço de email . ?? senha ??, número de telefone .. ?? em completar essa pergunta, vamos ajudar a proteger a sua conta. obrigado admin Center ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 05/12] staging: lustre: Add missing spaces around operators and braces.
On Wed, 2014-08-06 at 23:13 +0300, Dan Carpenter wrote: > On Wed, Aug 06, 2014 at 10:42:55PM +0530, Srikrishan Malik wrote: > > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c > > b/drivers/staging/lustre/lustre/mdc/mdc_reint.c [] > > @@ -71,7 +71,7 @@ int mdc_resource_get_unused(struct obd_export *exp, const > > struct lu_fid *fid, > > __u64 bits) > > { > > struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; > > - ldlm_policy_data_t policy = {{0}}; > > + ldlm_policy_data_t policy = {{0} }; > > That's odd. Since when is a space required here? Anyway, put one at > the start too if you're goind to do that. Or you could do it like: > > ldlm_policy_data_t policy = {}; > > ? It comes from a pretty old bit of checkpatch: de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3706) # closing brace should have a space following it when it has anything de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3707) # on the line de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3708)if ($line =~ /}(?!(?:,|;|\)))\S/) { Maybe it should have an } added to the test like: if ($line =~ /}(?!(?:,|;|\)|}))\S/) { ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] Drivers: net-next: hyperv: Adjust the size of sendbuf region to support ws2008r2
From: "K. Y. Srinivasan" Date: Wed, 6 Aug 2014 11:11:00 -0700 > WS2008R2 is a supported platform and it turns out that the maximum sendbuf > size that ws2008R2 can support is only 15MB. Make the necessary > adjustment. > > Signed-off-by: K. Y. Srinivasan Applied, thanks. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging/lustre: use rcu_dereference to access rcu protected current->real_parent field
On Wed, Aug 06, 2014 at 09:22:43PM +0300, Evgeny Budilovsky wrote: > > > Signed-off-by: Evgeny Budilovsky Why is this needed? Is the current code a bug? Where was the reference added? Is this causing a problem without this patch applied? How far back should it be backported, if at all? I need lots more details here before I can take this patch, sorry. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: android: sw_sync.c: Fixed coding style issue.
Fixed coding style issue where blank line is missing after declaration. Signed-off-by: Yee Chin, Chiam --- drivers/staging/android/sw_sync.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c index a76db3f..863d4b1 100644 --- a/drivers/staging/android/sw_sync.c +++ b/drivers/staging/android/sw_sync.c @@ -97,6 +97,7 @@ static void sw_sync_pt_value_str(struct sync_pt *sync_pt, char *str, int size) { struct sw_sync_pt *pt = (struct sw_sync_pt *)sync_pt; + snprintf(str, size, "%d", pt->value); } @@ -156,6 +157,7 @@ static int sw_sync_open(struct inode *inode, struct file *file) static int sw_sync_release(struct inode *inode, struct file *file) { struct sw_sync_timeline *obj = file->private_data; + sync_timeline_destroy(&obj->obj); return 0; } -- 2.0.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 05/12] staging: lustre: Add missing spaces around operators and braces.
On Wed, 2014-08-06 at 23:45 +0300, Dan Carpenter wrote: > On Wed, Aug 06, 2014 at 01:31:46PM -0700, Joe Perches wrote: > > On Wed, 2014-08-06 at 23:13 +0300, Dan Carpenter wrote: > > > On Wed, Aug 06, 2014 at 10:42:55PM +0530, Srikrishan Malik wrote: > > > > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c > > > > b/drivers/staging/lustre/lustre/mdc/mdc_reint.c > > [] > > > > @@ -71,7 +71,7 @@ int mdc_resource_get_unused(struct obd_export *exp, > > > > const struct lu_fid *fid, > > > > __u64 bits) > > > > { > > > > struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; > > > > - ldlm_policy_data_t policy = {{0}}; > > > > + ldlm_policy_data_t policy = {{0} }; > > > > > > That's odd. Since when is a space required here? Anyway, put one at > > > the start too if you're goind to do that. Or you could do it like: > > > > > > ldlm_policy_data_t policy = {}; > > > > > > ? > > > > It comes from a pretty old bit of checkpatch: > > > > de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3706) # closing brace > > should have a space following it when it has anything > > de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3707) # on the line > > de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3708)if > > ($line =~ /}(?!(?:,|;|\)))\S/) { > > > > Maybe it should have an } added to the test like: > > > > if ($line =~ /}(?!(?:,|;|\)|}))\S/) { > > > > Yes. It feels like '}}' is common. I think so too. Also, there isn't an equivalent test for '{{' so warning on '}}' seems silly. > Also it should ignore \. because this used for: > > ERROR: space required after that close brace '}' > #118: FILE: ./drivers/gpu/drm/nouveau/core/engine/disp/nva3.c:118: > +}.base.base; > > Otherwise this test is legit and complains about bad typedefs and > '}else{' statements. I don't think \. should be added myself. Only nouveau uses that style. I think all of those nouveau uses are not very nice and they should be changed instead or the warnings should just be ignored there. Andy? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/5] staging: dgnc: Fix checkpath issues in dgnc_neo.c
On Wed, Aug 06, 2014 at 09:01:21PM +0200, Konrad Zapalowicz wrote: > This series of patches deals with the checkpatch error and warnings, > other than 'line length over 80 chars', found in dgnc_neo.c file. All > except of patch 5/5 do not change the behavior. > > Konrad Zapalowicz (5): > staging: dgnc: Fix included header from 'asm' > staging: dgnc: Fix missing blank line after declarations > staging: dgnc: Fix that open brace { should be on the previous line > staging: dgnc: Fix braces {} are not necessary for single statement > blocks > staging: dgnc: Remove 'volatile' modifier where it is not needed > > drivers/staging/dgnc/dgnc_neo.c | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) Hi, This is the friendly semi-automated patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. Right now, the development tree you have sent a patch for is "closed" due to the timing of the merge window. Don't worry, the patch(es) you have sent are not lost, and will be looked at after the merge window is over (after the -rc1 kernel is released by Linus). So thank you for your patience and your patches will be reviewed at this later time, you do not have to do anything further, this is just a short note to let you know the patch status and so you don't worry they didn't make it through. thanks, greg k-h's patch email bot ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH] Input: hyperv-keyboard: register as a wakeup source
> -Original Message- > From: Dmitry Torokhov [mailto:dmitry.torok...@gmail.com] > Sent: Thursday, August 7, 2014 4:34 AM > To: Dexuan Cui > On Fri, Aug 01, 2014 at 07:28:24AM -0700, Dexuan Cui wrote: > > With this patch, we can press a key to wake up the VM after the VM > executes > > "echo freeze > /sys/power/state". > > > > This addresses part of > https://bugzilla.redhat.com/show_bug.cgi?id=1086100 > > I am sorry but this bug is not open to the public. Please avoid > mentioning such bugs in changelogs. Otherwise I'll apply it. Hi Dmitry, Sorry, I didn't realize it's not public... :-) I'll remove the line and re-send the patch. Thanks, -- Dexuan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 2/2] staging: iio: accel: sca3000_core.c: Adjust code to fit 80-chars limit
Signed-off-by: Murilo Opsfelder Araujo --- drivers/staging/iio/accel/sca3000_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c index bc53fedb..e4e5639 100644 --- a/drivers/staging/iio/accel/sca3000_core.c +++ b/drivers/staging/iio/accel/sca3000_core.c @@ -506,7 +506,8 @@ static int sca3000_read_raw(struct iio_dev *indio_dev, mutex_unlock(&st->lock); return ret; } - *val = ((st->rx[0] & 0x3F) << 3) | ((st->rx[1] & 0xE0) >> 5); + *val = ((st->rx[0] & 0x3F) << 3) | + ((st->rx[1] & 0xE0) >> 5); } mutex_unlock(&st->lock); return IIO_VAL_INT; -- 2.1.0.rc1.204.gae8bc8d ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Input: hyperv-keyboard: register as a wakeup source
On Wed, Aug 6, 2014 at 5:19 PM, Dexuan Cui wrote: > > > -Original Message- > > From: Dmitry Torokhov [mailto:dmitry.torok...@gmail.com] > > Sent: Thursday, August 7, 2014 4:34 AM > > To: Dexuan Cui > > On Fri, Aug 01, 2014 at 07:28:24AM -0700, Dexuan Cui wrote: > > > With this patch, we can press a key to wake up the VM after the VM > > executes > > > "echo freeze > /sys/power/state". > > > > > > This addresses part of > > https://bugzilla.redhat.com/show_bug.cgi?id=1086100 > > > > I am sorry but this bug is not open to the public. Please avoid > > mentioning such bugs in changelogs. Otherwise I'll apply it. > Hi Dmitry, > Sorry, I didn't realize it's not public... :-) > > I'll remove the line and re-send the patch. > No need to resend, I already applied it. Thanks. -- Dmitry ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 0/2] staging: iio: accel: Multiple coding style fixes
The following patches fix almost all warnings reported by checkpatch.pl. v2 -> v3 changes: - Folded blank line patches into a single patch. - Fit code in 80-chars limit and still be human-readable. Murilo Opsfelder Araujo (2): staging: iio: accel: Add blank lines between declarations and code staging: iio: accel: sca3000_core.c: Adjust code to fit 80-chars limit drivers/staging/iio/accel/adis16201_core.c | 5 +++-- drivers/staging/iio/accel/adis16203_core.c | 2 ++ drivers/staging/iio/accel/adis16204_core.c | 1 + drivers/staging/iio/accel/adis16209_core.c | 1 + drivers/staging/iio/accel/adis16240_core.c | 1 + drivers/staging/iio/accel/lis3l02dq_core.c | 4 drivers/staging/iio/accel/lis3l02dq_ring.c | 1 + drivers/staging/iio/accel/sca3000_core.c | 4 +++- 8 files changed, 16 insertions(+), 3 deletions(-) -- 2.1.0.rc1.204.gae8bc8d ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 1/2] staging: iio: accel: Add blank lines between declarations and code
This patch adds missing blank lines between declarations and code and fixes lines starting by spaces, satisfying checkpatch.pl. Signed-off-by: Murilo Opsfelder Araujo --- drivers/staging/iio/accel/adis16201_core.c | 5 +++-- drivers/staging/iio/accel/adis16203_core.c | 2 ++ drivers/staging/iio/accel/adis16204_core.c | 1 + drivers/staging/iio/accel/adis16209_core.c | 1 + drivers/staging/iio/accel/adis16240_core.c | 1 + drivers/staging/iio/accel/lis3l02dq_core.c | 4 drivers/staging/iio/accel/lis3l02dq_ring.c | 1 + drivers/staging/iio/accel/sca3000_core.c | 1 + 8 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/accel/adis16201_core.c b/drivers/staging/iio/accel/adis16201_core.c index 50ba1fa..7eae5fd 100644 --- a/drivers/staging/iio/accel/adis16201_core.c +++ b/drivers/staging/iio/accel/adis16201_core.c @@ -111,6 +111,7 @@ static int adis16201_write_raw(struct iio_dev *indio_dev, int bits; s16 val16; u8 addr; + switch (mask) { case IIO_CHAN_INFO_CALIBBIAS: switch (chan->type) { @@ -131,8 +132,8 @@ static int adis16201_write_raw(struct iio_dev *indio_dev, } static const struct iio_chan_spec adis16201_channels[] = { - ADIS_SUPPLY_CHAN(ADIS16201_SUPPLY_OUT, ADIS16201_SCAN_SUPPLY, 0, 12), - ADIS_TEMP_CHAN(ADIS16201_TEMP_OUT, ADIS16201_SCAN_TEMP, 0, 12), + ADIS_SUPPLY_CHAN(ADIS16201_SUPPLY_OUT, ADIS16201_SCAN_SUPPLY, 0, 12), + ADIS_TEMP_CHAN(ADIS16201_TEMP_OUT, ADIS16201_SCAN_TEMP, 0, 12), ADIS_ACCEL_CHAN(X, ADIS16201_XACCL_OUT, ADIS16201_SCAN_ACC_X, BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14), ADIS_ACCEL_CHAN(Y, ADIS16201_YACCL_OUT, ADIS16201_SCAN_ACC_Y, diff --git a/drivers/staging/iio/accel/adis16203_core.c b/drivers/staging/iio/accel/adis16203_core.c index f472137..fbbe93f 100644 --- a/drivers/staging/iio/accel/adis16203_core.c +++ b/drivers/staging/iio/accel/adis16203_core.c @@ -37,6 +37,7 @@ static int adis16203_write_raw(struct iio_dev *indio_dev, struct adis *st = iio_priv(indio_dev); /* currently only one writable parameter which keeps this simple */ u8 addr = adis16203_addresses[chan->scan_index]; + return adis_write_reg_16(st, addr, val & 0x3FFF); } @@ -50,6 +51,7 @@ static int adis16203_read_raw(struct iio_dev *indio_dev, int bits; u8 addr; s16 val16; + switch (mask) { case IIO_CHAN_INFO_RAW: return adis_single_conversion(indio_dev, chan, diff --git a/drivers/staging/iio/accel/adis16204_core.c b/drivers/staging/iio/accel/adis16204_core.c index 19eaebc..4c8acbc 100644 --- a/drivers/staging/iio/accel/adis16204_core.c +++ b/drivers/staging/iio/accel/adis16204_core.c @@ -119,6 +119,7 @@ static int adis16204_write_raw(struct iio_dev *indio_dev, int bits; s16 val16; u8 addr; + switch (mask) { case IIO_CHAN_INFO_CALIBBIAS: switch (chan->type) { diff --git a/drivers/staging/iio/accel/adis16209_core.c b/drivers/staging/iio/accel/adis16209_core.c index 374dc6e..b2c7aed 100644 --- a/drivers/staging/iio/accel/adis16209_core.c +++ b/drivers/staging/iio/accel/adis16209_core.c @@ -44,6 +44,7 @@ static int adis16209_write_raw(struct iio_dev *indio_dev, int bits; s16 val16; u8 addr; + switch (mask) { case IIO_CHAN_INFO_CALIBBIAS: switch (chan->type) { diff --git a/drivers/staging/iio/accel/adis16240_core.c b/drivers/staging/iio/accel/adis16240_core.c index 74ace2a..205d6d0 100644 --- a/drivers/staging/iio/accel/adis16240_core.c +++ b/drivers/staging/iio/accel/adis16240_core.c @@ -163,6 +163,7 @@ static int adis16240_write_raw(struct iio_dev *indio_dev, int bits = 10; s16 val16; u8 addr; + switch (mask) { case IIO_CHAN_INFO_CALIBBIAS: val16 = val & ((1 << bits) - 1); diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c index 898653c..f5e145c 100644 --- a/drivers/staging/iio/accel/lis3l02dq_core.c +++ b/drivers/staging/iio/accel/lis3l02dq_core.c @@ -212,6 +212,7 @@ static int lis3l02dq_write_thresh(struct iio_dev *indio_dev, int val, int val2) { u16 value = val; + return lis3l02dq_spi_write_reg_s16(indio_dev, LIS3L02DQ_REG_THS_L_ADDR, value); @@ -226,6 +227,7 @@ static int lis3l02dq_write_raw(struct iio_dev *indio_dev, int ret = -EINVAL, reg; u8 uval; s8 sval; + switch (mask) { case IIO_CHAN_INFO_CALIBBIAS: if (val > 255 || val < -256) @@ -302,6 +304,7 @@ static ssize_t lis3l02dq_read_frequency(struct device *dev, struct iio_dev *indio_dev = dev_to_iio_dev(dev); int ret, len = 0; s8 t; + ret = lis3l02dq_spi_read_reg_8(indio_dev,
RE: [PATCH] Input: hyperv-keyboard: register as a wakeup source
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Dmitry Torokhov > > Hi Dmitry, > > Sorry, I didn't realize it's not public... :-) > > > > I'll remove the line and re-send the patch. > > > > No need to resend, I already applied it. > Dmitry, That's great! :-) Thanks a lot! -- Dexuan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: speakup: Insert blank lines after declarations in speakup_soft.c
On Wed, Aug 06, 2014 at 06:03:42PM +1000, Artemiy Volkov wrote: > This patch fixes the checkpatch.pl 'Missing a blank line after declarations' > warning in speakup_soft.c. > > Signed-off-by: Artemiy Volkov > --- > drivers/staging/speakup/speakup_soft.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/staging/speakup/speakup_soft.c > b/drivers/staging/speakup/speakup_soft.c > index 9ed7265..b613a08 100644 > --- a/drivers/staging/speakup/speakup_soft.c > +++ b/drivers/staging/speakup/speakup_soft.c > @@ -192,6 +192,7 @@ static int softsynth_open(struct inode *inode, struct > file *fp) > static int softsynth_close(struct inode *inode, struct file *fp) > { > unsigned long flags; > + > spin_lock_irqsave(&speakup_info.spinlock, flags); > synth_soft.alive = 0; > init_pos = 0; > @@ -282,6 +283,7 @@ static unsigned int softsynth_poll(struct file *fp, > struct poll_table_struct *wait) > { > unsigned long flags; > + > int ret = 0; > poll_wait(fp, &speakup_event, wait); That line shouldn't be there, right? It should be one line lower... Can you fix that up? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8192u: fix sparse warnings in r8192U_core.c
On Wed, Aug 06, 2014 at 02:14:16PM +0530, A Raghavendra Rao wrote: > Fix the following sparse warnings: > drivers/staging/rtl8192u/r8192U_core.c:670:6: warning: symbol 'dump_eprom' > was not declared. Should it be static? > drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning: symbol > 'txqueue2outpipe' was not declared. Should it be static? > drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning: symbol > 'GetRxPacketShiftBytes819xUsb' was not declared. Should it be static? > > Signed-off-by: A Raghavendra Rao > --- > drivers/staging/rtl8192u/r8192U_core.c |8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) This patch causes warnings to be added to the build, don't do that :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: speakup: Insert blank lines after declarations in speakup_soft.c
On Wed, 6 Aug 2014, Greg KH wrote: On Wed, Aug 06, 2014 at 06:03:42PM +1000, Artemiy Volkov wrote: This patch fixes the checkpatch.pl 'Missing a blank line after declarations' warning in speakup_soft.c. Signed-off-by: Artemiy Volkov --- drivers/staging/speakup/speakup_soft.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c index 9ed7265..b613a08 100644 --- a/drivers/staging/speakup/speakup_soft.c +++ b/drivers/staging/speakup/speakup_soft.c @@ -192,6 +192,7 @@ static int softsynth_open(struct inode *inode, struct file *fp) static int softsynth_close(struct inode *inode, struct file *fp) { unsigned long flags; + spin_lock_irqsave(&speakup_info.spinlock, flags); synth_soft.alive = 0; init_pos = 0; @@ -282,6 +283,7 @@ static unsigned int softsynth_poll(struct file *fp, struct poll_table_struct *wait) { unsigned long flags; + int ret = 0; poll_wait(fp, &speakup_event, wait); That line shouldn't be there, right? It should be one line lower... Can you fix that up? thanks, greg k-h Sure, sorry, I'll fix that up and resend. Regards, Artemiy ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] Staging: speakup: Insert blank lines after declarations in speakup_soft.c
This patch fixes the checkpatch.pl 'Missing a blank line after declarations' warning in speakup_soft.c. Signed-off-by: Artemiy Volkov --- drivers/staging/speakup/speakup_soft.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c index 9ed7265..b613a08 100644 --- a/drivers/staging/speakup/speakup_soft.c +++ b/drivers/staging/speakup/speakup_soft.c @@ -192,6 +192,7 @@ static int softsynth_open(struct inode *inode, struct file *fp) static int softsynth_close(struct inode *inode, struct file *fp) { unsigned long flags; + spin_lock_irqsave(&speakup_info.spinlock, flags); synth_soft.alive = 0; init_pos = 0; @@ -282,6 +283,7 @@ static unsigned int softsynth_poll(struct file *fp, struct poll_table_struct *wait) { unsigned long flags; int ret = 0; + poll_wait(fp, &speakup_event, wait); @@ -295,6 +297,7 @@ static unsigned int softsynth_poll(struct file *fp, static unsigned char get_index(void) { int rv; + rv = last_index; last_index = 0; return rv; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: rtl8192u: fix sparse warnings in r8192U_core.c
Fix the following sparse warnings: drivers/staging/rtl8192u/r8192U_core.c:670:6: warning: symbol 'dump_eprom' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning: symbol 'txqueue2outpipe' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning: symbol 'GetRxPacketShiftBytes819xUsb' was not declared. Should it be static? Signed-off-by: A Raghavendra Rao --- drivers/staging/rtl8192u/r8192U_core.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 7640386..6ad767a 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -667,12 +667,14 @@ static void tx_timeout(struct net_device *dev) /* this is only for debug */ -void dump_eprom(struct net_device *dev) +#ifdef DEBUG_EPROM +static void dump_eprom(struct net_device *dev) { int i; for (i = 0; i < 63; i++) RT_TRACE(COMP_EPROM, "EEPROM addr %x : %x", i, eprom_read(dev, i)); } +#endif void rtl8192_update_msr(struct net_device *dev) { @@ -1553,7 +1555,9 @@ u16 N_DBPSOfRate(u16 DataRate) return N_DBPS; } -unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue) +#ifndef USE_ONE_PIPE +static unsigned int txqueue2outpipe(struct r8192_priv *priv, + unsigned int tx_queue) { if (tx_queue >= 9) { RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__); @@ -1561,6 +1565,7 @@ unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue) } return priv->txqueue_to_outpipemap[tx_queue]; } +#endif short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb) { @@ -4873,17 +4878,18 @@ static void query_rxdesc_status(struct sk_buff *skb, } -u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats *Status, bool bIsRxAggrSubframe) -{ #ifdef USB_RX_AGGREGATION_SUPPORT +static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats *Status, + bool bIsRxAggrSubframe) +{ if (bIsRxAggrSubframe) return (sizeof(rx_desc_819x_usb) + Status->RxDrvInfoSize + Status->RxBufShift + 8); else -#endif return (sizeof(rx_desc_819x_usb) + Status->RxDrvInfoSize + Status->RxBufShift); } +#endif static void rtl8192_rx_nomal(struct sk_buff *skb) { -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: rtl8192u: fix sparse warnings in r8192U_core.c
On Thu, Aug 07, 2014 at 10:10:47AM +0530, A Raghavendra Rao wrote: > Fix the following sparse warnings: > drivers/staging/rtl8192u/r8192U_core.c:670:6: warning: symbol 'dump_eprom' > was not declared. Should it be static? > drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning: symbol > 'txqueue2outpipe' was not declared. Should it be static? > drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning: symbol > 'GetRxPacketShiftBytes819xUsb' was not declared. Should it be static? > > Signed-off-by: A Raghavendra Rao > --- > drivers/staging/rtl8192u/r8192U_core.c | 16 +++- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/drivers/staging/rtl8192u/r8192U_core.c > b/drivers/staging/rtl8192u/r8192U_core.c > index 7640386..6ad767a 100644 > --- a/drivers/staging/rtl8192u/r8192U_core.c > +++ b/drivers/staging/rtl8192u/r8192U_core.c > @@ -667,12 +667,14 @@ static void tx_timeout(struct net_device *dev) > > > /* this is only for debug */ > -void dump_eprom(struct net_device *dev) > +#ifdef DEBUG_EPROM You can't define this, so just delete the whole thing. Wait, didn't someone already do this? Yes, someone just sent me this same thing on the 1st, it's in my queue to apply after 3.17-rc1 is out. Sorry, I can't take this. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: rtl8192u: fix sparse warnings in r8192U_core.c
On Thu, Aug 07, 2014 at 10:10:47AM +0530, A Raghavendra Rao wrote: > Signed-off-by: A Raghavendra Rao This looks very similar to what I submitted on July 31st. At this time Greg had additional comments which led to a quite different patchset (though its review is not completed yet), you may find interesting to review this whole thread. Antoine ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging:r819xU: coding style: Fixed commenting style
This is a patch to the r819xU_phyreg.h file that fixes commenting style warning Signed-off-by: Sanjeev Sharma --- drivers/staging/rtl8192u/r819xU_phyreg.h | 188 --- 1 file changed, 97 insertions(+), 91 deletions(-) diff --git a/drivers/staging/rtl8192u/r819xU_phyreg.h b/drivers/staging/rtl8192u/r819xU_phyreg.h index 64285d6..f07d2f1 100644 --- a/drivers/staging/rtl8192u/r819xU_phyreg.h +++ b/drivers/staging/rtl8192u/r819xU_phyreg.h @@ -2,10 +2,10 @@ #define _R819XU_PHYREG_H -#define RF_DATA 0x1d4 // FW will write RF data in the register. +#define RF_DATA 0x1d4 /* FW will write RF data in the register.*/ -//Register //duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF -//page 1 +/* Register //duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF */ +/* page 1 */ #define rPMAC_Reset0x100 #define rPMAC_TxStart 0x104 #define rPMAC_TxLegacySIG 0x108 @@ -34,15 +34,16 @@ #define rPMAC_CCKCRxRC32OK 0x188 #define rPMAC_TxStatus 0x18c -//page8 -#define rFPGA0_RFMOD 0x800 //RF mode & CCK TxSC +/* page8 */ +#define rFPGA0_RFMOD 0x800 /* RF mode & CCK TxSC */ #define rFPGA0_TxInfo 0x804 #define rFPGA0_PSDFunction 0x808 #define rFPGA0_TxGainStage 0x80c #define rFPGA0_RFTiming1 0x810 #define rFPGA0_RFTiming2 0x814 -//#define rFPGA0_XC_RFTiming 0x818 -//#define rFPGA0_XD_RFTiming 0x81c +/* #define rFPGA0_XC_RFTiming 0x818 + * #define rFPGA0_XD_RFTiming 0x81c + */ #define rFPGA0_XA_HSSIParameter1 0x820 #define rFPGA0_XA_HSSIParameter2 0x824 #define rFPGA0_XB_HSSIParameter1 0x828 @@ -79,51 +80,51 @@ #define rFPGA0_XAB_RFInterfaceRB 0x8e0 #define rFPGA0_XCD_RFInterfaceRB 0x8e4 -//page 9 -#define rFPGA1_RFMOD 0x900 //RF mode & OFDM TxSC +/* page 9 */ +#define rFPGA1_RFMOD 0x900 /* RF mode & OFDM TxSC */ #define rFPGA1_TxBlock 0x904 #define rFPGA1_DebugSelect 0x908 #define rFPGA1_TxInfo 0x90c -//page a +/* page a */ #define rCCK0_System 0xa00 #define rCCK0_AFESetting 0xa04 #define rCCK0_CCA 0xa08 -#define rCCK0_RxAGC1 0xa0c //AGC default value, saturation level -#define rCCK0_RxAGC2 0xa10 //AGC & DAGC +#define rCCK0_RxAGC1 0xa0c /* AGC default value, saturation level */ +#define rCCK0_RxAGC2 0xa10 /* AGC & DAGC */ #define rCCK0_RxHP 0xa14 -#define rCCK0_DSPParameter10xa18 //Timing recovery & Channel estimation threshold -#define rCCK0_DSPParameter20xa1c //SQ threshold +#define rCCK0_DSPParameter10xa18 /* Timing recovery & Channel estimation threshold */ +#define rCCK0_DSPParameter20xa1c /* SQ threshold */ #define rCCK0_TxFilter10xa20 #define rCCK0_TxFilter20xa24 -#define rCCK0_DebugPort0xa28 //debug port and Tx filter3 -#define rCCK0_FalseAlarmReport 0xa2c //0xa2d +#define rCCK0_DebugPort0xa28 /* debug port and Tx filter3 */ +#define rCCK0_FalseAlarmReport 0xa2c /* 0xa2d */ #define rCCK0_TRSSIReport 0xa50 -#define rCCK0_RxReport 0xa54 //0xa57 -#define rCCK0_FACounterLower 0xa5c //0xa5b -#define rCCK0_FACounterUpper 0xa58 //0xa5c +#define rCCK0_RxReport 0xa54 /* 0xa57 */ +#define rCCK0_FACounterLower 0xa5c /* 0xa5b */ +#define rCCK0_FACounterUpper 0xa58 /* 0xa5c */ -//page c +/* page c */ #define rOFDM0_LSTF0xc00 #define rOFDM0_TRxPathEnable 0xc04 #define rOFDM0_TRMuxPar0xc08 #define rOFDM0_TRSWIsolation 0xc0c -#define rOFDM0_XARxAFE 0xc10 //RxIQ DC offset, Rx digital filter, DC notch filter -#define rOFDM0_XARxIQImbalance 0xc14 //RxIQ imblance matrix +#define rOFDM0_XARxAFE 0xc10 /* RxIQ DC offset, Rx digital filter, DC notch filter */ +#define rOFDM0_XARxIQImbalance 0xc14 /* RxIQ imblance matrix */ #define rOFDM0_XBRxAFE 0xc18 #define rOFDM0_XBRxIQImbalance 0xc1c #define r