Commit graph

663627 commits

Author SHA1 Message Date
Pushkar Jambhlekar 049b611fc8 drivers/staging/wilc1000: Using __func__ instead of hardcoded function name
dev_err: replacing hardcoded function name with '%s' and __func__

Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:37:14 +02:00
Tobin C. Harding a4b513f0af staging: dgnc: remove error message task
TODO file lists task to remove unnecessary error messages. There are
no unnecessary error messages in the driver, this must have been done
already.

Remove task from TODO file.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:37:10 +02:00
Tobin C. Harding a21f95e5cf staging: dgnc: remove dead code
Driver contains dead code, guarded with #ifdef's. We can safely remove
this, it will be in the git history if it is later needed.

Remove dead code.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:37:10 +02:00
Tobin C. Harding 0053fe0eba staging: dgnc: remove struct member magic numbers
Driver uses magic number members within structs, this is an antiquated
method of catching data errors. We don't do things that way any more.

Remove magic number struct members. Remove all checks to magic
numbers.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:37:10 +02:00
Tobin C. Harding 510616521f staging: dgnc: remove unnecessary comments
TODO file lists task to remove unnecessary comments.

Make initial attempt at removing unnecessary comments. Choose not to
be to vicious in removal. We can remove more once the driver is
cleaned up/tested some more.

For functions with internal linkage, reduce the function comment where
possible. For functions with external linkage, migrate the function
comment to kernel doc format.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:37:10 +02:00
Tobin C. Harding 2539fc0c7c staging: dgnc: remove double underscore
Pre-processor header guards use double underscore, typically kernel
code uses single underscore when defining header guards. 'endif'
statement should include what is ending as a comment string.

Remove double underscore, add comment string to 'endif'

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:37:10 +02:00
Tobin C. Harding e14047e4e3 staging: dgnc: clean up header comments
TODO file has task: remove unnecessary comments. Driver uses some
custom comment format. Driver would be better if it used kernel doc
format.

Audit header file comments. Replace struct comments with kernel doc
format comments. Remove unnecessary comments.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:37:10 +02:00
David Kershner bd801a0729 staging: unisys: visorbus: Have unisys_vmcall return Linux error instead of VMCALL error
The function unisys_vmcall was returning VMCALL specific errors and the
calling code was ignoring which error was actually returned. Instead we
should be mapping the VMCALL error into a proper Linux error and then
returning that, since we now have an error we know what to do with, we
don't have to drop it but we can send it up the stack.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:04 +02:00
David Kershner 88845f407c staging: unisys: visorbus: move unisys_vmcall into visorchipset
The only one using unisys_vmcall was visorchipset.c, it can be moved into
the visorchipset file directly instead of being in a header file.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:04 +02:00
David Kershner fd1040997b staging: unisys: visorbus: Update vmcallinterface comment
The comment at the beginning of the vmcallinterface.h file references IO
Virtualization. It should be more specific that it is referencing s-Par
Virtualization.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:04 +02:00
David Kershner 40b3e1ac05 staging: unisys: visorbus: get rid of ISSUE_IO_VMCALL
The macro ISSUE_IO_VMCALL was a wrapper around the function unisys_vmcall.
It doesn't need to exist and was just being noisy, so get rid of it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner c9808ff186 staging: unisys: visorbus: remove useless ifdef
We shouldn't be checking if VMCALL_CONTROLVM_ADDR is defined, remove it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 51646f4d4b staging: unisys: visorbus: consolidate if statements
We had several if statements inside of if statements that should be
consolidated into an if statement with an && to clean up the code some
more.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 493d1597dd staging: unisys: visorbus: get rid of braces around single statements
Remove braces around single line if statements, they are not needed.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner b4a8e6ae17 staging: unisys: visorbus: add error handling to chipset_device_pause/resume
If there is an error in chipset_device_pause/resume don't try to respond,
error out and let the calling functions respond to this error just like
any other error they encounter.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 15d9ce9d37 staging: unisys: visorbus: add error handling to initiate_chipset_device_pause_resume
Clean up the function to remove some if statments that should be done
in the calling function.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 293deb2c0c staging: unisys: visorbus: don't unregister if we failed to register
If we fail to register the visordriver, don't call unregister, just
return with the error.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 711c67f4ec staging: unisys: visorbus: don't ignore visorchannel_read error
Don't override the visorchannel_read_error, just return the
error that it generates.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner e0d210ae5f staging: unisys: visorbus: check for err from dev_set_name
The function dev_set_name can return an error, don't just ignore it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner f894c88a24 staging: unisys: visorbus: cleanup error handling in visorbus_uevent
The add_uevent_var returns an error. Don't overwrite the error with
-ENOMEM, just pass the error code back up.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 15928a5569 staging: unisys: visorbus: get rid of unused parameter forcenomatch
The forcenomatch parameter was not being used, so get rid of it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 377ab0017d staging: unisys: visorbus: get rid of unused parameter forcematch
The forcematch parameter was not being used, so get rid of it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 5b6f9b95f7 staging: unisys: visorbus: get rid of create_bus_type.
Create bus_type was just calling register_bustype. Since we control how
many times we call create_bus_type it was extraneous keeping a counter if
the bus was already registered, so the functions were no longer needed.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 362f87f312 staging: unisys: visorbus: fix error handling in create_bus_instance
The function get_vbus_header_info returns errors that were being handled
incorrectly. Fix the error handling in create_bus_instance.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 5dca9b2944 staging: unisys: visorbus: add error handling visorbus_enable_channel_interrupt
Add error handling to visorbus_enable_channel_interrupt.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner b90194d9bb staging: unisys: visorbus: add error handling for dev_start_periodic_work
Report errors if we have a problem in dev_start_periodic_work.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 3659955a64 staging: unisys: remove client from spar_check_channel
We only have one version of spar_check_channel, get rid of the client
at the end and help save space.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 3a6b850670 staging: unisys: visorbus: get rid of shouting SPAR_VBUS_CHANNEL_CLIENT_OK macro
The macro SPAR_VBUS_CHANNEL_CLIENT_OK was noisy and only used in one place
so get rid of it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 738561a803 staging: unisys: visorbus: move vbuschannel_print_devinfo from .h to .c file
Move vbuschannel_print_devinfo from vbuchannel.h to visorbus_main.c since
it is only referenced in visorbus_main.c. Since it is in a .c file, get
rid of the inline for it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 4fb2539c8c staging: unisys: visorbus: consolidate bus_responder and device_responder
With all the code churn, bus_responder and device_responder have become
identical, consolidate them to the same function.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 3f49a21dec staging: unisys: visorbus: add error handling for chipset_device_create
Adds error handling to the chipset_device_create message. If it returns
a failure, it is assumed it has not signaled the s-Par firmware of the
failure and the caller must do that.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:03 +02:00
David Kershner 0315657116 staging: unisys: visornic: add error handling for visorchannel_signalinsert/remove
Since signalinsert/remove now return valid error codes, we need to check
them when we call them in visornic. The error codes need to propagate out
to the calling functions.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
Sameer Wadgaonkar 2833399edb staging: unisys: visorbus: add __packed to structures in controlvmchannel.h
Added the __packed keyword to all structures in controlvmchannel.h
to ensure alignment and size in memory.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner 621f5e1852 staging: unisys: visorbus: add error handling to chipset_bus_create
The function chipset_bus_create should return an error. If an error
is returned, it is assumed the response has not been sent by bus_create.

Correctly handle when the error has been returned in visorchipset.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner e030d39d58 staging: unisys: visorbus: remaining_steps convert ret to err
The ret variable was only returning an error, so changing it to err to
be more consistent across the file.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner 08a55d2d26 staging: unisys: visorbus: textid_store convert ret to err
The ret variable was only returning an error, so changing it to err to
be more consistent across the file.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner ea295857fc staging: unisys: visorbus: error_store convert ret to err
The ret variable was only returning an error, so changing it to err to
be more consistent across the file.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner b309266ed4 staging: unisys: visorbus: boottotool convert ret to err
The ret variable was only returning an error, so changing it to err to
be more consistent across the file.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner dc35cdf318 staging: unisys: visorbus: convert ret to err to be consistent
The ret variable was only returning an error, so changing it to err to
be more consistent across the file.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner d337822efb staging: unisys: visorbus: remove invalid comment, we are one driver.
Removed a comment that was describing the relationship between the
visorchipset driver and the visorbus driver. Since they are now one
driver the comment no longer makes sense.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner b5577d79e2 staging: unisys: visorbus: move bus_device_info_init to visorbus_main.c
The function bus_device_info_init was defined in visorbus_private.h. The
only file that uses it is visorbus_main.c so move the function into the .c
file instead.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner c53578bd6c staging: unisys: visorbus: add error handling to remaining_steps_show
Don't just drop the error from visorchannel_read on the floor, report it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner 0d40643672 staging: unisys: visorbus: add error handling textid_show
Don't just drop the error from visorchannel_read on the floor, report it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner d9857c794e staging: unisys: visorbus: add error handling to error_show
Don't just drop the error from visorchannel_read on the floor, report it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner 0b01c6ce5a staging: unisys: visorbus: add error handling to boottotool_show
Don't just drop the error from visorchannel_read on the floor, report it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner 002a5abb23 staging: unisys: visorbus: add error handling to toolaction_show
Don't just drop the error from visorchannel_read on the floor, report it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner deeeca6db2 staging: unisys: visorbus: add error handling around kobject_uevent
The function kobject_uevent_env can return an error, pass that error
to the caller so it can be handled correctly.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner ae0fa822d7 staging: unisys: visorbus: add error handling for parahotplug_request_kickoff
The function kobject_uevent_env returns an error we shouldn't just drop it
on the floor but we should report it back to the caller. Since it now
returns an error, need to add proper error handling to
parahotplug_process_message.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner fbc1023afb staging: unisys: visorbus: add error handling to controlvm_periodic_work
The function controlvm_periodic_work should handle errors appropriately.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00
David Kershner 25a5128e8c staging: unisys: visorbus: add error handling to handle_command
Add error handling to the function handle_command.

Since handle_command now returns errors, we need to process them correctly
in process_controlvm_event.

Note: It is invalid to have a controlvm test message in the event queue, so
return -EINVAL if one is discovered.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29 09:17:02 +02:00