Re: [PATCH -next] staging: most: fix error return code in audio_probe_channel()
On Sun, Sep 25, 2016 at 03:41:11PM +, Wei Yongjun wrote: > From: Wei Yongjun > > Fix to return a negative error code from the audio_set_hw_params() error > handling case instead of 0, as done elsewhere in this function. > > Signed-off-by: Wei Yongjun Signed-off-by: Andrey Shvetsov > --- > drivers/staging/most/aim-sound/sound.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/most/aim-sound/sound.c > b/drivers/staging/most/aim-sound/sound.c > index 3dc625c..00f01c9 100644 > --- a/drivers/staging/most/aim-sound/sound.c > +++ b/drivers/staging/most/aim-sound/sound.c > @@ -607,7 +607,8 @@ static int audio_probe_channel(struct most_interface > *iface, int channel_id, > channel->id = channel_id; > init_waitqueue_head(&channel->playback_waitq); > > - if (audio_set_hw_params(&channel->pcm_hardware, pcm_format, cfg)) > + ret = audio_set_hw_params(&channel->pcm_hardware, pcm_format, cfg); > + if (ret) > goto err_free_card; > > snprintf(card->driver, sizeof(card->driver), "%s", DRIVER_NAME); > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8192e: fixed block comments should align the * on each line
On Mon, Sep 26, 2016 at 12:03:04AM -0500, Darryl T. Agostinelli wrote: > Signed-off-by: Darryl T. Agostinelli > --- > drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I can't take patches without any changelog text :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 1/2] include: linux: iio: add IIO_ATTR_{RO, WO, RW} and IIO_DEVICE_ATTR_{RO, WO, RW} macros
On Sun, Sep 25, 2016 at 03:27:54PM -0400, Brian Masney wrote: > Add new macros: IIO_ATTR_RO, IIO_ATTR_WO, IIO_ATTR_RW, > IIO_DEVICE_ATTR_RO, IIO_DEVICE_ATTR_WO and IIO_DEVICE_ATTR_RW to reduce > the amount of boiler plate code that is needed for creating new > attributes. This mimics the *_RO, *_WO, and *_RW macros that are found > in include/linux/device.h and include/linux/sysfs.h. > > Signed-off-by: Brian Masney > --- > include/linux/iio/sysfs.h | 24 > 1 file changed, 24 insertions(+) Acked-by: Greg Kroah-Hartman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH -next] staging: most: fix error return code in audio_probe_channel()
On Mon, 26 Sep 2016 09:47:19 +0200 Andrey Shvetsov wrote: > On Sun, Sep 25, 2016 at 03:41:11PM +, Wei Yongjun wrote: > > From: Wei Yongjun > > > > Fix to return a negative error code from the audio_set_hw_params() error > > handling case instead of 0, as done elsewhere in this function. > > > > Signed-off-by: Wei Yongjun > Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm > > > --- > > drivers/staging/most/aim-sound/sound.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/staging/most/aim-sound/sound.c > > b/drivers/staging/most/aim-sound/sound.c > > index 3dc625c..00f01c9 100644 > > --- a/drivers/staging/most/aim-sound/sound.c > > +++ b/drivers/staging/most/aim-sound/sound.c > > @@ -607,7 +607,8 @@ static int audio_probe_channel(struct most_interface > > *iface, int channel_id, > > channel->id = channel_id; > > init_waitqueue_head(&channel->playback_waitq); > > > > - if (audio_set_hw_params(&channel->pcm_hardware, pcm_format, cfg)) > > + ret = audio_set_hw_params(&channel->pcm_hardware, pcm_format, cfg); > > + if (ret) > > goto err_free_card; > > > > snprintf(card->driver, sizeof(card->driver), "%s", DRIVER_NAME); > > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCHv3 5/5] staging:android:ion: Remove empty release function
Hi Greg, On Fri, Sep 23, 2016 at 3:06 PM, Greg KH wrote: > > Have you tested that this works? > In order to test the change I need a board with Hi6220 SoC. If I do not own the hardware to test the change, how should I proceed? thanks, Yannis ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCHv3 5/5] staging:android:ion: Remove empty release function
On Mon, Sep 26, 2016 at 01:11:50PM +0300, Yannis Damigos wrote: > Hi Greg, > > On Fri, Sep 23, 2016 at 3:06 PM, Greg KH wrote: > > > > Have you tested that this works? > > > > In order to test the change I need a board with Hi6220 SoC. > If I do not own the hardware to test the change, how should I proceed? For something like this, that isn't really a trivial patch, I'd like to have someone that has the hardware be able to test it before accepting the patch, sorry. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCHv3 5/5] staging:android:ion: Remove empty release function
On Mon, Sep 26, 2016 at 1:24 PM, Greg KH wrote: > On Mon, Sep 26, 2016 at 01:11:50PM +0300, Yannis Damigos wrote: >> Hi Greg, >> >> On Fri, Sep 23, 2016 at 3:06 PM, Greg KH wrote: >> > >> > Have you tested that this works? >> > >> >> In order to test the change I need a board with Hi6220 SoC. >> If I do not own the hardware to test the change, how should I proceed? > > For something like this, that isn't really a trivial patch, I'd like to > have someone that has the hardware be able to test it before accepting > the patch, sorry. Should I resend the other patches and exclude this one? thanks, Yannis ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2] staging: rtl8172: usb_intf.c: Fixed block comment coding style
2016-09-26 1:53 GMT+01:00 Larry Finger : > On 09/25/2016 06:00 PM, Gonçalo Salazar wrote: >> >> Fixed a block comment indentation in the rtl8712 usb_intf.c file. >> Made this as a first commit. >> Resubmitted with updated subject. >> >> Please let me know of any feedback you have. > > > I missed this last time, but everything above the --- line goes into the > permanent record. Are you sure you want all this to be there? Any chatty > remarks and any description of what changed in subsequent submissions should > be below the ---. The maintainer will see them, but they are stripped before > they get merged into the repo. > > Larry Made a mistake that should not be in the permanent record... Should I resubmit the patch? or are you able to strip it from the submission? Gonçalo > > >> >> Thanks, >> Gonçalo Salazar >> >> Signed-off-by: Gonçalo Salazar >> --- >> drivers/staging/rtl8712/usb_intf.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/staging/rtl8712/usb_intf.c >> b/drivers/staging/rtl8712/usb_intf.c >> index 3fc65b2..897d462 100644 >> --- a/drivers/staging/rtl8712/usb_intf.c >> +++ b/drivers/staging/rtl8712/usb_intf.c >> @@ -369,7 +369,7 @@ static const struct device_type wlan_type = { >> * >> * notes: drv_init() is called when the bus driver has located a card for >> us >> * to support. We accept the new device by returning 0. >> -*/ >> + */ >> static int r871xu_drv_init(struct usb_interface *pusb_intf, >>const struct usb_device_id *pdid) >> { >> > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8192e: fixed block comments should align the * on each line
shifted over comment block one space Signed-off-by: Darryl T. Agostinelli --- drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c index 29cefb5..d437a8e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c @@ -11,7 +11,7 @@ * * Contact Information: * wlanfae -**/ + */ /*Created on 2008/11/18, 3: 7*/ #include "r8192E_hwimg.h" -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8192e: fixed block comments should align the * on each line
shifted over comment block one space Signed-off-by: Darryl T. Agostinelli --- drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c index 29cefb5..d437a8e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c @@ -11,7 +11,7 @@ * * Contact Information: * wlanfae -**/ + */ /*Created on 2008/11/18, 3: 7*/ #include "r8192E_hwimg.h" -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/37] staging: lustre: llite: add missing LMV_MAGIC_V1 case
From: wang di The port to upstream dropped handling the LMV_MAGIC_V1 case for ll_dir_getstripe. This adds it back. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-on: http://review.whamcloud.com/7228 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/dir.c | 4 drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 705de1c..7f32a53 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -620,6 +620,10 @@ int ll_dir_getstripe(struct inode *inode, void **plmm, int *plmm_size, if (cpu_to_le32(LOV_MAGIC) != LOV_MAGIC) lustre_swab_lov_user_md_v3((struct lov_user_md_v3 *)lmm); break; + case LMV_MAGIC_V1: + if (cpu_to_le32(LMV_MAGIC) != LMV_MAGIC) + lustre_swab_lmv_mds_md((union lmv_mds_md *)lmm); + break; case LMV_USER_MAGIC: if (cpu_to_le32(LMV_USER_MAGIC) != LMV_USER_MAGIC) lustre_swab_lmv_user_md((struct lmv_user_md *)lmm); diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c index e24d8e1..8717685 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c @@ -1861,6 +1861,7 @@ void lustre_swab_lmv_mds_md(union lmv_mds_md *lmm) break; } } +EXPORT_SYMBOL(lustre_swab_lmv_mds_md); void lustre_swab_lmv_user_md(struct lmv_user_md *lum) { -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 8/9] staging: unisys: visorbus: Convert visorchannel_signalremove() return val
From: David Binder Per Documentation/CodingStyle, function names that convey an action or an imperative command should return an integer. This commit converts the visorbus API function, visorchannel_signalremove(), to returning integer values. All uses of this function are updated accordingly. Signed-off-by: David Binder Signed-off-by: David Kershner --- drivers/staging/unisys/include/visorbus.h | 4 ++-- drivers/staging/unisys/visorbus/visorchannel.c | 8 drivers/staging/unisys/visorbus/visorchipset.c | 10 +- drivers/staging/unisys/visorhba/visorhba_main.c | 6 +++--- drivers/staging/unisys/visorinput/visorinput.c | 2 +- drivers/staging/unisys/visornic/visornic_main.c | 12 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h index 2e508c2..a4442c3 100644 --- a/drivers/staging/unisys/include/visorbus.h +++ b/drivers/staging/unisys/include/visorbus.h @@ -200,8 +200,8 @@ enum diag_severity { DIAG_SEVERITY_PRINT = 4, }; -bool visorchannel_signalremove(struct visorchannel *channel, u32 queue, - void *msg); +int visorchannel_signalremove(struct visorchannel *channel, u32 queue, + void *msg); bool visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg); bool visorchannel_signalempty(struct visorchannel *channel, u32 queue); diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c index fe5a620..70fcd1f 100644 --- a/drivers/staging/unisys/visorbus/visorchannel.c +++ b/drivers/staging/unisys/visorbus/visorchannel.c @@ -270,12 +270,12 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg) * @queue: the queue the message will be removed from * @msg: the message to remove * - * Return: boolean indicating whether the removal succeeded or failed + * Return: integer error code indicating the status of the removal */ -bool +int visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg) { - bool rc; + int rc; unsigned long flags; if (channel->needs_lock) { @@ -286,7 +286,7 @@ visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg) rc = signalremove_inner(channel, queue, msg); } - return !rc; + return rc; } EXPORT_SYMBOL_GPL(visorchannel_signalremove); diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index e95d04d..ed4eced 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -2000,8 +2000,8 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr) static bool read_controlvm_event(struct controlvm_message *msg) { - if (visorchannel_signalremove(controlvm_channel, - CONTROLVM_QUEUE_EVENT, msg)) { + if (!visorchannel_signalremove(controlvm_channel, + CONTROLVM_QUEUE_EVENT, msg)) { /* got a message */ if (msg->hdr.flags.test_message == 1) return false; @@ -2048,9 +2048,9 @@ controlvm_periodic_work(struct work_struct *work) bool got_command = false; bool handle_command_failed = false; - while (visorchannel_signalremove(controlvm_channel, -CONTROLVM_QUEUE_RESPONSE, -&inmsg)) + while (!visorchannel_signalremove(controlvm_channel, + CONTROLVM_QUEUE_RESPONSE, + &inmsg)) ; if (!got_command) { if (controlvm_pending_msg_valid) { diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 887be22..e968f33 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -927,9 +927,9 @@ drain_queue(struct uiscmdrsp *cmdrsp, struct visorhba_devdata *devdata) struct scsi_cmnd *scsicmd; while (1) { - if (!visorchannel_signalremove(devdata->dev->visorchannel, - IOCHAN_FROM_IOPART, - cmdrsp)) + if (visorchannel_signalremove(devdata->dev->visorchannel, + IOCHAN_FROM_IOPART, + cmdrsp)) break; /* queue empty */ if (cmdrsp->cmdtype == CMD_SCSI_TYPE) { diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c index aa44414..6f94b64 100644 --- a/drivers/stagi
[PATCH 0/9] staging: unisys: Remove version information
This patch series removes the Unisys s-Par specific versioning and replaces it where approrpriate with the kernel version. This series also converts several bool return types to the more appropriate error returns. It does not completely fix error handling with the new functions; that will be addressed in another series that overhauls error handling for the driver. David Binder (3): staging: unisys: visorbus: Change support functions to integer return vals staging: unisys: visorbus: Convert visorchannel_signalremove() return val staging: unisys: visorbus: Convert visorchannel_signalinsert() return val Jon Frisch (6): staging: unisys: remove driver version from struct visor_driver staging: unisys: visorbus: remove driver version from visorchipset.c staging: unisys: visorinput: remove driver version from visorinput.c staging: unisys: visornic: remove driver version from visornic_main.c staging: unisys: remove version.h staging: unisys: make MODULE_DESCRIPTIONs consistent drivers/staging/unisys/include/version.h | 45 drivers/staging/unisys/include/visorbus.h | 14 +-- drivers/staging/unisys/visorbus/vbuschannel.h | 3 +- drivers/staging/unisys/visorbus/visorbus_main.c| 76 + drivers/staging/unisys/visorbus/visorbus_private.h | 12 +- drivers/staging/unisys/visorbus/visorchannel.c | 123 ++--- drivers/staging/unisys/visorbus/visorchipset.c | 31 +++--- drivers/staging/unisys/visorhba/visorhba_main.c| 20 ++-- drivers/staging/unisys/visorinput/visorinput.c | 7 +- drivers/staging/unisys/visornic/visornic_main.c| 33 +++--- 10 files changed, 114 insertions(+), 250 deletions(-) delete mode 100644 drivers/staging/unisys/include/version.h -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 7/9] staging: unisys: visorbus: Change support functions to integer return vals
From: David Binder Per Documentation/CodingStyle, function names that convey an action or an imperative command should return an integer value. This commit changes several functions and a macro, internal to visorchannel.c, to follow this paradigm. These changes will be necessary later on to change other functions in this file, which are part of the visorbus API, to return integer values in lieu of a boolean. Signed-off-by: David Binder Signed-off-by: David Kershner --- drivers/staging/unisys/visorbus/visorchannel.c | 114 - 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c index 6cfd213..fe5a620 100644 --- a/drivers/staging/unisys/visorbus/visorchannel.c +++ b/drivers/staging/unisys/visorbus/visorchannel.c @@ -185,76 +185,66 @@ visorchannel_get_header(struct visorchannel *channel) * into host memory */ #define SIG_WRITE_FIELD(channel, queue, sig_hdr, FIELD) \ - (visorchannel_write(channel, \ - SIG_QUEUE_OFFSET(&channel->chan_hdr, queue) +\ - offsetof(struct signal_queue_header, FIELD), \ - &((sig_hdr)->FIELD), \ - sizeof((sig_hdr)->FIELD)) >= 0) + visorchannel_write(channel, \ + SIG_QUEUE_OFFSET(&channel->chan_hdr, queue) +\ + offsetof(struct signal_queue_header, FIELD), \ + &((sig_hdr)->FIELD), \ + sizeof((sig_hdr)->FIELD)) -static bool +static int sig_read_header(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr) { - int err; - if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header)) - return false; + return -EINVAL; /* Read the appropriate SIGNAL_QUEUE_HEADER into local memory. */ - err = visorchannel_read(channel, - SIG_QUEUE_OFFSET(&channel->chan_hdr, queue), - sig_hdr, sizeof(struct signal_queue_header)); - if (err) - return false; - - return true; + return visorchannel_read(channel, +SIG_QUEUE_OFFSET(&channel->chan_hdr, queue), +sig_hdr, sizeof(struct signal_queue_header)); } -static inline bool +static inline int sig_read_data(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr, u32 slot, void *data) { - int err; int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue, sig_hdr, slot); - err = visorchannel_read(channel, signal_data_offset, - data, sig_hdr->signal_size); - if (err) - return false; - - return true; + return visorchannel_read(channel, signal_data_offset, +data, sig_hdr->signal_size); } -static inline bool +static inline int sig_write_data(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr, u32 slot, void *data) { - int err; int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue, sig_hdr, slot); - err = visorchannel_write(channel, signal_data_offset, -data, sig_hdr->signal_size); - if (err) - return false; - - return true; + return visorchannel_write(channel, signal_data_offset, + data, sig_hdr->signal_size); } -static bool +static int signalremove_inner(struct visorchannel *channel, u32 queue, void *msg) { struct signal_queue_header sig_hdr; + int error; + + error = sig_read_header(channel, queue, &sig_hdr); + if (error) + return error; - if (!sig_read_header(channel, queue, &sig_hdr)) - return false; if (sig_hdr.head == sig_hdr.tail) - return false; /* no signals to remove */ + return -EIO;/* no signals to remove */ sig_hdr.tail = (sig_hdr.tail + 1) % sig_hdr.max_slots; - if (!sig_read_data(channel, queue, &sig_hdr, sig_hdr.tail, msg)) - return false; + + error = sig_read_data(channel, queue, &sig_hdr, sig_hdr.tail, msg); + if (error) + return error; + sig_hdr.num_received++; /* @@ -262,11 +252,15 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg) * update host memory. */ mb(); /* required for channel synch */ - if (!SIG_WRITE_FIELD(channel, queue, &sig
[PATCH] staging: skein: Remove extra blank lines
Fix coding style issue "multiple blank lines" detected by checkpatch.pl in threefish_block.c file. Signed-off-by: Martin --- drivers/staging/skein/threefish_block.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/staging/skein/threefish_block.c b/drivers/staging/skein/threefish_block.c index a95563f..5064065 100644 --- a/drivers/staging/skein/threefish_block.c +++ b/drivers/staging/skein/threefish_block.c @@ -64,7 +64,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k3 + t2; b0 += b1 + k2; b1 = rol64(b1, 14) ^ b0; @@ -117,7 +116,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k0 + t1; b0 += b1 + k4; b1 = rol64(b1, 14) ^ b0; @@ -170,7 +168,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k2 + t0; b0 += b1 + k1; b1 = rol64(b1, 14) ^ b0; @@ -223,7 +220,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k4 + t2; b0 += b1 + k3; b1 = rol64(b1, 14) ^ b0; @@ -276,7 +272,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k1 + t1; b0 += b1 + k0; b1 = rol64(b1, 14) ^ b0; @@ -329,7 +324,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k3 + t0; b0 += b1 + k2; b1 = rol64(b1, 14) ^ b0; @@ -382,7 +376,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k0 + t2; b0 += b1 + k4; b1 = rol64(b1, 14) ^ b0; @@ -435,7 +428,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k2 + t1; b0 += b1 + k1; b1 = rol64(b1, 14) ^ b0; @@ -579,7 +571,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k3 + t2; b3 -= k4 + 16; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -648,7 +639,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k1 + t0; b3 -= k2 + 14; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -717,7 +707,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k4 + t1; b3 -= k0 + 12; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -786,7 +775,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k2 + t2; b3 -= k3 + 10; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -855,7 +843,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k0 + t0; b3 -= k1 + 8; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -924,7 +911,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k3 + t1; b3 -= k4 + 6; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -993,7 +979,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k1 + t2; b3 -= k2 + 4; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -1062,7 +1047,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k4 + t0; b3 -= k0 + 2; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; -- 2.8.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 9/9] staging: unisys: visorbus: Convert visorchannel_signalinsert() return val
From: David Binder Per Documentation/CodingStyle, function names that convey an action or an imperative command should return an integer. This commit converts the visorbus API function, visorchannel_signalinsert(), to returning integer values. All uses of this function are updated accordingly. Signed-off-by: David Binder Signed-off-by: David Kershner --- drivers/staging/unisys/include/visorbus.h | 4 ++-- drivers/staging/unisys/visorbus/visorchannel.c | 8 drivers/staging/unisys/visorbus/visorchipset.c | 16 drivers/staging/unisys/visorhba/visorhba_main.c | 12 ++-- drivers/staging/unisys/visornic/visornic_main.c | 16 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h index a4442c3..677627c 100644 --- a/drivers/staging/unisys/include/visorbus.h +++ b/drivers/staging/unisys/include/visorbus.h @@ -202,8 +202,8 @@ enum diag_severity { int visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg); -bool visorchannel_signalinsert(struct visorchannel *channel, u32 queue, - void *msg); +int visorchannel_signalinsert(struct visorchannel *channel, u32 queue, + void *msg); bool visorchannel_signalempty(struct visorchannel *channel, u32 queue); uuid_le visorchannel_get_uuid(struct visorchannel *channel); diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c index 70fcd1f..300a65d 100644 --- a/drivers/staging/unisys/visorbus/visorchannel.c +++ b/drivers/staging/unisys/visorbus/visorchannel.c @@ -493,12 +493,12 @@ visorchannel_create_with_lock(u64 physaddr, unsigned long channel_bytes, * @queue: the queue the message will be added to * @msg: the message to insert * - * Return: boolean indicating whether the insertion succeeded or failed + * Return: integer error code indicating the status of the insertion */ -bool +int visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg) { - bool rc; + int rc; unsigned long flags; if (channel->needs_lock) { @@ -509,6 +509,6 @@ visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg) rc = signalinsert_inner(channel, queue, msg); } - return !rc; + return rc; } EXPORT_SYMBOL_GPL(visorchannel_signalinsert); diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index ed4eced..5987149 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -508,8 +508,8 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msg_hdr, controlvm_init_response(&outmsg, msg_hdr, response); outmsg.cmd.init_chipset.features = features; - if (!visorchannel_signalinsert(controlvm_channel, - CONTROLVM_QUEUE_REQUEST, &outmsg)) { + if (visorchannel_signalinsert(controlvm_channel, + CONTROLVM_QUEUE_REQUEST, &outmsg)) { return; } } @@ -557,8 +557,8 @@ controlvm_respond(struct controlvm_message_header *msg_hdr, int response) if (outmsg.hdr.flags.test_message == 1) return; - if (!visorchannel_signalinsert(controlvm_channel, - CONTROLVM_QUEUE_REQUEST, &outmsg)) { + if (visorchannel_signalinsert(controlvm_channel, + CONTROLVM_QUEUE_REQUEST, &outmsg)) { return; } } @@ -572,8 +572,8 @@ static void controlvm_respond_physdev_changestate( controlvm_init_response(&outmsg, msg_hdr, response); outmsg.cmd.device_change_state.state = state; outmsg.cmd.device_change_state.flags.phys_device = 1; - if (!visorchannel_signalinsert(controlvm_channel, - CONTROLVM_QUEUE_REQUEST, &outmsg)) { + if (visorchannel_signalinsert(controlvm_channel, + CONTROLVM_QUEUE_REQUEST, &outmsg)) { return; } } @@ -670,8 +670,8 @@ device_changestate_responder(enum controlvm_id cmd_id, outmsg.cmd.device_change_state.dev_no = dev_no; outmsg.cmd.device_change_state.state = response_state; - if (!visorchannel_signalinsert(controlvm_channel, - CONTROLVM_QUEUE_REQUEST, &outmsg)) + if (visorchannel_signalinsert(controlvm_channel, + CONTROLVM_QUEUE_REQUEST, &outmsg)) return; } diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index e968f33..5a7a87e 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +
[PATCH 3/9] staging: unisys: visorinput: remove driver version from visorinput.c
From: Jon Frisch This patch removes the driver version and the version.h include from visorinput.c Signed-off-by: Jon Frisch Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner --- drivers/staging/unisys/visorinput/visorinput.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c index 4e0b26d..afdf2b5 100644 --- a/drivers/staging/unisys/visorinput/visorinput.c +++ b/drivers/staging/unisys/visorinput/visorinput.c @@ -29,7 +29,6 @@ #include #include -#include "version.h" #include "visorbus.h" #include "ultrainputreport.h" @@ -764,7 +763,6 @@ MODULE_DEVICE_TABLE(visorbus, visorinput_channel_types); MODULE_AUTHOR("Unisys"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("s-Par human input driver for guest Linux"); -MODULE_VERSION(VERSION); MODULE_ALIAS("visorbus:" SPAR_MOUSE_CHANNEL_PROTOCOL_UUID_STR); MODULE_ALIAS("visorbus:" SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID_STR); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/9] staging: unisys: remove driver version from struct visor_driver
From: Jon Frisch This patch removes the all instances of the driver version from struct visor_driver. This includes removing version, vertag (a human readable version string of the driver version) and version_attr from struct visor_driver. This resulted in removing the bus attributes and driver attributes which only contained the driver version. The utsname function is used to replace the driver version with the kernel version in bus_device_info_init(). Signed-off-by: Jon Frisch Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner --- drivers/staging/unisys/include/visorbus.h | 6 -- drivers/staging/unisys/visorbus/vbuschannel.h | 3 +- drivers/staging/unisys/visorbus/visorbus_main.c| 76 +- drivers/staging/unisys/visorbus/visorbus_private.h | 12 ++-- drivers/staging/unisys/visorinput/visorinput.c | 1 - drivers/staging/unisys/visornic/visornic_main.c| 2 - 6 files changed, 8 insertions(+), 92 deletions(-) diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h index 993cf19..2e508c2 100644 --- a/drivers/staging/unisys/include/visorbus.h +++ b/drivers/staging/unisys/include/visorbus.h @@ -66,8 +66,6 @@ struct visor_channeltype_descriptor { * struct visor_driver - Information provided by each visor driver when it * registers with the visorbus driver. * @name: Name of the visor driver. - * @version: The numbered version of the driver (x.x.xxx). - * @vertag:A human readable version string. * @owner: The module owner. * @channel_types: Types of channels handled by this driver, ending with * a zero GUID. Our specialized BUS.match() method knows @@ -94,12 +92,9 @@ struct visor_channeltype_descriptor { * @resume:Behaves similar to pause. * @driver:Private reference to the device driver. For use by bus * driver only. - * @version_attr: Private version field. For use by bus driver only. */ struct visor_driver { const char *name; - const char *version; - const char *vertag; struct module *owner; struct visor_channeltype_descriptor *channel_types; int (*probe)(struct visor_device *dev); @@ -112,7 +107,6 @@ struct visor_driver { /* These fields are for private use by the bus driver only. */ struct device_driver driver; - struct driver_attribute version_attr; }; #define to_visor_driver(x) ((x) ? \ diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h b/drivers/staging/unisys/visorbus/vbuschannel.h index 3f7830b..e979175 100644 --- a/drivers/staging/unisys/visorbus/vbuschannel.h +++ b/drivers/staging/unisys/visorbus/vbuschannel.h @@ -67,8 +67,7 @@ static const uuid_le spar_vbus_channel_protocol_uuid = struct ultra_vbus_deviceinfo { u8 devtype[16]; /* short string identifying the device type */ u8 drvname[16]; /* driver .sys file name */ - u8 infostrs[96];/* sequence of tab-delimited id strings: */ - /**/ + u8 infostrs[96];/* kernel version */ u8 reserved[128]; /* pad size to 256 bytes */ }; diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 3918bb5..1f3d2e0 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -18,7 +18,6 @@ #include "visorbus.h" #include "visorbus_private.h" -#include "version.h" #include "vmcallinterface.h" #define MYDRVNAME "visorbus" @@ -36,34 +35,6 @@ static int visorbus_forcenomatch; static int busreg_rc = -ENODEV; /* stores the result from bus registration */ /* - * BUS type attributes - * - * define & implement display of bus attributes under - * /sys/bus/visorbus. - */ - -static ssize_t version_show(struct bus_type *bus, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%s\n", VERSION); -} - -static BUS_ATTR_RO(version); - -static struct attribute *visorbus_bus_attrs[] = { - &bus_attr_version.attr, - NULL, -}; - -static const struct attribute_group visorbus_bus_group = { - .attrs = visorbus_bus_attrs, -}; - -static const struct attribute_group *visorbus_bus_groups[] = { - &visorbus_bus_group, - NULL, -}; - -/* * DEVICE type attributes * * The modalias file will contain the guid of the device. @@ -167,7 +138,6 @@ struct bus_type visorbus_type = { .match = visorbus_match, .uevent = visorbus_uevent, .dev_groups = visorbus_dev_groups, - .bus_groups = visorbus_bus_groups, }; /** @@ -465,36 +435,6 @@ static const struct attribute_group *visorbus_groups[] = { NULL }; -/* - * DRIVER attributes - * - * define & implement display of driver attributes under - * /sys/bus/visorbus/drivers/. - */ - -static ssize_t -DRIVER_ATTR_version(struct device_driver *xdrv,
[PATCH 5/9] staging: unisys: remove version.h
From: Jon Frisch This patch removes version.h and the last version.h include in visorchannel.c. Signed-off-by: Jon Frisch Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner --- drivers/staging/unisys/include/version.h | 45 -- drivers/staging/unisys/visorbus/visorchannel.c | 1 - 2 files changed, 46 deletions(-) delete mode 100644 drivers/staging/unisys/include/version.h diff --git a/drivers/staging/unisys/include/version.h b/drivers/staging/unisys/include/version.h deleted file mode 100644 index 83d1da7..000 --- a/drivers/staging/unisys/include/version.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2010 - 2013 UNISYS CORPORATION - * All rights reserved. - * - * 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, GOOD TITLE or - * NON INFRINGEMENT. See the GNU General Public License for more - * details. - */ - -/* version.h */ - -/* Common version/release info needed by all components goes here. - * (This file must compile cleanly in all environments.) - * Ultimately, this will be combined with defines generated dynamically as - * part of the sysgen, and some of the defines below may in fact end up - * being replaced with dynamically generated ones. - */ -#ifndef __VERSION_H__ -#define __VERSION_H__ - -#define SPARVER1 "1" -#define SPARVER2 "0" -#define SPARVER3 "0" -#define SPARVER4 "0" - -#define VERSIONSPARVER1 "." SPARVER2 "." SPARVER3 "." SPARVER4 - -/* Here are various version forms needed in Windows environments. - */ -#define VISOR_PRODUCTVERSION SPARVERCOMMA -#define VISOR_PRODUCTVERSION_STR SPARVER1 "." SPARVER2 "." SPARVER3 "." \ - SPARVER4 -#define VISOR_OBJECTVERSION_STR SPARVER1 "," SPARVER2 "," SPARVER3 "," \ - SPARVER4 - -#define COPYRIGHT "Unisys Corporation" -#define COPYRIGHTDATE "2010 - 2013" - -#endif diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c index b84c8d8..6cfd213 100644 --- a/drivers/staging/unisys/visorbus/visorchannel.c +++ b/drivers/staging/unisys/visorbus/visorchannel.c @@ -22,7 +22,6 @@ #include #include -#include "version.h" #include "visorbus.h" #include "controlvmchannel.h" -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/9] staging: unisys: visornic: remove driver version from visornic_main.c
From: Jon Frisch This patch removes the driver version from visornic_main.c Signed-off-by: Jon Frisch Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner --- drivers/staging/unisys/visornic/visornic_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index 7a58d2e..c001225 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -2096,5 +2096,4 @@ module_exit(visornic_cleanup); MODULE_AUTHOR("Unisys"); MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("sPAR nic driver for sparlinux: ver 1.0.0.0"); -MODULE_VERSION("1.0.0.0"); +MODULE_DESCRIPTION("sPAR nic driver for sparlinux"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/9] staging: unisys: make MODULE_DESCRIPTIONs consistent
From: Jon Frisch This patch ensures that consistent verbiage is used in the MODULE_DESCRIPTION text (reported by 'modinfo') for all of the Unisys s-Par drivers. Signed-off-by: Jon Frisch Signed-off-by: David Kershner --- drivers/staging/unisys/visorbus/visorchipset.c | 2 +- drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- drivers/staging/unisys/visorinput/visorinput.c | 2 +- drivers/staging/unisys/visornic/visornic_main.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index fe3a773..e95d04d 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -2263,4 +2263,4 @@ module_exit(exit_unisys); MODULE_AUTHOR("Unisys"); MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Supervisor chipset driver for service partition"); +MODULE_DESCRIPTION("s-Par visorbus driver for virtual device buses"); diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 5ab5c3f..887be22 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -1220,4 +1220,4 @@ module_exit(visorhba_exit); MODULE_AUTHOR("Unisys"); MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("s-Par hba driver"); +MODULE_DESCRIPTION("s-Par HBA driver for virtual SCSI host busses"); diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c index afdf2b5..aa44414 100644 --- a/drivers/staging/unisys/visorinput/visorinput.c +++ b/drivers/staging/unisys/visorinput/visorinput.c @@ -762,7 +762,7 @@ MODULE_DEVICE_TABLE(visorbus, visorinput_channel_types); MODULE_AUTHOR("Unisys"); MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("s-Par human input driver for guest Linux"); +MODULE_DESCRIPTION("s-Par human input driver for virtual keyboard/mouse"); MODULE_ALIAS("visorbus:" SPAR_MOUSE_CHANNEL_PROTOCOL_UUID_STR); MODULE_ALIAS("visorbus:" SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID_STR); diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index c001225..2b3ba49 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -2096,4 +2096,4 @@ module_exit(visornic_cleanup); MODULE_AUTHOR("Unisys"); MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("sPAR nic driver for sparlinux"); +MODULE_DESCRIPTION("s-Par NIC driver for virtual network devices"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: wilc1000: fix symbol 'WILC_DEBUG_LEVEL' was not declared.
- Fixed a sparse warning: symbol 'WILC_DEBUG_LEVEL' was not declared. Signed-off-by: Matias Mucciolo --- drivers/staging/wilc1000/wilc_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c index b052628..802bb1d 100644 --- a/drivers/staging/wilc1000/wilc_debugfs.c +++ b/drivers/staging/wilc1000/wilc_debugfs.c @@ -29,7 +29,7 @@ static struct dentry *wilc_dir; #define ERR BIT(3) #define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR) -atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR); +static atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR); EXPORT_SYMBOL_GPL(WILC_DEBUG_LEVEL); /* -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: wilc1000: fix symbol 'WILC_DEBUG_LEVEL' was not declared.
hi sorry...this is the full warning: drivers/staging/wilc1000/wilc_debugfs.c:32:10: warning: symbol 'WILC_DEBUG_LEVEL' was not declared. Should it be static? -- Matias Mucciolo Area de Infraestructura. Piedras 737 C.A.B.A SUTEBA On Monday 26 September 2016 17:37:33 Greg Kroah-Hartman wrote: > On Mon, Sep 26, 2016 at 12:15:18PM -0300, Matias Mucciolo wrote: > > > > - Fixed a sparse warning: symbol 'WILC_DEBUG_LEVEL' was not declared. > > I don't think that was the full warning, as that does not make much > sense to me, does it to you? > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/9] staging: unisys: visorbus: remove driver version from visorchipset.c
From: Jon Frisch This patch removes the driver version and the version.h include from visorchipset.c Signed-off-by: Jon Frisch Reported-by: Greg Kroah-Hartman Signed-off-by: David Kershner --- drivers/staging/unisys/visorbus/visorchipset.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index 39e8aca..fe3a773 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -25,7 +25,6 @@ #include #include -#include "version.h" #include "visorbus.h" #include "visorbus_private.h" #include "vmcallinterface.h" @@ -2264,6 +2263,4 @@ module_exit(exit_unisys); MODULE_AUTHOR("Unisys"); MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Supervisor chipset driver for service partition: ver " - VERSION); -MODULE_VERSION(VERSION); +MODULE_DESCRIPTION("Supervisor chipset driver for service partition"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: wilc1000: fix symbol 'WILC_DEBUG_LEVEL' was not declared.
On Mon, Sep 26, 2016 at 12:15:18PM -0300, Matias Mucciolo wrote: > > - Fixed a sparse warning: symbol 'WILC_DEBUG_LEVEL' was not declared. I don't think that was the full warning, as that does not make much sense to me, does it to you? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: wilc1000: fix symbol 'WILC_DEBUG_LEVEL' was not declared.
On Mon, Sep 26, 2016 at 12:44:24PM -0300, Matias Mucciolo wrote: > > hi > > sorry...this is the full warning: > > drivers/staging/wilc1000/wilc_debugfs.c:32:10: warning: symbol > 'WILC_DEBUG_LEVEL' was not declared. Should it be static? the "should it be static" is the key here, right? Care to fix this up and resend it? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: wilc1000: fix sparse warning: symbol was not declared. Should it be static?
- Fixed a sparse warning: wilc_debugfs.c:32:10: warning: symbol 'WILC_DEBUG_LEVEL' was not declared. Should it be static? Signed-off-by: Matias Mucciolo --- drivers/staging/wilc1000/wilc_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c index b052628..802bb1d 100644 --- a/drivers/staging/wilc1000/wilc_debugfs.c +++ b/drivers/staging/wilc1000/wilc_debugfs.c @@ -29,7 +29,7 @@ static struct dentry *wilc_dir; #define ERR BIT(3) #define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR) -atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR); +static atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR); EXPORT_SYMBOL_GPL(WILC_DEBUG_LEVEL); /* -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: skein: Remove extra blank lines
On Mon, 2016-09-26 at 11:56 -0300, Martin wrote: > Fix coding style issue "multiple blank lines" > detected by checkpatch.pl in threefish_block.c file. This has been submitted and rejected a couple times already. The extra blank lines are to separate blocks. Whatever the blocks are, perhaps _adding_ a comment line for each block might be better than removing a blank line. > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: slicoss: cleaning up codestyle warnings
This removes checkpatch.pl warnings: WARNING: Block comments should align the * on each line Signed-off-by: Grygorii Maistrenko --- drivers/staging/slicoss/slic.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h index 6d28539..420546d 100644 --- a/drivers/staging/slicoss/slic.h +++ b/drivers/staging/slicoss/slic.h @@ -224,8 +224,8 @@ struct mcast_address { struct slic_iface_stats { /* - * Stats - */ +* Stats +*/ u64xmt_bytes; u64xmt_ucast; u64xmt_mcast; @@ -469,8 +469,8 @@ struct adapter { struct slic_cmdqueue cmdq_all; struct slic_cmdqmem cmdqmem; /* - * SLIC Handles - */ +* SLIC Handles +*/ /* Object handles*/ struct slic_handle slic_handles[SLIC_CMDQ_MAXCMDS + 1]; /* Free object handles*/ -- 2.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: skein: Remove extra blank lines
Ok Joe, Thanks and sorry for the annoyance. On Mon, Sep 26, 2016 at 09:26:12AM -0700, Joe Perches wrote: > On Mon, 2016-09-26 at 11:56 -0300, Martin wrote: > > Fix coding style issue "multiple blank lines" > > detected by checkpatch.pl in threefish_block.c file. > > This has been submitted and rejected a couple times already. > The extra blank lines are to separate blocks. > Whatever the blocks are, perhaps _adding_ a comment line > for each block might be better than removing a blank line. > > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2] staging: ks7010: Fix warnings on printk() usage
This patch fixes the following warnings on ks7010_sdio.c 1. printk() should include KERN_ facility level 2. Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Sabitha George --- drivers/staging/ks7010/ks7010_sdio.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index b27e9b0..28fb5a0 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -496,8 +496,10 @@ static void ks7010_rw_function(struct work_struct *work) DPRINTK(4, "wait after WAKEUP\n"); /* queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,&priv->ks_wlan_hw.rw_wq, (priv->last_wakeup + ((30*HZ)/1000) - jiffies));*/ - printk("wake: %lu %lu\n", priv->last_wakeup + (30 * HZ) / 1000, - jiffies); + dev_info(&priv->ks_wlan_hw.sdio_card->func->dev, +"wake: %lu %lu\n", +priv->last_wakeup + (30 * HZ) / 1000, + jiffies); msleep(30); } @@ -1003,11 +1005,12 @@ static int ks7010_sdio_probe(struct sdio_func *func, /* private memory allocate */ netdev = alloc_etherdev(sizeof(*priv)); if (!netdev) { - printk(KERN_ERR "ks7010 : Unable to alloc new net device\n"); + dev_err(&card->func->dev, "ks7010 : Unable to alloc new net device\n"); goto error_release_irq; } if (dev_alloc_name(netdev, "wlan%d") < 0) { - printk(KERN_ERR "ks7010 : Couldn't get name!\n"); + dev_err(&card->func->dev, + "ks7010 : Couldn't get name!\n"); goto error_free_netdev; } @@ -1047,9 +1050,9 @@ static int ks7010_sdio_probe(struct sdio_func *func, /* Upload firmware */ ret = ks7010_upload_firmware(priv, card); /* firmware load */ if (ret) { - printk(KERN_ERR - "ks7010: firmware load failed !! retern code = %d\n", - ret); + dev_err(&card->func->dev, + "ks7010: firmware load failed !! return code = %d\n", +ret); goto error_free_read_buf; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: dgnc: Align the * on a block comment
This patch corrects a misalligned * in a block comment warning found by checkpatch.pl Signed-off-by: Ramiro Oliveira --- drivers/staging/dgnc/dgnc_cls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c index 4e1e0dc6..aedca66 100644 --- a/drivers/staging/dgnc/dgnc_cls.c +++ b/drivers/staging/dgnc/dgnc_cls.c @@ -345,7 +345,7 @@ static void cls_copy_data_from_uart_to_queue(struct channel_t *ch) /* * Discard character if we are ignoring the error mask. - */ +*/ if (linestatus & error_mask) { linestatus = 0; readb(&ch->ch_cls_uart->txrx); -- 2.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6656: Add spaces around '+' operator
Fix coding style issue "spaces preferred around '+' detected by checkpatch.pl in dpc.c file. Signed-off-by: Martin Alonso --- drivers/staging/vt6656/dpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index 6019aac..900cd5c 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -75,8 +75,8 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb, skb_data = (u8 *)skb->data; - rx_sts = skb_data+4; - rx_rate = skb_data+5; + rx_sts = skb_data + 4; + rx_rate = skb_data + 5; /* real Frame Size = USBframe_size -4WbkStatus - 4RxStatus */ /* -8TSF - 4RSR - 4SQ3 - ?Padding */ -- 2.8.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2] staging: rtl8172: usb_intf.c: Fixed block comment coding style
On 09/26/2016 06:20 AM, Gonçalo Salazar wrote: 2016-09-26 1:53 GMT+01:00 Larry Finger : On 09/25/2016 06:00 PM, Gonçalo Salazar wrote: Fixed a block comment indentation in the rtl8712 usb_intf.c file. Made this as a first commit. Resubmitted with updated subject. Please let me know of any feedback you have. I missed this last time, but everything above the --- line goes into the permanent record. Are you sure you want all this to be there? Any chatty remarks and any description of what changed in subsequent submissions should be below the ---. The maintainer will see them, but they are stripped before they get merged into the repo. Larry Made a mistake that should not be in the permanent record... Should I resubmit the patch? or are you able to strip it from the submission? I am not the one that applies the patches; however, it would be unreasonable to expect the maintainer to edit any patch. You need to submit V3. Larry ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [lustre-devel] [PATCH] staging/lustre/lov: add missing header dependencies
> We get 1 warning when building kernel with W=1: > drivers/staging/lustre/lustre/lov/lov_object.c:956:23: warning: no previous > prototype for 'lov_lsm_get' [-Wmissing-prototypes] > drivers/staging/lustre/lustre/lov/lov_object.c:972:6: warning: no previous > prototype for 'lov_lsm_put' [-Wmissing-prototypes] > drivers/staging/lustre/lustre/lov/lov_object.c:979:5: warning: no previous > prototype for 'lov_read_and_clear_async_rc' [-Wmissing-prototypes] > > In fact, these functions are declared in ../llite/vvp_internal.h, > so this patch add missing header dependencies. > > Signed-off-by: Baoyou Xie Nak. I have a patch coming soon from our server code branch that removes lov_lsm_get() and makes lov_lsm_put used only in the lov layer. The patch is ready but I need to test it first. > --- > drivers/staging/lustre/lustre/lov/lov_object.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c > b/drivers/staging/lustre/lustre/lov/lov_object.c > index f9621b0..912c416 100644 > --- a/drivers/staging/lustre/lustre/lov/lov_object.c > +++ b/drivers/staging/lustre/lustre/lov/lov_object.c > @@ -38,6 +38,7 @@ > #define DEBUG_SUBSYSTEM S_LOV > > #include "lov_cl_internal.h" > +#include "../llite/vvp_internal.h" > > /** \addtogroup lov > * @{ > -- > 2.7.4 > > ___ > lustre-devel mailing list > lustre-de...@lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [lustre-devel] [PATCH] staging/lustre/obdclass: add missing header dependencies
> We get 1 warning when building kernel with W=1: > drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:157:5: warning: > no previous prototype for 'obd_sysctl_init' [-Wmissing-prototypes] > > In fact, this function is declared in ../../include/obd_class.h, > so this patch add missing header dependencies. > > Signed-off-by: Baoyou Xie Reviewed-by: James Simmons > --- > drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c > b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c > index 8f70dd2..2daa834 100644 > --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c > +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c > @@ -45,6 +45,7 @@ > > #include "../../include/obd_support.h" > #include "../../include/lprocfs_status.h" > +#include "../../include/obd_class.h" > > struct static_lustre_uintvalue_attr { > struct { > -- > 2.7.4 > > ___ > lustre-devel mailing list > lustre-de...@lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: vt6656: Add spaces around '+' operator
On Mon, 2016-09-26 at 14:48 -0300, Martin Alonso wrote: > Fix coding style issue "spaces preferred around '+' > detected by checkpatch.pl in dpc.c file. [] > diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c [] > @@ -75,8 +75,8 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb > *ptr_rcb, > > > skb_data = (u8 *)skb->data; > > - rx_sts = skb_data+4; > - rx_rate = skb_data+5; > + rx_sts = skb_data + 4; > + rx_rate = skb_data + 5; > > /* real Frame Size = USBframe_size -4WbkStatus - 4RxStatus */ > /* -8TSF - 4RSR - 4SQ3 - ?Padding */ You might as well make rx_rate u8 instead of u8 * and change the uses of rx_rate. rx_sts isn't used anywhere at all and could be removed. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V3] staging: rtl8172: usb_intf.c: Fixed block comment coding style
Fixed a block comment indentation in the rtl8712 usb_intf.c file. Signed-off-by: Gonçalo Salazar --- Made this as a first commit. Resubmitted with updated subject. Removed text from the permanent record. Please let me know of any feedback you have. Thanks, Gonçalo Salazar drivers/staging/rtl8712/usb_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index 3fc65b2..897d462 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -369,7 +369,7 @@ static const struct device_type wlan_type = { * * notes: drv_init() is called when the bus driver has located a card for us * to support. We accept the new device by returning 0. -*/ + */ static int r871xu_drv_init(struct usb_interface *pusb_intf, const struct usb_device_id *pdid) { -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8192e: fixed statements should start on a tabstop
checkpatch.pl repairs: corrected: statements should start on a tabstop corrected: block comments use * on subsequent lines corrected: use a blank line after function/struct/union/enum declarations Signed-off-by: Darryl T. Agostinelli save --- drivers/staging/rtl8192e/rtllib_tx.c | 75 +++- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c index 58fc70e..78a3ad5 100644 --- a/drivers/staging/rtl8192e/rtllib_tx.c +++ b/drivers/staging/rtl8192e/rtllib_tx.c @@ -1,31 +1,31 @@ /** - - Copyright(c) 2003 - 2004 Intel Corporation. All rights reserved. - - This program is free software; you can redistribute it and/or modify it - under the terms of version 2 of the GNU General Public License as - published by the Free Software Foundation. - - 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. - - The full GNU General Public License is included in this distribution in the - file called LICENSE. - - Contact Information: - James P. Ketrenos - Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 - -** - - Few modifications for Realtek's Wi-Fi drivers by - Andrea Merello - - A special thanks goes to Realtek for their support ! - -**/ + * + * Copyright(c) 2003 - 2004 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * 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. + * + * The full GNU General Public License is included in this distribution in the + * file called LICENSE. + * + * Contact Information: + * James P. Ketrenos + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * + * + * Few modifications for Realtek's Wi-Fi drivers by + * Andrea Merello + * + * A special thanks goes to Realtek for their support ! + * + */ #include #include @@ -731,17 +731,19 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) if (qos_actived) { hdr_len = RTLLIB_3ADDR_LEN + 2; - /* in case we are a client verify acm is not set for this ac */ - while (unlikely(ieee->wmm_acm & (0x01 << skb->priority))) { - netdev_info(ieee->dev, "skb->priority = %x\n", - skb->priority); - if (wme_downgrade_ac(skb)) - break; - netdev_info(ieee->dev, "converted skb->priority = %x\n", - skb->priority); -} + /* in case we are a client verify acm is not set for this ac */ + while (unlikely(ieee->wmm_acm & (0x01 << skb->priority))) { + netdev_info(ieee->dev, "skb->priority = %x\n", + skb->priority); + if (wme_downgrade_ac(skb)) + break; + netdev_info(ieee->dev, "converted skb->priority = %x\n", + skb->priority); + } + qos_ctl |= skb->priority; header.qos_ctl = cpu_to_le16(qos_ctl & RTLLIB_QOS_TID); + } else { hdr_len = RTLLIB_3ADDR_LEN; } @@ -981,6 +983,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) return 1; } + int rtllib_xmit(struct sk_buff *skb, struct net_device *dev) { memset(skb->cb, 0, sizeof(skb->cb)); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 4/5] staging: iio: isl29018: change isl29018_read_raw() to only have one exit point
When the chip is in a suspended state, isl29018_read_raw() will return -EBUSY. Change the function so that it only has a single exit point. Signed-off-by: Brian Masney --- drivers/staging/iio/light/isl29018.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index 990c6e5..3a4d79d 100644 --- a/drivers/staging/iio/light/isl29018.c +++ b/drivers/staging/iio/light/isl29018.c @@ -390,8 +390,8 @@ static int isl29018_read_raw(struct iio_dev *indio_dev, mutex_lock(&chip->lock); if (chip->suspended) { - mutex_unlock(&chip->lock); - return -EBUSY; + ret = -EBUSY; + goto read_done; } switch (mask) { case IIO_CHAN_INFO_RAW: @@ -438,6 +438,8 @@ static int isl29018_read_raw(struct iio_dev *indio_dev, default: break; } + +read_done: mutex_unlock(&chip->lock); return ret; } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 1/5] include: linux: iio: add IIO_ATTR_{RO, WO, RW} and IIO_DEVICE_ATTR_{RO, WO, RW} macros
Add new macros: IIO_ATTR_RO, IIO_ATTR_WO, IIO_ATTR_RW, IIO_DEVICE_ATTR_RO, IIO_DEVICE_ATTR_WO and IIO_DEVICE_ATTR_RW to reduce the amount of boiler plate code that is needed for creating new attributes. This mimics the *_RO, *_WO, and *_RW macros that are found in include/linux/device.h and include/linux/sysfs.h. Signed-off-by: Brian Masney --- This is the same version of this patch that I sent out on Sunday. I am resending the patch set since my the second patch in that series would not apply cleanly to iio.git/testing. include/linux/iio/sysfs.h | 24 1 file changed, 24 insertions(+) diff --git a/include/linux/iio/sysfs.h b/include/linux/iio/sysfs.h index 9cd8f74..ce9426c 100644 --- a/include/linux/iio/sysfs.h +++ b/include/linux/iio/sysfs.h @@ -55,10 +55,34 @@ struct iio_const_attr { { .dev_attr = __ATTR(_name, _mode, _show, _store), \ .address = _addr } +#define IIO_ATTR_RO(_name, _addr) \ + { .dev_attr = __ATTR_RO(_name), \ + .address = _addr } + +#define IIO_ATTR_WO(_name, _addr) \ + { .dev_attr = __ATTR_WO(_name), \ + .address = _addr } + +#define IIO_ATTR_RW(_name, _addr) \ + { .dev_attr = __ATTR_RW(_name), \ + .address = _addr } + #define IIO_DEVICE_ATTR(_name, _mode, _show, _store, _addr)\ struct iio_dev_attr iio_dev_attr_##_name\ = IIO_ATTR(_name, _mode, _show, _store, _addr) +#define IIO_DEVICE_ATTR_RO(_name, _addr) \ + struct iio_dev_attr iio_dev_attr_##_name\ + = IIO_ATTR_RO(_name, _addr) + +#define IIO_DEVICE_ATTR_WO(_name, _addr) \ + struct iio_dev_attr iio_dev_attr_##_name\ + = IIO_ATTR_WO(_name, _addr) + +#define IIO_DEVICE_ATTR_RW(_name, _addr) \ + struct iio_dev_attr iio_dev_attr_##_name\ + = IIO_ATTR_RW(_name, _addr) + #define IIO_DEVICE_ATTR_NAMED(_vname, _name, _mode, _show, _store, _addr) \ struct iio_dev_attr iio_dev_attr_##_vname \ = IIO_ATTR(_name, _mode, _show, _store, _addr) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 5/5] staging: iio: isl29018: check if the chip is in a suspended state
Add a check to isl29018_write_raw() to ensure that the chip is not in a suspended state. This makes the code consistent with what is present in isl29018_read_raw(). Signed-off-by: Brian Masney --- drivers/staging/iio/light/isl29018.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index 3a4d79d..51226bd 100644 --- a/drivers/staging/iio/light/isl29018.c +++ b/drivers/staging/iio/light/isl29018.c @@ -355,6 +355,10 @@ static int isl29018_write_raw(struct iio_dev *indio_dev, int ret = -EINVAL; mutex_lock(&chip->lock); + if (chip->suspended) { + ret = -EBUSY; + goto write_done; + } switch (mask) { case IIO_CHAN_INFO_CALIBSCALE: if (chan->type == IIO_LIGHT) { @@ -374,8 +378,9 @@ static int isl29018_write_raw(struct iio_dev *indio_dev, default: break; } - mutex_unlock(&chip->lock); +write_done: + mutex_unlock(&chip->lock); return ret; } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 2/5] staging: iio: isl29018: use IIO_DEVICE_ATTR_{RO, RW} macros
Use the IIO_DEVICE_ATTR_RO and IIO_DEVICE_ATTR_RW macros to create the device attributes. Signed-off-by: Brian Masney --- This version of the patch now applies cleanly to the iio.git/testing branch. drivers/staging/iio/light/isl29018.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index 30dc1da..19f282c 100644 --- a/drivers/staging/iio/light/isl29018.c +++ b/drivers/staging/iio/light/isl29018.c @@ -268,8 +268,9 @@ static int isl29018_read_proximity_ir(struct isl29018_chip *chip, int scheme, return 0; } -static ssize_t isl29018_show_scale_available(struct device *dev, - struct device_attribute *attr, char *buf) +static ssize_t in_illuminance_scale_available_show + (struct device *dev, struct device_attribute *attr, +char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct isl29018_chip *chip = iio_priv(indio_dev); @@ -286,8 +287,9 @@ static ssize_t isl29018_show_scale_available(struct device *dev, return len; } -static ssize_t isl29018_show_int_time_available(struct device *dev, - struct device_attribute *attr, char *buf) +static ssize_t in_illuminance_integration_time_available_show + (struct device *dev, struct device_attribute *attr, +char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct isl29018_chip *chip = iio_priv(indio_dev); @@ -303,9 +305,9 @@ static ssize_t isl29018_show_int_time_available(struct device *dev, return len; } -static ssize_t isl29018_show_prox_infrared_suppression(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t proximity_on_chip_ambient_infrared_suppression_show + (struct device *dev, struct device_attribute *attr, +char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct isl29018_chip *chip = iio_priv(indio_dev); @@ -317,9 +319,9 @@ static ssize_t isl29018_show_prox_infrared_suppression(struct device *dev, return sprintf(buf, "%d\n", chip->prox_scheme); } -static ssize_t isl29018_store_prox_infrared_suppression(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) +static ssize_t proximity_on_chip_ambient_infrared_suppression_store + (struct device *dev, struct device_attribute *attr, +const char *buf, size_t count) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct isl29018_chip *chip = iio_priv(indio_dev); @@ -471,14 +473,9 @@ static const struct iio_chan_spec isl29023_channels[] = { ISL29018_IR_CHANNEL, }; -static IIO_DEVICE_ATTR(in_illuminance_integration_time_available, S_IRUGO, - isl29018_show_int_time_available, NULL, 0); -static IIO_DEVICE_ATTR(in_illuminance_scale_available, S_IRUGO, - isl29018_show_scale_available, NULL, 0); -static IIO_DEVICE_ATTR(proximity_on_chip_ambient_infrared_suppression, - S_IRUGO | S_IWUSR, - isl29018_show_prox_infrared_suppression, - isl29018_store_prox_infrared_suppression, 0); +static IIO_DEVICE_ATTR_RO(in_illuminance_integration_time_available, 0); +static IIO_DEVICE_ATTR_RO(in_illuminance_scale_available, 0); +static IIO_DEVICE_ATTR_RW(proximity_on_chip_ambient_infrared_suppression, 0); #define ISL29018_DEV_ATTR(name) (&iio_dev_attr_##name.dev_attr.attr) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 3/5] staging: iio: isl29018: fixed race condition in in_illuminance_scale_available_show()
in_illuminance_scale_available_show() references the isl29018_chip->int_time variable in three places inside a for loop. The value of the int_time variable can be updated by the isl29018_set_integration_time() function, which is called by the isl29018_write_raw() function. isl29018_write_raw() locks a mutex specific to this driver when the integration time variable is updated. Signed-off-by: Brian Masney --- drivers/staging/iio/light/isl29018.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index 19f282c..990c6e5 100644 --- a/drivers/staging/iio/light/isl29018.c +++ b/drivers/staging/iio/light/isl29018.c @@ -277,10 +277,12 @@ static ssize_t in_illuminance_scale_available_show unsigned int i; int len = 0; + mutex_lock(&chip->lock); for (i = 0; i < ARRAY_SIZE(isl29018_scales[chip->int_time]); ++i) len += sprintf(buf + len, "%d.%06d ", isl29018_scales[chip->int_time][i].scale, isl29018_scales[chip->int_time][i].uscale); + mutex_unlock(&chip->lock); buf[len - 1] = '\n'; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8192e: fixed statements should start on a tabstop
checkpatch.pl repairs: corrected: statements should start on a tabstop corrected: block comments use * on subsequent lines corrected: use a blank line after function/struct/union/enum declarations Signed-off-by: Darryl T. Agostinelli --- drivers/staging/rtl8192e/rtllib_tx.c | 75 +++- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c index 58fc70e..78a3ad5 100644 --- a/drivers/staging/rtl8192e/rtllib_tx.c +++ b/drivers/staging/rtl8192e/rtllib_tx.c @@ -1,31 +1,31 @@ /** - - Copyright(c) 2003 - 2004 Intel Corporation. All rights reserved. - - This program is free software; you can redistribute it and/or modify it - under the terms of version 2 of the GNU General Public License as - published by the Free Software Foundation. - - 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. - - The full GNU General Public License is included in this distribution in the - file called LICENSE. - - Contact Information: - James P. Ketrenos - Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 - -** - - Few modifications for Realtek's Wi-Fi drivers by - Andrea Merello - - A special thanks goes to Realtek for their support ! - -**/ + * + * Copyright(c) 2003 - 2004 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * 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. + * + * The full GNU General Public License is included in this distribution in the + * file called LICENSE. + * + * Contact Information: + * James P. Ketrenos + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * + * + * Few modifications for Realtek's Wi-Fi drivers by + * Andrea Merello + * + * A special thanks goes to Realtek for their support ! + * + */ #include #include @@ -731,17 +731,19 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) if (qos_actived) { hdr_len = RTLLIB_3ADDR_LEN + 2; - /* in case we are a client verify acm is not set for this ac */ - while (unlikely(ieee->wmm_acm & (0x01 << skb->priority))) { - netdev_info(ieee->dev, "skb->priority = %x\n", - skb->priority); - if (wme_downgrade_ac(skb)) - break; - netdev_info(ieee->dev, "converted skb->priority = %x\n", - skb->priority); -} + /* in case we are a client verify acm is not set for this ac */ + while (unlikely(ieee->wmm_acm & (0x01 << skb->priority))) { + netdev_info(ieee->dev, "skb->priority = %x\n", + skb->priority); + if (wme_downgrade_ac(skb)) + break; + netdev_info(ieee->dev, "converted skb->priority = %x\n", + skb->priority); + } + qos_ctl |= skb->priority; header.qos_ctl = cpu_to_le16(qos_ctl & RTLLIB_QOS_TID); + } else { hdr_len = RTLLIB_3ADDR_LEN; } @@ -981,6 +983,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) return 1; } + int rtllib_xmit(struct sk_buff *skb, struct net_device *dev) { memset(skb->cb, 0, sizeof(skb->cb)); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/7] selftest: sync: basic tests for sw_sync framework
Emilio López writes: > El 22/09/16 a las 06:43, Michael Ellerman escribió: >> Emilio López writes: >> >> Please don't include the *kernel* headers, they're really not meant to >> be used in userspace programs :) >> >>> +CFLAGS += -I../../../../usr/include/ >> >> That is the correct place to get them from. They'll have been put there >> by 'make headers_install'. > > My inspiration here has been tools/testing/selftests/memfd/Makefile, > which does it this way. If I only include the ones on usr then it > doesn't build, as there's no sync_file.h available, even after running > make headers_install. How am I supposed to use the ioctls from there? It looks like it's missing from include/uapi/linux/Kbuild, you need to add it to the list of exported headers: diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index dd604395606b..40411b4ff012 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -397,6 +397,7 @@ header-y += stddef.h header-y += string.h header-y += suspend_ioctls.h header-y += swab.h +header-y += sync_file.h header-y += synclink.h header-y += sysctl.h header-y += sysinfo.h cheers ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ks7010: Use __packed over __attribute__((packed))
This replaces uses of __attribute__((packed)) with __packed, which is recommended to be used over the direct __attribute__. This patch then includes as necessary to use __packed. Signed-off-by: Matthew Kilgore --- drivers/staging/ks7010/eap_packet.h | 10 ++-- drivers/staging/ks7010/ks_hostif.h | 99 +++-- drivers/staging/ks7010/ks_wlan.h| 4 +- 3 files changed, 59 insertions(+), 54 deletions(-) diff --git a/drivers/staging/ks7010/eap_packet.h b/drivers/staging/ks7010/eap_packet.h index 16a392a..373c0fe 100644 --- a/drivers/staging/ks7010/eap_packet.h +++ b/drivers/staging/ks7010/eap_packet.h @@ -1,6 +1,8 @@ #ifndef EAP_PACKET_H #define EAP_PACKET_H +#include + #define WBIT(n) (1 << (n)) #ifndef ETH_ALEN @@ -19,14 +21,14 @@ struct ether_hdr { #define ETHER_PROTOCOL_TYPE_IP 0x0800 #define ETHER_PROTOCOL_TYPE_ARP 0x0806 /* followed by length octets of data */ -} __attribute__ ((packed)); +} __packed; struct ieee802_1x_hdr { unsigned char version; unsigned char type; unsigned short length; /* followed by length octets of data */ -} __attribute__ ((packed)); +} __packed; #define EAPOL_VERSION 2 @@ -69,7 +71,7 @@ struct ieee802_1x_eapol_key { * represents the number of least significant octets from * MS-MPPE-Send-Key attribute to be used as the keying material; * RC4 key used in encryption = Key-IV + MS-MPPE-Recv-Key */ -} __attribute__ ((packed)); +} __packed; #define WPA_NONCE_LEN 32 #define WPA_REPLAY_COUNTER_LEN 8 @@ -86,7 +88,7 @@ struct wpa_eapol_key { unsigned char key_mic[16]; unsigned short key_data_length; /* followed by key_data_length bytes of key_data */ -} __attribute__ ((packed)); +} __packed; #define WPA_KEY_INFO_TYPE_MASK (WBIT(0) | WBIT(1) | WBIT(2)) #define WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 WBIT(0) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index dc806b5b..f35c0c51 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -11,6 +11,9 @@ #ifndef _KS_HOSTIF_H_ #define _KS_HOSTIF_H_ + +#include + /* * HOST-MAC I/F events */ @@ -61,7 +64,7 @@ struct hostif_hdr { uint16_t size; uint16_t event; -} __attribute__ ((packed)); +} __packed; struct hostif_data_request_t { struct hostif_hdr header; @@ -70,7 +73,7 @@ struct hostif_data_request_t { #define TYPE_AUTH 0x0001 uint16_t reserved; uint8_t data[0]; -} __attribute__ ((packed)); +} __packed; struct hostif_data_indication_t { struct hostif_hdr header; @@ -81,14 +84,14 @@ struct hostif_data_indication_t { #define TYPE_GMK2 0x0003 uint16_t reserved; uint8_t data[0]; -} __attribute__ ((packed)); +} __packed; #define CHANNEL_LIST_MAX_SIZE 14 struct channel_list_t { uint8_t size; uint8_t body[CHANNEL_LIST_MAX_SIZE]; uint8_t pad; -} __attribute__ ((packed)); +} __packed; /* MIB Attribute */ #define DOT11_MAC_ADDRESS 0x21010100/* MAC Address (R) */ @@ -141,7 +144,7 @@ struct channel_list_t { struct hostif_mib_get_request_t { struct hostif_hdr header; uint32_t mib_attribute; -} __attribute__ ((packed)); +} __packed; struct hostif_mib_value_t { uint16_t size; @@ -152,7 +155,7 @@ struct hostif_mib_value_t { #define MIB_VALUE_TYPE_COUNT32 3 #define MIB_VALUE_TYPE_OSTRING 4 uint8_t body[0]; -} __attribute__ ((packed)); +} __packed; struct hostif_mib_get_confirm_t { struct hostif_hdr header; @@ -163,19 +166,19 @@ struct hostif_mib_get_confirm_t { #define MIB_WRITE_ONLY 3 uint32_t mib_attribute; struct hostif_mib_value_t mib_value; -} __attribute__ ((packed)); +} __packed; struct hostif_mib_set_request_t { struct hostif_hdr header; uint32_t mib_attribute; struct hostif_mib_value_t mib_value; -} __attribute__ ((packed)); +} __packed; struct hostif_mib_set_confirm_t { struct hostif_hdr header; uint32_t mib_status; uint32_t mib_attribute; -} __attribute__ ((packed)); +} __packed; struct hostif_power_mngmt_request_t { struct hostif_hdr header; @@ -188,7 +191,7 @@ struct hostif_power_mngmt_request_t { uint32_t receiveDTIMs; #define DTIM_FALSE 0 #define DTIM_TRUE 1 -} __attribute__ ((packed)); +} __packed; /* power management mode */ enum { @@ -206,7 +209,7 @@ enum { struct hostif_power_mngmt_confirm_t { struct hostif_hdr header; uint16_t result_code; -} __attribute__ ((packed)); +} __packed; struct hostif_start_request_t { struct hostif_hdr header; @@ -215,64 +218,64 @@ struct hostif_start_request_t { #define MODE_INFRASTRUCTURE 1 #define MODE_AP 2 /* not used */ #define MODE_ADHOC 3 -} __attribute__ ((packed)); +} __packed; struct hostif_start_confirm_t { struct hostif_hdr header; uint16_t result_code; -} __attribute__ ((packed)); +} __