platform/kernel/linux-starfive.git
10 years agostaging: unisys: refactor DEVICE_MAP
Benjamin Romer [Thu, 23 Oct 2014 18:30:32 +0000 (14:30 -0400)]
staging: unisys: refactor DEVICE_MAP

Get rid of the typedef for DEVICE_MAP and use struct device_map instead.
Fix CamelCase names.

DeviceChannelSize => device_channel_size
CA_Index => ca_index
Reserved => reserved
Reserved2 => reserved2

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove typedef from CONTROLVM_MESSAGE
Benjamin Romer [Thu, 23 Oct 2014 18:30:31 +0000 (14:30 -0400)]
staging: unisys: remove typedef from CONTROLVM_MESSAGE

Remove the typedef and use struct controlvm_message instead. Update all
references.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor CONTROLVM_MESSAGE_DEVICE_CONFIGURE
Benjamin Romer [Thu, 23 Oct 2014 18:30:30 +0000 (14:30 -0400)]
staging: unisys: refactor CONTROLVM_MESSAGE_DEVICE_CONFIGURE

Remove the typedef from CONTROLVM_MESSAGE_DEVICE_CONFIGURE, replacing it
with struct controlvm_message_device_configure. Fix CamelCase names and
update all references.

Header => header
Packet => packet

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor CONTROLVM_MESSAGE_DEVICE_CREATE
Benjamin Romer [Thu, 23 Oct 2014 18:30:29 +0000 (14:30 -0400)]
staging: unisys: refactor CONTROLVM_MESSAGE_DEVICE_CREATE

Remove the typedef from CONTROLVM_MESSAGE_DEVICE_CREATE, in favor of
struct controlvm_message_device_create, fix CamelCase names, and update
all references.

Header => header
Packet => packet

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor CONTROLVM_PACKET_DEVICE_CONFIGURE
Benjamin Romer [Thu, 23 Oct 2014 18:30:28 +0000 (14:30 -0400)]
staging: unisys: refactor CONTROLVM_PACKET_DEVICE_CONFIGURE

Remove the typedef from CONTROLVM_PACKET_DEVICE_CONFIGURE, in favor of
struct controlvm_packet_device_configure. Fix CamelCase names and update
all references to modified names.

busNo => bus_no
devNo => dev_no

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor CONTROLVM_PACKET_DEVICE_CREATE
Benjamin Romer [Thu, 23 Oct 2014 18:30:27 +0000 (14:30 -0400)]
staging: unisys: refactor CONTROLVM_PACKET_DEVICE_CREATE

Get rid of the typedef for CONTROLVM_PACKET_DEVICE_CREATE, instead using
struct controlvm_packet_device_create. Fix CamelCase names and update
all references to changed names. Clean up comments.

busNo => bus_no
devNo => dev_no
channelAddr => channel_addr
channelBytes => channel_bytes
dataTypeGuid => data_type_uuid
devInstGuid => dev_inst_uuid

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor CONTROLVM_MESSAGE_HEADER
Benjamin Romer [Thu, 23 Oct 2014 18:30:26 +0000 (14:30 -0400)]
staging: unisys: refactor CONTROLVM_MESSAGE_HEADER

This patch removes the typedef from CONTROLVM_MESSAGE_HEADER, using the
struct controlvm_message_header name directly instead. It fixes
CamelCase names and updates all references to changed names:

MessageSize => message_size
SegmentIndex => segment_index
CompletionStatus => completion_status
responseExpected => response_expected
testMessage => test_message
partialCompletion => partial_completion
writerInDiag => writer_in_diag
Flags => flags
Reserved => reserved
MessageHandle => message_handle
PayloadVmOffset => payload_vm_offset
PayloadMaxBytes => payload_max_bytes
PayloadBytes => payload_bytes

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor CONTROLVM_MESSAGE_PACKET
Benjamin Romer [Thu, 23 Oct 2014 18:30:25 +0000 (14:30 -0400)]
staging: unisys: refactor CONTROLVM_MESSAGE_PACKET

This patch refactors the message union and internal structures so they
will pass checkpatch.pl. The typedef is removed, and references are
changed to struct controlvm_message_packet. The comments were reflowed
and cleaned up to remove unnecessary information, and CamelCase member
names were fixed here and in references:

busNo => bus_no
devNo => dev_no
deviceCount => dev_count
channelAddr => channel_addr
channelBytes => channel_bytes
busDataTypeGuid => bus_data_type_uuid
busInstGuid => bus_inst_uuid
destroyBus => destroy_bus
guestHandle => guest_handle
recvBusInterruptHandle => recv_bus_irq_handle
configureBus => configure_bus
createDevuce => create_device
destroyDevice => destroy_device
configureDevice => configure_device
reconfigureDevice => reconfigure_device
busChangeState => bus_change_state
physicalDevice => phys_device
busCount => bus_count
switchCount => switch_count
platformNumber => platformNumber
initChipset => init_chipset
Options => options
Test => test
chipsetSelftest => chipset_selftest

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor ULTRA_CHIPSET_FEATURE enum
Benjamin Romer [Thu, 23 Oct 2014 18:30:24 +0000 (14:30 -0400)]
staging: unisys: refactor ULTRA_CHIPSET_FEATURE enum

Get rid of the typedef and use enum ultra_chipset_feature instead, and
update all references to the enumeration.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase macro names in controlframework.h
Benjamin Romer [Thu, 23 Oct 2014 18:30:23 +0000 (14:30 -0400)]
staging: unisys: fix CamelCase macro names in controlframework.h

Fix CamelCase names:

ULTRA_MEMORY_COUNT_Ki => ULTRA_MEMORY_COUNT_KI
ULTRA_MEMORY_PAGE_Ki => ULTRA_MEMORY_PAGE_KI

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase names in struct efi_spar_indication
Benjamin Romer [Thu, 23 Oct 2014 18:30:22 +0000 (14:30 -0400)]
staging: unisys: fix CamelCase names in struct efi_spar_indication

Fix CamelCase names and update all references to them:

BootToFirmwareUI => boot_to_fw_ui
ClearNvram => clear_nvram
ClearCmos => clear_cmos
BootToTool => boot_to_tool

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: replace typedef ULTRA_EFI_SPAR_INDICATION
Benjamin Romer [Thu, 23 Oct 2014 18:30:21 +0000 (14:30 -0400)]
staging: unisys: replace typedef ULTRA_EFI_SPAR_INDICATION

Replace ULTRA_EFI_SPAR_INDICATION with struct efi_spar_indication, and
update references to the old type.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove unused code from controlvmchannel.h
Benjamin Romer [Thu, 23 Oct 2014 18:30:20 +0000 (14:30 -0400)]
staging: unisys: remove unused code from controlvmchannel.h

Delete struct PciConfigHdr, struct ScsiId, struct WWID, struct
VirtDiskInfo, enum CONTROLVM_ACTION, and enum ULTRA_TOOL_ACTIONS.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase names in struct pci_id
Benjamin Romer [Thu, 23 Oct 2014 18:30:19 +0000 (14:30 -0400)]
staging: unisys: fix CamelCase names in struct pci_id

Fix CamelCase names:

Domain => domain
Bus => bus
Slot => slot
Func => func
Reserved => reserved

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase names in struct irq_info
Benjamin Romer [Thu, 23 Oct 2014 18:30:18 +0000 (14:30 -0400)]
staging: unisys: fix CamelCase names in struct irq_info

Fix CamelCase names in structure, and references to them:

sendInterruptHandle => send_irq_handle
recvInterruptHandle => recv_irq_handle
recvInterruptVector => recv_irq_vector
recvInterruptShared => recv_irq_shared

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove typedef CONTROLVM_ID
Benjamin Romer [Thu, 23 Oct 2014 18:30:17 +0000 (14:30 -0400)]
staging: unisys: remove typedef CONTROLVM_ID

Replace the typedef for CONTROLVM_ID with enum controlvm_id, and update
all references to the old typedef.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase in SPAR_CONTROLVM_CHANNEL_OK_CLIENT
Benjamin Romer [Thu, 23 Oct 2014 18:30:16 +0000 (14:30 -0400)]
staging: unisys: fix CamelCase in SPAR_CONTROLVM_CHANNEL_OK_CLIENT

Fix CamelCase parameter name:

pChannel => ch

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove ULTRA_CONTROLVM_CHANNEL_OK_SERVER macro
Benjamin Romer [Thu, 23 Oct 2014 18:30:15 +0000 (14:30 -0400)]
staging: unisys: remove ULTRA_CONTROLVM_CHANNEL_OK_SERVER macro

Nobody is using this macro, so remove it entirely.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor UltraControlvmChannelProtocolGuid
Benjamin Romer [Thu, 23 Oct 2014 18:30:14 +0000 (14:30 -0400)]
staging: unisys: refactor UltraControlvmChannelProtocolGuid

rename UltraControlvmChannelProtocolGuid to
spar_controlvm_channel_protocol_uuid, and change
ULTRA_CONTROLVM_CHANNEL_PROTOCOL_GUID to
SPAR_CONTROLVM_CHANNEL_PROTOCOL_UUID to match. Update references to the
old name.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase constant names in controlframework.h
Benjamin Romer [Thu, 23 Oct 2014 18:30:13 +0000 (14:30 -0400)]
staging: unisys: fix CamelCase constant names in controlframework.h

Fix CamelCase names:

SegmentStateRunning => segment_state_running
SegmentStatePaused => segment_state_paused
SegmentStateStandby => segment_state_standby

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor ultra_segment_state
Benjamin Romer [Thu, 23 Oct 2014 18:30:12 +0000 (14:30 -0400)]
staging: unisys: refactor ultra_segment_state

Rename the struct to spar_segment_state and fix CamelCase names:

Enabled => enabled
Active => active
Alive => alive
Revoked => revoked
Allocated => allocated
Known => known
Ready => ready
Operating => operating

Fix all references to modified names to use the new names.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor ULTRA_check_channel_server()
Benjamin Romer [Thu, 23 Oct 2014 18:30:11 +0000 (14:30 -0400)]
staging: unisys: refactor ULTRA_check_channel_server()

Rename spar_check_channel_server() to spar_check_channel_server(),
remove unused parameters fileName, lineNumber, and logCtx, update
references to the function and remove unused parameters in macros that
call it, and fix CamelCase names:

typeGuid => typeuuid
channelName => name
expectedMinBytes => expected_min_bytes
actualBytes => actual_bytes

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor SignalRemoveAll()
Benjamin Romer [Thu, 23 Oct 2014 18:30:10 +0000 (14:30 -0400)]
staging: unisys: refactor SignalRemoveAll()

Rename SignalRemoveAll to spar_signal_remove_all(), and fix CamelCase
names:

pChannel => ch
Queue => queue
pSignal => sig
signalCount => count

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor SignalInit Macro
Benjamin Romer [Thu, 23 Oct 2014 18:30:09 +0000 (14:30 -0400)]
staging: unisys: refactor SignalInit Macro

Rename SignalInit to spar_signal_init, and fix CamelCase names:

VersionId => version
Type => chtype
Size => size
SignalSize => signal_size
oSignalBase => sig_base_offset
MaxSignalSlots => max_slots
MaxSignals => max_signals

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix symbol placement in spar_channel_client_acquire
Benjamin Romer [Thu, 23 Oct 2014 18:30:08 +0000 (14:30 -0400)]
staging: unisys: fix symbol placement in spar_channel_client_acquire

The && belongs at the end of the previous line, not the start of the
next one.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor visor_signalqueue_empty()
Benjamin Romer [Thu, 23 Oct 2014 18:30:07 +0000 (14:30 -0400)]
staging: unisys: refactor visor_signalqueue_empty()

Rename visor_signalqueue_empty() to spar_signalqueue_empty(), and fix
CamelCase parameter names:

pChannel => ch
Queue => queue

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor visor_signal_remove()
Benjamin Romer [Thu, 23 Oct 2014 18:30:06 +0000 (14:30 -0400)]
staging: unisys: refactor visor_signal_remove()

Rename visor_signal_remove() to spar_signal_remove() and fix CamelCase
parameter names:

pChannel => ch
Queue => queue
pSignal => sig

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor ULTRA_check_channel_client()
Benjamin Romer [Thu, 23 Oct 2014 18:30:05 +0000 (14:30 -0400)]
staging: unisys: refactor ULTRA_check_channel_client()

Rename the function ULTRA_check_channel_client() to
spar_check_channel_client(), and fix CamelCase parameter names:

pChannel => ch
expectedTypeGuid => expected_uuid
channelName => chname
expectedMinBytes => expected_min_bytes
expectedVersionId => expected_version
expectedSignature => expected_signature

Rename macros that use spar_check_channel_client:

ULTRA_CONTROLVM_CHANNEL_OK_CLIENT => SPAR_CONTROLVM_CHANNEL_OK_CLIENT
ULTRA_VHBA_CHANNEL_OK_CLIENT => SPAR_VHBA_CHANNEL_OK_CLIENT
ULTRA_VNIC_CHANNEL_OK_CLIENT => SPAR_VNIC_CHANNEL_OK_CLIENT
ULTRA_VSWITCH_CHANNEL_OK_CLIENT => SPAR_VSWITCH_CHANNEL_OK_CLIENT
ULTRA_VBUS_CHANNEL_OK_CLIENT => SPAR_VBUS_CHANNEL_OK_CLIENT

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase in struct signal_queue_header
Benjamin Romer [Thu, 23 Oct 2014 18:30:04 +0000 (14:30 -0400)]
staging: unisys: fix CamelCase in struct signal_queue_header

Fix CamelCase names:
VersionId => version
Type => chtype
Size => size
oSignalBase => sig_base_offset
FeatureFlags => features
NumSignalsSent => num_sent
NumOverflows => num_overflows
SignalSize => signal_size
MaxSignalSlots => max_slots
MaxSignals => max_signals
Head => head
NumSignalsReceived => num_received
Tail => tail
Reserved1 => reserved1
Reserved2 => reserved2
ClientQueue => client_queue
NumInterruptsReceived => num_irq_received
NumEmptyCnt => num_empty
ErrorFlags => errorflags
Filler => filler

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove typedef SIGNAL_QUEUE_HEADER
Benjamin Romer [Thu, 23 Oct 2014 18:30:03 +0000 (14:30 -0400)]
staging: unisys: remove typedef SIGNAL_QUEUE_HEADER

Get rid of the typedef for SIGNAL_QUEUE_HEADER and use struct
signal_queue_header directly instead. Fix all references to the typedef
to use the struct.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor ULTRA_channel_client_release_os()
Benjamin Romer [Thu, 23 Oct 2014 18:30:02 +0000 (14:30 -0400)]
staging: unisys: refactor ULTRA_channel_client_release_os()

Remove the unnecessary macro ULTRA_CHANNEL_CLIENT_RELEASE_OS(), rename
the function to spar_channel_client_release_os(), fix references to the
macro to call the function directly instead, remove the unnecessary
logCtx, file, and line parameters, and fix CamelCase names:

pChannel => ch
chanId => id
pChan => hdr

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor ULTRA_channel_client_acquire_os()
Benjamin Romer [Thu, 23 Oct 2014 18:30:01 +0000 (14:30 -0400)]
staging: unisys: refactor ULTRA_channel_client_acquire_os()

Remove the unnecessary macro ULTRA_CHANNEL_CLIENT_ACQUIRE_OS for calling
the function, and rename the function to
spar_channel_client_acquire_os(). Get rid of unneeded parameters logCtx,
file, and line, and Fix CamelCase names:

pChannel => ch
chanId => id
pChan => hdr

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix up ULTRA_CHANNEL_CLIENT_TRANSITION macro
Benjamin Romer [Thu, 23 Oct 2014 18:30:00 +0000 (14:30 -0400)]
staging: unisys: fix up ULTRA_CHANNEL_CLIENT_TRANSITION macro

Rename the macro to SPAR_CHANNEL_CLIENT_TRANSITION, and fix CamelCase
parameters:

pChan => ch
chanId => id
logCtx => log

Update all places the macro was used to call the new name.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase in PathName_Last_N_Nodes()
Benjamin Romer [Thu, 23 Oct 2014 18:29:59 +0000 (14:29 -0400)]
staging: unisys: fix CamelCase in PathName_Last_N_Nodes()

Fix CamelCase name:

PathName_Last_N_Nodes => pathname_last_n_nodes

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix ULTRA_SPAR_CHANNEL_CLIENT_CHK_TRANSITION macro
Benjamin Romer [Thu, 23 Oct 2014 18:29:58 +0000 (14:29 -0400)]
staging: unisys: fix ULTRA_SPAR_CHANNEL_CLIENT_CHK_TRANSITION macro

Rename the macro to SPAR_CHANNEL_CLIENT_CHK_TRANSITION, and rename
CamelCase parameters to:

chanId => id
logCtx => log

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: clean up ULTRA_CHANNEL_SERVER_READY macro
Benjamin Romer [Thu, 23 Oct 2014 18:29:57 +0000 (14:29 -0400)]
staging: unisys: clean up ULTRA_CHANNEL_SERVER_READY macro

Simplify this macro so it is only one macro, rename it to
SPAR_CHANNEL_SERVER_READY, and get rid of the CamelCase parameter name.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase names in struct channel_header
Benjamin Romer [Thu, 23 Oct 2014 18:29:56 +0000 (14:29 -0400)]
staging: unisys: fix CamelCase names in struct channel_header

Fix CamelCase names:
Signature => signature
LegacySignature => legacy_signature
HeaderSize => header_size
Size => size
Features => features
Type => chtype
PartitionHandle => partition_handle
Handle => handle
oChannelSpace => ch_space_offset
VersionId => version_id
PartitionIndex => partition_index
ZoneGuid => zone_uuid
oClientString => cli_str_offset
CliStateBoot => cli_state_boot
CmdStateCli => cmd_state_cli
CliStateOs => cli_state_os
ChannelCharacteristics => ch_characteristic
CmdStateSrv => cmd_state_srv
srvState => srv_state
CliErrorBoot => cli_error_boot
CliErrorOs => cli_error_os
Filler => filler
RecoverChannel => recover_channel

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove typedef for CHANNEL_HEADER
Benjamin Romer [Thu, 23 Oct 2014 18:29:55 +0000 (14:29 -0400)]
staging: unisys: remove typedef for CHANNEL_HEADER

Switch everywhere that CHANNEL_HEADER, pCHANNEL_HEADER, or
ULTRA_CHANNEL_PROTOCOL was used, to struct channel_header.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix spacing in ULTRA_CHANNELCLI_STRING
Benjamin Romer [Thu, 23 Oct 2014 18:29:54 +0000 (14:29 -0400)]
staging: unisys: fix spacing in ULTRA_CHANNELCLI_STRING

Remove all the extraneous spaces in typecasts in
ULTRA_CHANNELCLI_STRING().

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix missing blank line after enum channel_clientstate
Benjamin Romer [Thu, 23 Oct 2014 18:29:53 +0000 (14:29 -0400)]
staging: unisys: fix missing blank line after enum channel_clientstate

The enumeration needs to have a blank line after it.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: get rid of typedef for CHANNEL_CLIENTSTATE
Benjamin Romer [Thu, 23 Oct 2014 18:29:52 +0000 (14:29 -0400)]
staging: unisys: get rid of typedef for CHANNEL_CLIENTSTATE

Remove the typedef for CHANNEL_CLIENTSTATE and just use enum
channel_clientstate instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove typedef for CHANNEL_SERVERSTATE
Benjamin Romer [Thu, 23 Oct 2014 18:29:51 +0000 (14:29 -0400)]
staging: unisys: remove typedef for CHANNEL_SERVERSTATE

Remove the typedef for CHANNEL_SERVERSTATE and use enum
channel_serverstate instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: get rid of UltraLogEvent macro
Benjamin Romer [Thu, 23 Oct 2014 18:29:50 +0000 (14:29 -0400)]
staging: unisys: get rid of UltraLogEvent macro

Remove the UltraLogEvent macro from channel.h, and fix all references so
they call pr_info directly. CamelCase names used by functions that
called UltraLogEvent will be fixed in later patches.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove channel mismatch macros
Benjamin Romer [Thu, 23 Oct 2014 18:29:49 +0000 (14:29 -0400)]
staging: unisys: remove channel mismatch macros

Simplify the code in channel.h by removing CHANNEL_GUID_MISMATCH,
CHANNEL_u64_MISMATCH, and CHANNEL_U32_MISMATCH, and printing the
messages directly instead.

The CamelCase names in the functions that used to use these macros will
be fixed in a later patch.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: clean up stray blank lines in channel_guid.h
Benjamin Romer [Thu, 23 Oct 2014 18:29:48 +0000 (14:29 -0400)]
staging: unisys: clean up stray blank lines in channel_guid.h

Just remove extra blank lines in channel_guid.h.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase channel constants
Benjamin Romer [Thu, 23 Oct 2014 18:29:47 +0000 (14:29 -0400)]
staging: unisys: fix CamelCase channel constants

The channel definitions in channel_guid.h contain several CamelCase
constants. Fix these so they are no longer incorrectly cased, and use
the name spar instead of the old "ultra" reference. Also, rename the
corresponding UUID macros to match. Update all references to constants
or UUID macros that were changed.

Fix CamelCase names:
UltraVhbaChannelProtocolGuid => spar_vhba_channel_protocol_uuid
UltraVnicChannelProtocolGuid => spar_vnic_channel_protocol_uuid
UltraSIOVMGuid => spar_siovm_uuid
UltraControlDirectorChannelProtocolGuid =>
spar_controldirector_channel_protocol_uuid

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: get rid of IO_DATA_STRUCTURE typedef
Benjamin Romer [Thu, 23 Oct 2014 18:29:46 +0000 (14:29 -0400)]
staging: unisys: get rid of IO_DATA_STRUCTURE typedef

Nobody was using this, so just remove it.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix CamelCase in ISSUE_IO_VMCALL macros
Benjamin Romer [Thu, 23 Oct 2014 18:29:45 +0000 (14:29 -0400)]
staging: unisys: fix CamelCase in ISSUE_IO_VMCALL macros

Fix the parameter name in ISSUE_IO_VMCALL and ISSUE_IO_EXTENDED_VMCALL.

Fix CamelCase names:
InterfaceMethod => method

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix typedef for VMCALL_MONITOR_INTERFACE_METHOD_TUPLE
Benjamin Romer [Thu, 23 Oct 2014 18:29:44 +0000 (14:29 -0400)]
staging: unisys: fix typedef for VMCALL_MONITOR_INTERFACE_METHOD_TUPLE

Get rid of the typedef for VMCALL_MONITOR_INTERFACE_METHOD_TUPLE in
favor of enum vmcall_monitor_interface_method_tuple.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: delete extra space character in vbuschannel_itoa()
Benjamin Romer [Thu, 23 Oct 2014 18:29:43 +0000 (14:29 -0400)]
staging: unisys: delete extra space character in vbuschannel_itoa()

There's no need for that extra space in the typecast in
vbuschannel_itoa(), so just delete it.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: clean up extra parens in vbuschannel_devinfo_to_string
Benjamin Romer [Thu, 23 Oct 2014 18:29:42 +0000 (14:29 -0400)]
staging: unisys: clean up extra parens in vbuschannel_devinfo_to_string

Get rid of the unnecessary parenthesis in several assignments in
vbuschannel_devinfo_to_string().

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix indentation on vbuschannel_devinfo_to_string()
Benjamin Romer [Thu, 23 Oct 2014 18:29:41 +0000 (14:29 -0400)]
staging: unisys: fix indentation on vbuschannel_devinfo_to_string()

Fix the parameter indentation for vbuschannel_devinfo_to_string(), in
vbusdeviceinfo.h.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: clean up bracing in vbuschannel_sanitize_buffer()
Benjamin Romer [Thu, 23 Oct 2014 18:29:40 +0000 (14:29 -0400)]
staging: unisys: clean up bracing in vbuschannel_sanitize_buffer()

The bracing in vbuschannel_sanitize_buffer() in vbusdeviceinfo.h is
messy. Clean these up.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: unisys: visorutil: easyproc: fixed a line over 80 characters coding style...
Shrikrishna Khare [Sat, 18 Oct 2014 22:57:37 +0000 (15:57 -0700)]
Staging: unisys: visorutil: easyproc: fixed a line over 80 characters coding style issue

Fixed a coding style issue.

Signed-off-by: Shrikrishna Khare <shrikrishna.khare@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging, unisys: remove leftover function kmalloc_kernel()
WANG Chao [Tue, 14 Oct 2014 08:58:37 +0000 (16:58 +0800)]
staging, unisys: remove leftover function kmalloc_kernel()

kmalloc_kernel() previously declared in timskmodutils.h which recently got
removed. Now also remove kmalloc_kernel(), because it's not used anywhere.

Signed-off-by: WANG Chao <wangchao19890207@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: ni_tiocmd: fixed a brace coding style issue
tssurya [Fri, 24 Oct 2014 19:07:33 +0000 (00:37 +0530)]
Staging: comedi: ni_tiocmd: fixed a brace coding style issue

Removed unneeded braces with the help of checkpatch.pl tool.

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: os_dep: Remove null check before kfree
Tapasweni Pathak [Fri, 24 Oct 2014 16:15:11 +0000 (21:45 +0530)]
staging: rtl8188eu: os_dep: Remove null check before kfree

This patch is generated by the following semantic patch

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192e: Remove unnecessary code
Tapasweni Pathak [Fri, 24 Oct 2014 16:15:26 +0000 (21:45 +0530)]
staging: rtl8192e: Remove unnecessary code

kfree on NULL pointer is a no-op.

This used the following semantic patch to identify such a instance

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

As rxb is always null at this point, so the code to kfree it and intializing
it to NULL is removed completely.

Suggested by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: ni_mio_common.c: fixed brace coding style issue in two places
Surya Seetharaman [Fri, 24 Oct 2014 20:12:09 +0000 (01:42 +0530)]
Staging: comedi: ni_mio_common.c: fixed brace coding style issue in two places

Removed unnecessary braces with the help of  checkpatch.pl tool.

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: remove unneeded parentheses around the right hand side of an assignment
Jiayi Ye [Sat, 25 Oct 2014 02:58:28 +0000 (10:58 +0800)]
staging: remove unneeded parentheses around the right hand side of an assignment

In assignments such as value = (FLASH_CMD_STATUS_REG_READ << 24);, parentheses
are not needed. The Coccinelle semantic patch was used to find cases.

@r@
identifier x;
expression e1, e2;
@@

- x = (e1 << e2);
+ x = e1 << e2;

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8723au: core: Fix switch-case indent
Tina Ruchandani [Fri, 24 Oct 2014 03:17:48 +0000 (20:17 -0700)]
Staging: rtl8723au: core: Fix switch-case indent

This patch fixes the following checkpatch errors
in rtw_cmd.c :
ERROR: switch and case should be at the same indent

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8723au: core: Dont have { on new line
Tina Ruchandani [Fri, 24 Oct 2014 03:17:20 +0000 (20:17 -0700)]
Staging: rtl8723au: core: Dont have { on new line

This patch fixes the following checkpatch errors:
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'

Exceptions: { is left on a new line to itself when fixing
this error makes the line longer than 80 characters.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8723au: core: Dont have { on new line
Tina Ruchandani [Fri, 24 Oct 2014 03:16:51 +0000 (20:16 -0700)]
Staging: rtl8723au: core: Dont have { on new line

This patch fixes the following checkpatch errors:
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'

Exceptions: { is left on a new line to itself when fixing
this error makes the line longer than 80 characters.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: media: lirc: Use pr_* instead of printk
Aybuke Ozdemir [Thu, 23 Oct 2014 14:12:19 +0000 (17:12 +0300)]
staging: media: lirc: Use pr_* instead of printk

This patch focuses on fixing the following warning generated by
checkpatch.pl for the file lirc_sasem.c:
WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then
dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
WARNING: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then
dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: Remove unnecessary if
Tapasweni Pathak [Fri, 24 Oct 2014 16:14:26 +0000 (21:44 +0530)]
staging: rtl8192u: Remove unnecessary if

Remove the if condition, as the code inside the if condition is
commented and does not have any FIXME or TODO comment.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: core: fix null dereference on exit path in rtw_mlme.c
Jiayi Ye [Thu, 23 Oct 2014 14:05:10 +0000 (22:05 +0800)]
staging: rtl8188eu: core: fix null dereference on exit path in rtw_mlme.c

If adapter is null, null dereference may occur. This patch fixes it.
The following Coccinelle semantic patch was used to find the case.

@@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@

* if (E == NULL)
{
 ... when != if (E == NULL) S1 else S2
     when != E = E1
* E->f
 ... when any
 return ...;
}
else S3

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: Replace C99 // comments by /* */
Sarah Khan [Thu, 23 Oct 2014 17:22:33 +0000 (22:52 +0530)]
staging: vt6655: Replace C99 // comments by /* */

Replaced C99 // comments by /* */ in wroute.c

Signed-off-by: Sarah Khan <sarahjmi07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xgifb: Removed an unnecessary assignment statement
Sarah Khan [Thu, 23 Oct 2014 17:48:53 +0000 (23:18 +0530)]
staging: xgifb: Removed an unnecessary assignment statement

Used coccinelle patch
@@

expression data;
identifier f;

@@

-data =
+return
     f(...);
-return (data);

Signed-off-by: Sarah Khan <sarahjmi07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: lustre: llite: Use kstrdup
Tapasweni Pathak [Fri, 24 Oct 2014 16:16:00 +0000 (21:46 +0530)]
staging: lustre: lustre: llite: Use kstrdup

Use kstrdup when the goal of an allocation is copy a string into the
allocated region.

Patch found by coccicheck.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: slicoss: Use inplace convert with __be32 *
Ebru Akagunduz [Thu, 23 Oct 2014 13:10:16 +0000 (16:10 +0300)]
staging: slicoss: Use inplace convert with __be32 *

This patch fixes "cast to restricted __be32"
sparse warning.

remove  temporary value assignment and use inplace
__be32 conversion for ntohl function which is can
get big endian format

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: vme: devices: Use kasprintf
Vaishali Thakkar [Thu, 23 Oct 2014 07:57:46 +0000 (13:27 +0530)]
Staging: vme: devices: Use kasprintf

This patch uses kasprintf which combines kmalloc and sprintf.
kasprintf also takes care of the size calculation.

This is done using Coccinelle. Semantic patch used is as follows:

@@
expression a,flag;
expression list args;
statement S;
@@

 a =
- \(kmalloc\|kzalloc\)(...,flag)
+ kasprintf (flag,args)
  <... when != a
  if (a == NULL || ...) S
  ...>
- sprintf(a,args);

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: android: Replace timeval with ktime_t in timed_gpio.c
Somya Anand [Thu, 23 Oct 2014 19:28:38 +0000 (21:28 +0200)]
Staging: android: Replace timeval with ktime_t in timed_gpio.c

'struct timeval t' is used to return remaining time in milliseconds.

32-bit systems using 'struct timeval' will break in the year 2038,
so we have to replace that code with more appropriate types.
This patch changes the android driver to use ktime_t.

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: replace timeval with ktime_t
Somya Anand [Thu, 23 Oct 2014 19:28:37 +0000 (21:28 +0200)]
Staging: comedi: replace timeval with ktime_t

'struct timeval last' is used for recording last time interrupt.
'struct timeval now' is used for calculating elapsed time.

32-bit systems using 'struct timeval' will break in the year 2038,
so we have to replace that code with more appropriate types.
This patch changes the comedi driver to use ktime_t.

Since this code doesn't communicate the time values
to the outside (user space, file system, network).Thus ktime_get()
is a better than using do_gettimeofday() as it uses monotonic
clock.

ktime_to_us() returns an 's64', and using the '%' operator on that requires
doing a 64-bit division which needs an expensive library function call
the specific value of usec_current does not actually matter although it might
matter that it's not always the same
which will start with the offset from the lower 32 bit of the microsecond.
Therefore:
  devpriv->usec_current = (ktime_to_us(devpriv->last) % USEC_PER_SEC)
                          % devpriv->usec_period;
is replaced by

  devpriv->usec_current = ((u32)ktime_to_us(devpriv->last))
                          % devpriv->usec_period;

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rts5208: fix case of bitwise operator on zero in ms.c
Jiayi Ye [Mon, 20 Oct 2014 07:01:08 +0000 (15:01 +0800)]
staging: rts5208: fix case of bitwise operator on zero in ms.c

If a variable has value 0, then there is no point in combining it with other things with |, as for any
 x, 0 | x is just x. The following semantic patch finds this problem.
    @@
    expression x,e,e1;
    statement S;
    @@

    if (x == 0) {
      <... when != x = e1
          when != while(...) S
          when != for(...;...;...) S
    (
    *  x |= e
    |
    *  x | e
    )
      ...>
    }

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: wlan-ng: Fix restricted __be16 degrades to integer
Ebru Akagunduz [Mon, 20 Oct 2014 23:47:29 +0000 (02:47 +0300)]
staging: wlan-ng: Fix restricted __be16 degrades to integer

skb->protocol variable type is __be16 and in if condition
it is comparing with ETH_P_80211_RAW constant variable
which is not __be16 type. Using be16_to_cpu() function,
value of skb->protocol converted native processor format.
This bug was found by sparse.

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: media: omap24xx: Use min_t instead of min
Aybuke Ozdemir [Mon, 20 Oct 2014 22:39:34 +0000 (01:39 +0300)]
staging: media: omap24xx: Use min_t instead of min

This patch focuses on fixing the following warning generated by
checkpatch.pl for the file tcm825x.c:

WARNÄ°NG: min() should probably be min_t(u32, tgt_xclk, TCM825X_XCLK_MAX)

The changes were applied using the following coccinelle rule:
@@
expression e1, e2;
typedef u32;
@@

-tgt_xclk = min(e1, (u32)e2);
+tgt_xclk = min_t(u32, e1, e2);

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: visorutil: Remove null check before kfree
Tapasweni Pathak [Tue, 21 Oct 2014 04:20:03 +0000 (09:50 +0530)]
staging: unisys: visorutil: Remove null check before kfree

This patch was generated by the following semantic patch:

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remove unnecessary else if
Tapasweni Pathak [Wed, 22 Oct 2014 06:05:21 +0000 (11:35 +0530)]
staging: rtl8723au: Remove unnecessary else if

Removed the unnecessary else if condition as it has only
one comment inside it and do not have an FIXME or TODO comment near to
it too.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: emxx_udc: Remove null check before kfree
Tapasweni Pathak [Tue, 21 Oct 2014 04:18:58 +0000 (09:48 +0530)]
staging: emxx_udc: Remove null check before kfree

This patch was generated by the following semantic patch:

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: media: lirc: Delete unused function tv2int
Tapasweni Pathak [Mon, 20 Oct 2014 11:28:10 +0000 (16:58 +0530)]
staging: media: lirc: Delete unused function tv2int

The function tv2int is used to convert timeval to int.

32-bit systems using 'struct timeval' will break in the year 2038,
so we have to replace that code with more appropriate types.
This patch changes the lirc_imon.c file of media: lirc driver.

tv2int function is static and not used anywhere in this file too,
so it is removed. I also build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: android: Assign bool to true
Tapasweni Pathak [Wed, 22 Oct 2014 05:53:57 +0000 (11:23 +0530)]
staging: android: Assign bool to true

high is a bool type variable.

bool variable should be assigned true, false not 1 or 0.

This patch assigns high to true, replacing 1.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: ft1000-pcmcia: removed unused variable in ft1000_hw.c
Jiayi Ye [Mon, 20 Oct 2014 11:13:56 +0000 (19:13 +0800)]
staging: ft1000: ft1000-pcmcia: removed unused variable in ft1000_hw.c

Variable whose value is initialized but never used is unnecessary. The following Coccinelle semantic patch removed the unused variable.

@e@
identifier i;
position p;
type T;
@@

extern T i@p;

@@
type T;
identifier i;
constant C;
position p != e.p;
@@

- T i@p;
  <+... when != i
- i = C;
  ...+>

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: Remove parentheses from return arguments
Tapasweni Pathak [Mon, 20 Oct 2014 04:54:49 +0000 (10:24 +0530)]
staging: ft1000: Remove parentheses from return arguments

The sematic patch used for this is:

// <smpl>
@@
identifier i;
constant c;
@@

return
- (
    \(i\|-i\|i(...)\|c\)
- )
  ;
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: os_dep: Replaced kzalloc and memcpy with kmemdup
Tapasweni Pathak [Tue, 21 Oct 2014 04:18:20 +0000 (09:48 +0530)]
staging: rtl8188eu: os_dep: Replaced kzalloc and memcpy with kmemdup

Replaced calls to kzalloc followed by memcpy with a single call to
kmemdup.

Patch found using coccicheck.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: os_dep: Remove useless cast on kzalloc
Tapasweni Pathak [Tue, 21 Oct 2014 04:18:01 +0000 (09:48 +0530)]
staging: rtl8188eu: os_dep: Remove useless cast on kzalloc

Casting rhe return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language, as mentioned in
Documentation/CodingStyle, Chap 14.

Removed the cast on kzalloc return value.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: core: fixed msleep < 20ms can sleep for up to 20ms warning in...
Jiayi Ye [Mon, 20 Oct 2014 06:04:55 +0000 (14:04 +0800)]
staging: rtl8188eu: core: fixed msleep < 20ms can sleep for up to 20ms warning in rtw_efuse.c

This patch fixes following checkpatch.pl warning:
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt

Signed-off-by: Jiayi Ye <yejiayily@gmail.comi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: llite: Declare ptr args correctly
Tina Ruchandani [Wed, 22 Oct 2014 20:39:11 +0000 (13:39 -0700)]
Staging: lustre: llite: Declare ptr args correctly

This patch fixes the following checkpatch errors:
ERROR: "foo * bar" should be "foo *bar"

951: FILE: drivers/staging/lustre/lustre/llite/namei.c:951:
static void ll_get_child_fid(struct inode * dir, struct qstr *name,

1193: FILE: drivers/staging/lustre/lustre/llite/namei.c:1193:
static int ll_unlink(struct inode * dir, struct dentry *dentry)

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: libcfs: Fix switch-case indent
Tina Ruchandani [Wed, 22 Oct 2014 20:21:40 +0000 (13:21 -0700)]
Staging: lustre: libcfs: Fix switch-case indent

This patch fixes the following checkpatch error:j
ERROR: switch and case should be at the same indent
105: FILE: drivers/staging/lustre/lustre/libcfs/fail.c:105:

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: llite: Use () around long macro
Tina Ruchandani [Wed, 22 Oct 2014 19:28:49 +0000 (12:28 -0700)]
Staging: lustre: llite: Use () around long macro

This patch fixes the following checkpatch.pl
error: "Macros with complex values should be enclosed
in parentheses."

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: llite: Remove C99 '//' comments
Tina Ruchandani [Wed, 22 Oct 2014 19:16:04 +0000 (12:16 -0700)]
Staging: lustre: llite: Remove C99 '//' comments

This patch fixes the following checkpatch.pl errors:

ERROR: do not use C99 // comments
538: FILE: drivers/staging/lustre/lustre/llite/rw26.c:538:
// .orig_aops.readpages      = ll_readpages,
816: FILE: drivers/staging/lustre/lustre/llite/lproc_llite.c:816:
//{ "mntpt_path",   ll_rd_path,      0, 0 },
826: FILE: drivers/staging/lustre/lustre/llite/lproc_llite.c:826:
//{ "filegroups",   lprocfs_rd_filegroups,  0, 0 },

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: llite: Use kcalloc not kzalloc with mult
Tina Ruchandani [Wed, 22 Oct 2014 18:29:26 +0000 (11:29 -0700)]
staging: lustre: llite: Use kcalloc not kzalloc with mult

This patch fixes the following checkpatch.pl warnings:
WARNING: Prefer kcalloc over kzalloc with multiply
166: FILE: drivers/staging/lustre/lustre/llite/dir.c:166:
page_pool = kzalloc(sizeof(page) * max_pages, GFP_NOFS);
796: FILE: drivers/staging/lustre/lustre/llite/lloop.c:796:
loop_dev = kzalloc(max_loop * sizeof(*loop_dev), GFP_KERNEL);
800: FILE: drivers/staging/lustre/lustre/llite/lloop.c:800:
disks = kzalloc(max_loop * sizeof(*disks), GFP_KERNEL);

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Fix checkpatch.pl spacing-related errors
Tina Ruchandani [Wed, 22 Oct 2014 05:13:21 +0000 (22:13 -0700)]
staging: lustre: Fix checkpatch.pl spacing-related errors

This patch fixes misc. spacing errors reported by
checkpatch.pl for lustre/llite/file.c

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: lustre: obdecho: expand the GOTO macro in echo_client.c
Jiayi Ye [Mon, 20 Oct 2014 11:52:03 +0000 (19:52 +0800)]
staging: lustre: lustre: obdecho: expand the GOTO macro in echo_client.c

The GOTO macro is not standard in Linux. The following Coccinelle semantic patch was used to expand the GOTO macro.

@@
identifier lbl;
identifier rc;
constant c;
@@

- GOTO(lbl,\(rc\|c\));
+ goto lbl;
@@
identifier lbl;
expression rc;
@@

- GOTO(lbl,rc);
+ rc;
+ goto lbl;

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: Remove typedef ldlm_ns_hash_def_t
Vaishali Thakkar [Mon, 20 Oct 2014 08:28:35 +0000 (13:58 +0530)]
Staging: lustre: Remove typedef ldlm_ns_hash_def_t

The linux kernel coding style guidelines suggest not using typedefs
for structure types. This patch gets rid of the typedef for
ldlm_ns_hash_def_t. Also, the name of the struct is changed to drop
the _t, to make the name look less typedef-like.

This is done using Coccinelle. Semantic patch used to detect this
case is as follows:

@tn1@
type td;
@@

typedef struct { ... } td;

@script:python tf@
td << tn1.td;
tdres;
@@

coccinelle.tdres = td;

@@
type tn1.td;
identifier tf.tdres;
@@

-typedef
 struct
+  tdres
   { ... }
-td
 ;

@@
type tn1.td;
identifier tf.tdres;
@@
-td
+ struct tdres

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lustre: lnet: Make functions static
Vaishali Thakkar [Mon, 20 Oct 2014 05:10:22 +0000 (10:40 +0530)]
Staging: lustre: lnet: Make functions static

This patch makes functions proc_lnet_routes, proc_lnet_routers,
proc_lnet_peers and proc_lnet_nis static in file router_proc.c
as they are used only in this file.

This problem is detected by sparse.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: iio: iio_event_monitor: Add support for missing IIO modifiers
Roberta Dobrescu [Wed, 22 Oct 2014 13:50:17 +0000 (16:50 +0300)]
staging: iio: iio_event_monitor: Add support for missing IIO modifiers

This patch adds the missing IIO modifiers in event_is_known function
and iio_modifier_names vector.

Additionally, it removes duplicate name entries of IIO_MOD_LIGHT_BOTH
and IIO_MOD_LIGHT_IR in iio_modifier_names.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: dgnc: Remove unused sniff code
Somya Anand [Wed, 22 Oct 2014 11:54:03 +0000 (17:24 +0530)]
Staging: dgnc: Remove unused sniff code

The output written by dgnc_sniff_nowait_nolock() is never used
anywhere since commit 35cf90459312f ("staging: dgnc: removes proc code")
deleted the code that used to copy it to user space.
dgnc_sniff_nowait_nolock() uses 'timeval' to create header timestamps for
the data dump.

32-bit systems using 'struct timeval' will break in the year 2038,
This patch removes dgnc_sniff_nowait_nolock() and all ch_sniff_* members
of struct channel_t defined in "dgnc_driver.h". It also removes their usage
from the driver files and hence y2038 issue is also resolved.

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: wcmd.c: fix print priority warning
Aya Mahfouz [Wed, 22 Oct 2014 13:30:40 +0000 (15:30 +0200)]
staging: vt6655: wcmd.c: fix print priority warning

This patch fixes the following warning generated by checkpatch.pl
for the file wcmd.c

WARNING: printk() should include KERN_ facility level

printk was replaced by netdev_err since providing printk with the
facility level KERN_ERR generated the printing priority warning.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: skein: File Reorg
Eric Rost [Wed, 1 Oct 2014 03:23:23 +0000 (22:23 -0500)]
staging: skein: File Reorg

Reorganizes file to remove #defines from middle of functions. Also
removes #if'd loop declarations and adds ternary if driven loops.

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: skein: Whitespace cleanup
Eric Rost [Wed, 1 Oct 2014 03:22:47 +0000 (22:22 -0500)]
staging: skein: Whitespace cleanup

Pretties up multiline #defines and many other whitespace issues

Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>