* [PATCH 00/15] staging: unisys: checkpatch cleanup series
@ 2015-11-30 19:46 Benjamin Romer
2015-11-30 19:46 ` [PATCH 01/15] staging: unisys: Fix guestlinuxdebug.h comments Benjamin Romer
` (14 more replies)
0 siblings, 15 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
This set of patches cleans up all remaining checkpatch formatting warnings
in the Unisys driver series.
Erik Arfvidson (15):
staging: unisys: Fix guestlinuxdebug.h comments
staging: unisys: fix comments for controlvmchannel.h
staging: unisys: Fix NULL comparison vbusdeviceinfo.h
staging: unisys: fix trailing comment in vbusdeviceinfo.h
staging: unisys: fix comments in visorchipset
staging: unisys: fix spacing in visorchipset.c
staging: unisys: fix comparison to NULL in visorchipset.c
staging: unisys: fix blank lines in visorchipset.c
staging: unisys: fix spaces after cast visorchipset.c
staging: unisys: fix comments in visorbus_main.c
staging: unisys: fix block comments in ultrainputreport.h
staging: unisys: fix comments in visornic_main.c
staging: unisys: fix else statement in visornic_main.c
staging: unisys: fix alignment in visornic_main.c
staging: unisys: fix blank line in visornic_main.c
drivers/staging/unisys/include/guestlinuxdebug.h | 13 +-
drivers/staging/unisys/visorbus/controlvmchannel.h | 237 +++++++++++----------
drivers/staging/unisys/visorbus/vbusdeviceinfo.h | 7 +-
drivers/staging/unisys/visorbus/visorbus_main.c | 6 +-
drivers/staging/unisys/visorbus/visorchipset.c | 46 ++--
.../staging/unisys/visorinput/ultrainputreport.h | 45 ++--
drivers/staging/unisys/visornic/visornic_main.c | 31 +--
7 files changed, 200 insertions(+), 185 deletions(-)
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 01/15] staging: unisys: Fix guestlinuxdebug.h comments
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 02/15] staging: unisys: fix comments for controlvmchannel.h Benjamin Romer
` (13 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch simply cleans up all checkpatch comment issues
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/include/guestlinuxdebug.h | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/unisys/include/guestlinuxdebug.h b/drivers/staging/unisys/include/guestlinuxdebug.h
index 82ee565..b81287f 100644
--- a/drivers/staging/unisys/include/guestlinuxdebug.h
+++ b/drivers/staging/unisys/include/guestlinuxdebug.h
@@ -17,9 +17,10 @@
#define __GUESTLINUXDEBUG_H__
/*
-* This file contains supporting interface for "vmcallinterface.h", particularly
-* regarding adding additional structure and functionality to linux
-* ISSUE_IO_VMCALL_POSTCODE_SEVERITY */
+ * This file contains supporting interface for "vmcallinterface.h", particularly
+ * regarding adding additional structure and functionality to linux
+ * ISSUE_IO_VMCALL_POSTCODE_SEVERITY
+ */
/******* INFO ON ISSUE_POSTCODE_LINUX() BELOW *******/
enum driver_pc { /* POSTCODE driver identifier tuples */
@@ -133,9 +134,9 @@ enum event_pc { /* POSTCODE event identifier tuples */
#define POSTCODE_SEVERITY_ERR DIAG_SEVERITY_ERR
#define POSTCODE_SEVERITY_WARNING DIAG_SEVERITY_WARNING
-#define POSTCODE_SEVERITY_INFO DIAG_SEVERITY_PRINT /* TODO-> Info currently
- * doesn't show, so we
- * set info=warning */
+/* TODO-> Info currently doesn't show, so we set info=warning */
+#define POSTCODE_SEVERITY_INFO DIAG_SEVERITY_PRINT
+
/* example call of POSTCODE_LINUX_2(VISOR_CHIPSET_PC, POSTCODE_SEVERITY_ERR);
* Please also note that the resulting postcode is in hex, so if you are
* searching for the __LINE__ number, convert it first to decimal. The line
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 02/15] staging: unisys: fix comments for controlvmchannel.h
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
2015-11-30 19:46 ` [PATCH 01/15] staging: unisys: Fix guestlinuxdebug.h comments Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 03/15] staging: unisys: Fix NULL comparison vbusdeviceinfo.h Benjamin Romer
` (12 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch simply fixes all trailing */ by modifying the comments
structures while trying to reduce the total number of lines
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visorbus/controlvmchannel.h | 237 +++++++++++----------
1 file changed, 119 insertions(+), 118 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/controlvmchannel.h b/drivers/staging/unisys/visorbus/controlvmchannel.h
index ec25366..03e36fb 100644
--- a/drivers/staging/unisys/visorbus/controlvmchannel.h
+++ b/drivers/staging/unisys/visorbus/controlvmchannel.h
@@ -55,22 +55,25 @@
#define CONTROLVM_CRASHMSG_MAX 2
struct spar_segment_state {
- u16 enabled:1; /* Bit 0: May enter other states */
- u16 active:1; /* Bit 1: Assigned to active partition */
- u16 alive:1; /* Bit 2: Configure message sent to
- * service/server */
- u16 revoked:1; /* Bit 3: similar to partition state
- * ShuttingDown */
- u16 allocated:1; /* Bit 4: memory (device/port number)
- * has been selected by Command */
- u16 known:1; /* Bit 5: has been introduced to the
- * service/guest partition */
- u16 ready:1; /* Bit 6: service/Guest partition has
- * responded to introduction */
- u16 operating:1; /* Bit 7: resource is configured and
- * operating */
- /* Note: don't use high bit unless we need to switch to ushort
- * which is non-compliant */
+ /* Bit 0: May enter other states */
+ u16 enabled:1;
+ /* Bit 1: Assigned to active partition */
+ u16 active:1;
+ /* Bit 2: Configure message sent to service/server */
+ u16 alive:1;
+ /* Bit 3: similar to partition state ShuttingDown */
+ u16 revoked:1;
+ /* Bit 4: memory (device/port number) has been selected by Command */
+ u16 allocated:1;
+ /* Bit 5: has been introduced to the service/guest partition */
+ u16 known:1;
+ /* Bit 6: service/Guest partition has responded to introduction */
+ u16 ready:1;
+ /* Bit 7: resource is configured and operating */
+ u16 operating:1;
+/* Note: don't use high bit unless we need to switch to ushort
+ * which is non-compliant
+ */
};
static const struct spar_segment_state segment_state_running = {
@@ -177,53 +180,53 @@ struct controlvm_message_header {
/* For requests, indicates the message type. */
/* For responses, indicates the type of message we are responding to. */
- u32 message_size; /* Includes size of this struct + size
- * of message */
- u32 segment_index; /* Index of segment containing Vm
- * message/information */
- u32 completion_status; /* Error status code or result of
- * message completion */
+ /* Includes size of this struct + size of message */
+ u32 message_size;
+ /* Index of segment containing Vm message/information */
+ u32 segment_index;
+ /* Error status code or result of message completion */
+ u32 completion_status;
struct {
- u32 failed:1; /* =1 in a response to * signify
- * failure */
- u32 response_expected:1; /* =1 in all messages that expect a
- * response (Control ignores this
- * bit) */
- u32 server:1; /* =1 in all bus & device-related
- * messages where the message
- * receiver is to act as the bus or
- * device server */
- u32 test_message:1; /* =1 for testing use only
- * (Control and Command ignore this
- * bit) */
- u32 partial_completion:1; /* =1 if there are forthcoming
- * responses/acks associated
- * with this message */
- u32 preserve:1; /* =1 this is to let us know to
- * preserve channel contents
- * (for running guests)*/
- u32 writer_in_diag:1; /* =1 the DiagWriter is active in the
- * Diagnostic Partition*/
+ /* =1 in a response to signify failure */
+ u32 failed:1;
+ /* =1 in all messages that expect a response */
+ u32 response_expected:1;
+ /* =1 in all bus & device-related messages where the message
+ * receiver is to act as the bus or device server
+ */
+ u32 server:1;
+ /* =1 for testing use only (Control and Command ignore this */
+ u32 test_message:1;
+ /* =1 if there are forthcoming responses/acks associated
+ * with this message
+ */
+ u32 partial_completion:1;
+ /* =1 this is to let us know to preserve channel contents */
+ u32 preserve:1;
+ /* =1 the DiagWriter is active in the Diagnostic Partition */
+ u32 writer_in_diag:1;
} flags;
- u32 reserved; /* Natural alignment */
- u64 message_handle; /* Identifies the particular message instance,
- * and is used to match particular */
+ /* Natural alignment */
+ u32 reserved;
+ /* Identifies the particular message instance */
+ u64 message_handle;
/* request instances with the corresponding response instance. */
- u64 payload_vm_offset; /* Offset of payload area from start of this
- * instance of ControlVm segment */
- u32 payload_max_bytes; /* Maximum bytes allocated in payload
- * area of ControlVm segment */
- u32 payload_bytes; /* Actual number of bytes of payload
- * area to copy between IO/Command; */
+ /* Offset of payload area from start of this instance */
+ u64 payload_vm_offset;
+ /* Maximum bytes allocated in payload area of ControlVm segment */
+ u32 payload_max_bytes;
+ /* Actual number of bytes of payload area to copy between IO/Command */
+ u32 payload_bytes;
/* if non-zero, there is a payload to copy. */
};
struct controlvm_packet_device_create {
u32 bus_no; /* bus # (0..n-1) from the msg receiver's end */
u32 dev_no; /* bus-relative (0..n-1) device number */
- u64 channel_addr; /* Guest physical address of the channel, which
- * can be dereferenced by the receiver of this
- * ControlVm command */
+ /* Guest physical address of the channel, which can be dereferenced by
+ * the receiver of this ControlVm command
+ */
+ u64 channel_addr;
u64 channel_bytes; /* specifies size of the channel in bytes */
uuid_le data_type_uuid; /* specifies format of data in channel */
uuid_le dev_inst_uuid; /* instance guid for the device */
@@ -231,8 +234,8 @@ struct controlvm_packet_device_create {
}; /* for CONTROLVM_DEVICE_CREATE */
struct controlvm_packet_device_configure {
- u32 bus_no; /* bus # (0..n-1) from the msg
- * receiver's perspective */
+ /* bus # (0..n-1) from the msg receiver's perspective */
+ u32 bus_no;
/* Control uses header SegmentIndex field to access bus number... */
u32 dev_no; /* bus-relative (0..n-1) device number */
} ; /* for CONTROLVM_DEVICE_CONFIGURE */
@@ -251,50 +254,50 @@ struct controlvm_message_device_configure {
struct controlvm_message_packet {
union {
struct {
- u32 bus_no; /* bus # (0..n-1) from the msg
- * receiver's perspective */
- u32 dev_count; /* indicates the max number of
- * devices on this bus */
- u64 channel_addr; /* Guest physical address of
- * the channel, which can be
- * dereferenced by the receiver
- * of this ControlVm command */
+ /* bus # (0..n-1) from the msg receiver's perspective */
+ u32 bus_no;
+ /* indicates the max number of devices on this bus */
+ u32 dev_count;
+ /* Guest physical address of the channel, which can be
+ * dereferenced by the receiver of this ControlVm command
+ */
+ u64 channel_addr;
u64 channel_bytes; /* size of the channel */
- uuid_le bus_data_type_uuid; /* indicates format of
- * data in bus channel*/
+ /* indicates format of data in bus channel*/
+ uuid_le bus_data_type_uuid;
uuid_le bus_inst_uuid; /* instance uuid for the bus */
} create_bus; /* for CONTROLVM_BUS_CREATE */
struct {
- u32 bus_no; /* bus # (0..n-1) from the msg
- * receiver's perspective */
+ /* bus # (0..n-1) from the msg receiver's perspective */
+ u32 bus_no;
u32 reserved; /* Natural alignment purposes */
} destroy_bus; /* for CONTROLVM_BUS_DESTROY */
struct {
- u32 bus_no; /* bus # (0..n-1) from the receiver's
- * perspective */
+ /* bus # (0..n-1) from the receiver's perspective */
+ u32 bus_no;
u32 reserved1; /* for alignment purposes */
- u64 guest_handle; /* This is used to convert
- * guest physical address to
- * physical address */
+ /* This is used to convert guest physical address to physical address */
+ u64 guest_handle;
u64 recv_bus_irq_handle;
/* specifies interrupt info. It is used by SP
* to register to receive interrupts from the
* CP. This interrupt is used for bus level
* notifications. The corresponding
- * sendBusInterruptHandle is kept in CP. */
+ * sendBusInterruptHandle is kept in CP.
+ */
} configure_bus; /* for CONTROLVM_BUS_CONFIGURE */
/* for CONTROLVM_DEVICE_CREATE */
struct controlvm_packet_device_create create_device;
struct {
- u32 bus_no; /* bus # (0..n-1) from the msg
- * receiver's perspective */
+ /* bus # (0..n-1) from the msg receiver's perspective */
+ u32 bus_no;
u32 dev_no; /* bus-relative (0..n-1) device # */
} destroy_device; /* for CONTROLVM_DEVICE_DESTROY */
/* for CONTROLVM_DEVICE_CONFIGURE */
struct controlvm_packet_device_configure configure_device;
struct {
- u32 bus_no; /* bus # (0..n-1) from the msg
- * receiver's perspective */
+ /* bus # (0..n-1) from the msg receiver's perspective */
+ u32 bus_no;
u32 dev_no; /* bus-relative (0..n-1) device # */
} reconfigure_device; /* for CONTROLVM_DEVICE_RECONFIGURE */
struct {
@@ -307,8 +310,8 @@ struct controlvm_message_packet {
u32 dev_no;
struct spar_segment_state state;
struct {
- u32 phys_device:1; /* =1 if message is for
- * a physical device */
+ /* =1 if message is for a physical device */
+ u32 phys_device:1;
} flags;
u8 reserved[2]; /* Natural alignment purposes */
} device_change_state; /* for CONTROLVM_DEVICE_CHANGESTATE */
@@ -320,9 +323,10 @@ struct controlvm_message_packet {
} device_change_state_event;
/* for CONTROLVM_DEVICE_CHANGESTATE_EVENT */
struct {
- u32 bus_count; /* indicates the max number of busses */
- u32 switch_count; /* indicates the max number of
- * switches if a service partition */
+ /* indicates the max number of busses */
+ u32 bus_count;
+ /* indicates the max number of switches */
+ u32 switch_count;
enum ultra_chipset_feature features;
u32 platform_number; /* Platform Number */
} init_chipset; /* for CONTROLVM_CHIPSET_INIT */
@@ -330,11 +334,12 @@ struct controlvm_message_packet {
u32 options; /* reserved */
u32 test; /* bit 0 set to run embedded selftest */
} chipset_selftest; /* for CONTROLVM_CHIPSET_SELFTEST */
- u64 addr; /* a physical address of something, that can be
- * dereferenced by the receiver of this
- * ControlVm command (depends on command id) */
- u64 handle; /* a handle of something (depends on command
- * id) */
+ /* a physical address of something, that can be dereferenced
+ * by the receiver of this ControlVm command
+ */
+ u64 addr;
+ /* a handle of something (depends on command id) */
+ u64 handle;
};
};
@@ -357,8 +362,8 @@ struct spar_controlvm_channel_protocol {
u64 gp_nvram; /* guest phys addr of NVRAM channel */
u64 request_payload_offset; /* Offset to request payload area */
u64 event_payload_offset; /* Offset to event payload area */
- u32 request_payload_bytes; /* Bytes available in request payload
- * area */
+ /* Bytes available in request payload area */
+ u32 request_payload_bytes;
u32 event_payload_bytes;/* Bytes available in event payload area */
u32 control_channel_bytes;
u32 nvram_channel_bytes; /* Bytes in PartitionNvram segment */
@@ -384,41 +389,37 @@ struct spar_controlvm_channel_protocol {
u64 virtual_guest_image_size;
u64 prototype_control_channel_offset;
u64 virtual_guest_partition_handle;
-
- u16 restore_action; /* Restore Action field to restore the guest
- * partition */
- u16 dump_action; /* For Windows guests it shows if the visordisk
- * is running in dump mode */
+ /* Restore Action field to restore the guest partition */
+ u16 restore_action;
+ /* For Windows guests it shows if the visordisk is in dump mode */
+ u16 dump_action;
u16 nvram_fail_count;
u16 saved_crash_message_count; /* = CONTROLVM_CRASHMSG_MAX */
- u32 saved_crash_message_offset; /* Offset to request payload area needed
- * for crash dump */
- u32 installation_error; /* Type of error encountered during
- * installation */
+ /* Offset to request payload area needed for crash dump */
+ u32 saved_crash_message_offset;
+ /* Type of error encountered during installation */
+ u32 installation_error;
u32 installation_text_id; /* Id of string to display */
- u16 installation_remaining_steps;/* Number of remaining installation
- * steps (for progress bars) */
- u8 tool_action; /* ULTRA_TOOL_ACTIONS Installation Action
- * field */
+ /* Number of remaining installation steps (for progress bars) */
+ u16 installation_remaining_steps;
+ /* ULTRA_TOOL_ACTIONS Installation Action field */
+ u8 tool_action;
u8 reserved; /* alignment */
struct efi_spar_indication efi_spar_ind;
struct efi_spar_indication efi_spar_ind_supported;
u32 sp_reserved;
- u8 reserved2[28]; /* Force signals to begin on 128-byte cache
- * line */
- struct signal_queue_header request_queue;/* Service or guest partition
- * uses this queue to send
- * requests to Control */
- struct signal_queue_header response_queue;/* Control uses this queue to
- * respond to service or guest
- * partition requests */
- struct signal_queue_header event_queue; /* Control uses this queue to
- * send events to service or
- * guest partition */
- struct signal_queue_header event_ack_queue;/* Service or guest partition
- * uses this queue to ack
- * Control events */
-
+ /* Force signals to begin on 128-byte cache line */
+ u8 reserved2[28];
+ /* guest partition uses this queue to send requests to Control */
+ struct signal_queue_header request_queue;
+ /* Control uses this queue to respond to service or guest
+ * partition requests
+ */
+ struct signal_queue_header response_queue;
+ /* Control uses this queue to send events to guest partition */
+ struct signal_queue_header event_queue;
+ /* Service or guest partition uses this queue to ack Control events */
+ struct signal_queue_header event_ack_queue;
/* Request fixed-size message pool - does not include payload */
struct controlvm_message request_msg[CONTROLVM_MESSAGE_MAX];
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 03/15] staging: unisys: Fix NULL comparison vbusdeviceinfo.h
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
2015-11-30 19:46 ` [PATCH 01/15] staging: unisys: Fix guestlinuxdebug.h comments Benjamin Romer
2015-11-30 19:46 ` [PATCH 02/15] staging: unisys: fix comments for controlvmchannel.h Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 04/15] staging: unisys: fix trailing comment in vbusdeviceinfo.h Benjamin Romer
` (11 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patches resolves the NULL comparison checkpatch warnings
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visorbus/vbusdeviceinfo.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/vbusdeviceinfo.h b/drivers/staging/unisys/visorbus/vbusdeviceinfo.h
index f59fd8a..3216975 100644
--- a/drivers/staging/unisys/visorbus/vbusdeviceinfo.h
+++ b/drivers/staging/unisys/visorbus/vbusdeviceinfo.h
@@ -62,7 +62,7 @@ vbuschannel_sanitize_buffer(char *p, int remain, char *src, int srcmax)
p++;
remain--;
chars++;
- } else if (p == NULL) {
+ } else if (!p) {
chars++;
}
nonprintable_streak = 0;
@@ -72,7 +72,7 @@ vbuschannel_sanitize_buffer(char *p, int remain, char *src, int srcmax)
p++;
remain--;
chars++;
- } else if (p == NULL) {
+ } else if (!p) {
chars++;
}
} else {
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 04/15] staging: unisys: fix trailing comment in vbusdeviceinfo.h
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (2 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 03/15] staging: unisys: Fix NULL comparison vbusdeviceinfo.h Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 05/15] staging: unisys: fix comments in visorchipset Benjamin Romer
` (10 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
Fixes checkpatch trailing */ comment in vbusdeviceinfo.h
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visorbus/vbusdeviceinfo.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/unisys/visorbus/vbusdeviceinfo.h b/drivers/staging/unisys/visorbus/vbusdeviceinfo.h
index 3216975..abdab4a 100644
--- a/drivers/staging/unisys/visorbus/vbusdeviceinfo.h
+++ b/drivers/staging/unisys/visorbus/vbusdeviceinfo.h
@@ -124,7 +124,8 @@ vbuschannel_itoa(char *p, int remain, int num)
}
if (remain < digits) {
/* not enough room left at <p> to hold number, so fill with
- * '?' */
+ * '?'
+ */
for (i = 0; i < remain; i++, p++)
*p = '?';
return remain;
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 05/15] staging: unisys: fix comments in visorchipset
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (3 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 04/15] staging: unisys: fix trailing comment in vbusdeviceinfo.h Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 06/15] staging: unisys: fix spacing in visorchipset.c Benjamin Romer
` (9 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch fixes all the Block comments by using a trailing */
on a separate line
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visorbus/visorchipset.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 07594f4..fb56258 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -86,8 +86,8 @@ visorchipset_release(struct inode *inode, struct file *file)
*/
#define MIN_IDLE_SECONDS 10
static unsigned long poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
-static unsigned long most_recent_message_jiffies; /* when we got our last
- * controlvm message */
+/* when we got our last controlvm message */
+static unsigned long most_recent_message_jiffies;
static int visorbusregistered;
#define MAX_CHIPSET_EVENTS 2
@@ -120,7 +120,8 @@ static struct visorchannel *controlvm_channel;
struct visor_controlvm_payload_info {
u8 *ptr; /* pointer to base address of payload pool */
u64 offset; /* offset from beginning of controlvm
- * channel to beginning of payload * pool */
+ * channel to beginning of payload * pool
+ */
u32 bytes; /* number of bytes in payload pool */
};
@@ -184,7 +185,8 @@ struct putfile_request {
* - this list is added to when controlvm messages come in that supply
* file data
* - this list is removed from via the hotplug program that is actually
- * consuming these buffers to write as file data */
+ * consuming these buffers to write as file data
+ */
struct list_head input_buffer_list;
spinlock_t req_list_lock; /* lock for input_buffer_list */
@@ -788,13 +790,15 @@ chipset_init(struct controlvm_message *inmsg)
POSTCODE_LINUX_2(CHIPSET_INIT_EXIT_PC, POSTCODE_SEVERITY_INFO);
/* Set features to indicate we support parahotplug (if Command
- * also supports it). */
+ * also supports it).
+ */
features =
inmsg->cmd.init_chipset.
features & ULTRA_CHIPSET_FEATURE_PARA_HOTPLUG;
/* Set the "reply" bit so Command knows this is a
- * features-aware driver. */
+ * features-aware driver.
+ */
features |= ULTRA_CHIPSET_FEATURE_REPLY;
cleanup:
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 06/15] staging: unisys: fix spacing in visorchipset.c
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (4 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 05/15] staging: unisys: fix comments in visorchipset Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-12-01 5:33 ` Sudip Mukherjee
2015-11-30 19:46 ` [PATCH 07/15] staging: unisys: fix comparison to NULL " Benjamin Romer
` (8 subsequent siblings)
14 siblings, 1 reply; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch fixes the following checkpatch warning:
spaces preferred around that ‘*’ or ‘|’
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visorbus/visorchipset.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index fb56258..8347ccd 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -43,11 +43,10 @@
#define POLLJIFFIES_CONTROLVMCHANNEL_FAST 1
#define POLLJIFFIES_CONTROLVMCHANNEL_SLOW 100
-#define MAX_CONTROLVM_PAYLOAD_BYTES (1024*128)
+#define MAX_CONTROLVM_PAYLOAD_BYTES (1024 * 128)
#define VISORCHIPSET_MMAP_CONTROLCHANOFFSET 0x00000000
-
#define UNISYS_SPAR_LEAF_ID 0x40000000
/* The s-Par leaf ID returns "UnisysSpar64" encoded across ebx, ecx, edx */
@@ -379,7 +378,7 @@ parser_init_byte_stream(u64 addr, u32 bytes, bool local, bool *retry)
rc = NULL;
goto cleanup;
}
- ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY);
+ ctx = kzalloc(allocbytes, GFP_KERNEL | __GFP_NORETRY);
if (!ctx) {
if (retry)
*retry = true;
@@ -522,8 +521,8 @@ parser_string_get(struct parser_context *ctx)
}
if (value_length < 0) /* '\0' was not included in the length */
value_length = nscan;
- value = kmalloc(value_length + 1, GFP_KERNEL|__GFP_NORETRY);
- if (value == NULL)
+ value = kmalloc(value_length + 1, GFP_KERNEL | __GFP_NORETRY);
+ if (!value)
return NULL;
if (value_length > 0)
memcpy(value, pscan, value_length);
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 07/15] staging: unisys: fix comparison to NULL in visorchipset.c
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (5 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 06/15] staging: unisys: fix spacing in visorchipset.c Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 08/15] staging: unisys: fix blank lines " Benjamin Romer
` (7 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch fixes the following type of check patch warnings:
Comparison to NULL could be written
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visorbus/visorchipset.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 8347ccd..fdfd1c4 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -438,7 +438,7 @@ parser_id_get(struct parser_context *ctx)
{
struct spar_controlvm_parameters_header *phdr = NULL;
- if (ctx == NULL)
+ if (!ctx)
return NULL_UUID_LE;
phdr = (struct spar_controlvm_parameters_header *)(ctx->data);
return phdr->id;
@@ -461,7 +461,7 @@ parser_param_start(struct parser_context *ctx,
{
struct spar_controlvm_parameters_header *phdr = NULL;
- if (ctx == NULL)
+ if (!ctx)
goto Away;
phdr = (struct spar_controlvm_parameters_header *)(ctx->data);
switch (which_string) {
@@ -875,7 +875,7 @@ bus_responder(enum controlvm_id cmd_id,
struct controlvm_message_header *pending_msg_hdr,
int response)
{
- if (pending_msg_hdr == NULL)
+ if (!pending_msg_hdr)
return; /* no controlvm response needed */
if (pending_msg_hdr->id != (u32)cmd_id)
@@ -893,7 +893,7 @@ device_changestate_responder(enum controlvm_id cmd_id,
u32 bus_no = p->chipset_bus_no;
u32 dev_no = p->chipset_dev_no;
- if (p->pending_msg_hdr == NULL)
+ if (!p->pending_msg_hdr)
return; /* no controlvm response needed */
if (p->pending_msg_hdr->id != cmd_id)
return;
@@ -914,7 +914,7 @@ device_responder(enum controlvm_id cmd_id,
struct controlvm_message_header *pending_msg_hdr,
int response)
{
- if (pending_msg_hdr == NULL)
+ if (!pending_msg_hdr)
return; /* no controlvm response needed */
if (pending_msg_hdr->id != (u32)cmd_id)
@@ -1180,7 +1180,7 @@ bus_configure(struct controlvm_message *inmsg,
POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, bus_no,
POSTCODE_SEVERITY_ERR);
rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
- } else if (bus_info->pending_msg_hdr != NULL) {
+ } else if (bus_info->pending_msg_hdr) {
POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, bus_no,
POSTCODE_SEVERITY_ERR);
rc = -CONTROLVM_RESP_ERROR_MESSAGE_ID_INVALID_FOR_CLIENT;
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 08/15] staging: unisys: fix blank lines in visorchipset.c
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (6 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 07/15] staging: unisys: fix comparison to NULL " Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 09/15] staging: unisys: fix spaces after cast visorchipset.c Benjamin Romer
` (6 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: driverdev-devel, sparmaintainer, Erik Arfvidson, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
this patch removes the following checkpatch warnings:
please use a blank line after …
Please don’t use multiple blank lines
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visorbus/visorchipset.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index fdfd1c4..164fb7b 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -353,7 +353,6 @@ static void controlvm_respond_physdev_changestate(
struct controlvm_message_header *msg_hdr, int response,
struct spar_segment_state state);
-
static void parser_done(struct parser_context *ctx);
static struct parser_context *
@@ -530,7 +529,6 @@ parser_string_get(struct parser_context *ctx)
return value;
}
-
static ssize_t toolaction_show(struct device *dev,
struct device_attribute *attr,
char *buf)
@@ -707,6 +705,7 @@ static int match_visorbus_dev_by_id(struct device *dev, void *data)
return 0;
}
+
struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
struct visor_device *from)
{
--
2.5.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 09/15] staging: unisys: fix spaces after cast visorchipset.c
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (7 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 08/15] staging: unisys: fix blank lines " Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 10/15] staging: unisys: fix comments in visorbus_main.c Benjamin Romer
` (5 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch fixes checkpatch's no space is necessary after a cast
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visorbus/visorchipset.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 164fb7b..5535073 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -397,7 +397,7 @@ parser_init_byte_stream(u64 addr, u32 bytes, bool local, bool *retry)
rc = NULL;
goto cleanup;
}
- p = __va((unsigned long) (addr));
+ p = __va((unsigned long)(addr));
memcpy(ctx->data, p, bytes);
} else {
void *mapping;
@@ -525,7 +525,7 @@ parser_string_get(struct parser_context *ctx)
return NULL;
if (value_length > 0)
memcpy(value, pscan, value_length);
- ((u8 *) (value))[value_length] = '\0';
+ ((u8 *)(value))[value_length] = '\0';
return value;
}
@@ -815,7 +815,7 @@ controlvm_init_response(struct controlvm_message *msg,
msg->hdr.payload_max_bytes = 0;
if (response < 0) {
msg->hdr.flags.failed = 1;
- msg->hdr.completion_status = (u32) (-response);
+ msg->hdr.completion_status = (u32)(-response);
}
}
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 10/15] staging: unisys: fix comments in visorbus_main.c
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (8 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 09/15] staging: unisys: fix spaces after cast visorchipset.c Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 11/15] staging: unisys: fix block comments in ultrainputreport.h Benjamin Romer
` (4 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: driverdev-devel, sparmaintainer, Erik Arfvidson, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch fixes the following types of check patch warnings:
Block comments use a trailing */ on a separate line
Comment alignments
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visorbus/visorbus_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index eac97d2..a301385 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -1371,9 +1371,9 @@ pause_state_change_complete(struct visor_device *dev, int status)
return;
/* Notify the chipset driver that the pause is complete, which
- * will presumably want to send some sort of response to the
- * initiator.
- */
+ * will presumably want to send some sort of response to the
+ * initiator.
+ */
(*chipset_responders.device_pause) (dev, status);
}
--
2.5.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 11/15] staging: unisys: fix block comments in ultrainputreport.h
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (9 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 10/15] staging: unisys: fix comments in visorbus_main.c Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 12/15] staging: unisys: fix comments in visornic_main.c Benjamin Romer
` (3 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch fixes the following types of check patch warnings:
Block comments use * on subsequent lines
Block comments use a trailing */ on a separate line
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
.../staging/unisys/visorinput/ultrainputreport.h | 45 +++++++++++++---------
1 file changed, 26 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/unisys/visorinput/ultrainputreport.h b/drivers/staging/unisys/visorinput/ultrainputreport.h
index 3e6a52f..1bc3d20 100644
--- a/drivers/staging/unisys/visorinput/ultrainputreport.h
+++ b/drivers/staging/unisys/visorinput/ultrainputreport.h
@@ -29,33 +29,40 @@ enum ultra_inputaction {
inputaction_mouse_button_up = 3, /* arg1: 1=left,2=center,3=right */
inputaction_mouse_button_click = 4, /* arg1: 1=left,2=center,3=right */
inputaction_mouse_button_dclick = 5, /* arg1: 1=left,2=center,
- 3=right */
+ * 3=right
+ */
inputaction_wheel_rotate_away = 6, /* arg1: wheel rotation away from
- user */
+ * user
+ */
inputaction_wheel_rotate_toward = 7, /* arg1: wheel rotation toward
- user */
+ * user
+ */
inputaction_set_max_xy = 8, /* set screen maxXY; arg1=x, arg2=y */
inputaction_key_down = 64, /* arg1: scancode, as follows:
- If arg1 <= 0xff, it's a 1-byte
- scancode and arg1 is that scancode.
- If arg1 > 0xff, it's a 2-byte
- scanecode, with the 1st byte in the
- low 8 bits, and the 2nd byte in the
- high 8 bits. E.g., the right ALT key
- would appear as x'38e0'. */
+ * If arg1 <= 0xff, it's a 1-byte
+ * scancode and arg1 is that scancode.
+ * If arg1 > 0xff, it's a 2-byte
+ * scanecode, with the 1st byte in the
+ * low 8 bits, and the 2nd byte in the
+ * high 8 bits. E.g., the right ALT key
+ * would appear as x'38e0'.
+ */
inputaction_key_up = 65, /* arg1: scancode (in same format as
- inputaction_keyDown) */
+ * inputaction_keyDown)
+ */
inputaction_set_locking_key_state = 66,
/* arg1: scancode (in same format
- as inputaction_keyDown);
- MUST refer to one of the
- locking keys, like capslock,
- numlock, or scrolllock
- arg2: 1 iff locking key should be
- in the LOCKED position
- (e.g., light is ON) */
+ * as inputaction_keyDown);
+ * MUST refer to one of the
+ * locking keys, like capslock,
+ * numlock, or scrolllock
+ * arg2: 1 iff locking key should be
+ * in the LOCKED position
+ * (e.g., light is ON)
+ */
inputaction_key_down_up = 67, /* arg1: scancode (in same format
- as inputaction_keyDown) */
+ * as inputaction_keyDown)
+ */
inputaction_last
};
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 12/15] staging: unisys: fix comments in visornic_main.c
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (10 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 11/15] staging: unisys: fix block comments in ultrainputreport.h Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 13/15] staging: unisys: fix else statement " Benjamin Romer
` (2 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: driverdev-devel, sparmaintainer, Erik Arfvidson, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch fixes the following types of check patch warnings:
Block comments use * on subsequent lines
Block comments use a trailing */ on a separate line
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visornic/visornic_main.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 296b11c..d50dc4b 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1218,8 +1218,9 @@ visornic_rx(struct uiscmdrsp *cmdrsp)
/* length rcvd is greater than firstfrag in this skb rcv buf */
skb->tail += RCVPOST_BUF_SIZE; /* amount in skb->data */
skb->data_len = skb->len - RCVPOST_BUF_SIZE; /* amount that
- will be in
- frag_list */
+ * will be in
+ * frag_list
+ */
} else {
/* data fits in this skb - no chaining - do
* PRECAUTIONARY check
@@ -1315,12 +1316,14 @@ visornic_rx(struct uiscmdrsp *cmdrsp)
}
if (found_mc)
break; /* accept packet, dest
- matches a multicast
- address */
+ * matches a multicast
+ * address
+ */
}
} else if (skb->pkt_type == PACKET_HOST) {
break; /* accept packet, h_dest must match vnic
- mac address */
+ * mac address
+ */
} else if (skb->pkt_type == PACKET_OTHERHOST) {
/* something is not right */
dev_err(&devdata->netdev->dev,
@@ -1619,7 +1622,8 @@ service_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
struct net_device *netdev;
/* TODO: CLIENT ACQUIRE -- Don't really need this at the
- * moment */
+ * moment
+ */
for (;;) {
if (!visorchannel_signalremove(devdata->dev->visorchannel,
IOCHAN_FROM_IOPART,
--
2.5.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 13/15] staging: unisys: fix else statement in visornic_main.c
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (11 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 12/15] staging: unisys: fix comments in visornic_main.c Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-11-30 19:46 ` [PATCH 14/15] staging: unisys: fix alignment " Benjamin Romer
2015-11-30 19:46 ` [PATCH 15/15] staging: unisys: fix blank line " Benjamin Romer
14 siblings, 0 replies; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch fixes the following types of check patch warnings:
else is not generally useful after a break or return
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visornic/visornic_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index d50dc4b..0b305e5 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -376,8 +376,8 @@ visornic_serverdown(struct visornic_devdata *devdata,
__func__);
spin_unlock_irqrestore(&devdata->priv_lock, flags);
return -EINVAL;
- } else
- spin_unlock_irqrestore(&devdata->priv_lock, flags);
+ }
+ spin_unlock_irqrestore(&devdata->priv_lock, flags);
return 0;
}
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 14/15] staging: unisys: fix alignment in visornic_main.c
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (12 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 13/15] staging: unisys: fix else statement " Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-12-02 13:21 ` Dan Carpenter
2015-11-30 19:46 ` [PATCH 15/15] staging: unisys: fix blank line " Benjamin Romer
14 siblings, 1 reply; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch fixes the following types of check patch warnings:
Alignment should match open parenthesis
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visornic/visornic_main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 0b305e5..bf1fd93 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -437,8 +437,8 @@ post_skb(struct uiscmdrsp *cmdrsp,
cmdrsp->net.type = NET_RCV_POST;
cmdrsp->cmdtype = CMD_NET_TYPE;
if (visorchannel_signalinsert(devdata->dev->visorchannel,
- IOCHAN_TO_IOPART,
- cmdrsp)) {
+ IOCHAN_TO_IOPART,
+ cmdrsp)) {
atomic_inc(&devdata->num_rcvbuf_in_iovm);
devdata->chstat.sent_post++;
} else {
@@ -466,8 +466,8 @@ send_enbdis(struct net_device *netdev, int state,
devdata->cmdrsp_rcv->net.type = NET_RCV_ENBDIS;
devdata->cmdrsp_rcv->cmdtype = CMD_NET_TYPE;
if (visorchannel_signalinsert(devdata->dev->visorchannel,
- IOCHAN_TO_IOPART,
- devdata->cmdrsp_rcv))
+ IOCHAN_TO_IOPART,
+ devdata->cmdrsp_rcv))
devdata->chstat.sent_enbdis++;
}
@@ -1651,7 +1651,7 @@ service_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
* netif_wake_queue()
*/
if (vnic_hit_low_watermark(devdata,
- devdata->lower_threshold_net_xmits)) {
+ devdata->lower_threshold_net_xmits)) {
/* enough NET_XMITs completed
* so can restart netif queue
*/
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 15/15] staging: unisys: fix blank line in visornic_main.c
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
` (13 preceding siblings ...)
2015-11-30 19:46 ` [PATCH 14/15] staging: unisys: fix alignment " Benjamin Romer
@ 2015-11-30 19:46 ` Benjamin Romer
2015-12-01 5:52 ` Sudip Mukherjee
14 siblings, 1 reply; 20+ messages in thread
From: Benjamin Romer @ 2015-11-30 19:46 UTC (permalink / raw)
To: gregkh; +Cc: sparmaintainer, driverdev-devel, Benjamin Romer
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch fixes the following type of check patch warning:
Blank lines aren't necessary before a close brace '}'
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
drivers/staging/unisys/visornic/visornic_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index bf1fd93..77fd1ef 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1746,7 +1746,6 @@ poll_for_irq(unsigned long v)
atomic_set(&devdata->interrupt_rcvd, 0);
mod_timer(&devdata->irq_poll_timer, msecs_to_jiffies(2));
-
}
/**
--
2.5.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 06/15] staging: unisys: fix spacing in visorchipset.c
2015-11-30 19:46 ` [PATCH 06/15] staging: unisys: fix spacing in visorchipset.c Benjamin Romer
@ 2015-12-01 5:33 ` Sudip Mukherjee
0 siblings, 0 replies; 20+ messages in thread
From: Sudip Mukherjee @ 2015-12-01 5:33 UTC (permalink / raw)
To: Benjamin Romer; +Cc: gregkh, sparmaintainer, driverdev-devel
On Mon, Nov 30, 2015 at 02:46:06PM -0500, Benjamin Romer wrote:
> From: Erik Arfvidson <erik.arfvidson@unisys.com>
>
> This patch fixes the following checkpatch warning:
> spaces preferred around that ‘*’ or ‘|’
>
> Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
> ---
> drivers/staging/unisys/visorbus/visorchipset.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
<snip>
> @@ -522,8 +521,8 @@ parser_string_get(struct parser_context *ctx)
> }
> if (value_length < 0) /* '\0' was not included in the length */
> value_length = nscan;
> - value = kmalloc(value_length + 1, GFP_KERNEL|__GFP_NORETRY);
> - if (value == NULL)
> + value = kmalloc(value_length + 1, GFP_KERNEL | __GFP_NORETRY);
> + if (!value)
This should have been there in your 7/15 patch.
regards
sudip
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 15/15] staging: unisys: fix blank line in visornic_main.c
2015-11-30 19:46 ` [PATCH 15/15] staging: unisys: fix blank line " Benjamin Romer
@ 2015-12-01 5:52 ` Sudip Mukherjee
0 siblings, 0 replies; 20+ messages in thread
From: Sudip Mukherjee @ 2015-12-01 5:52 UTC (permalink / raw)
To: Benjamin Romer; +Cc: gregkh, sparmaintainer, driverdev-devel
On Mon, Nov 30, 2015 at 02:46:15PM -0500, Benjamin Romer wrote:
> From: Erik Arfvidson <erik.arfvidson@unisys.com>
>
> This patch fixes the following type of check patch warning:
> Blank lines aren't necessary before a close brace '}'
>
> Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
> ---
This has already been done by:
24069d287cba ("staging: unisys: visornic: Removed the blank line")
regards
sudip
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 14/15] staging: unisys: fix alignment in visornic_main.c
2015-11-30 19:46 ` [PATCH 14/15] staging: unisys: fix alignment " Benjamin Romer
@ 2015-12-02 13:21 ` Dan Carpenter
2015-12-03 15:02 ` Arfvidson, Erik
0 siblings, 1 reply; 20+ messages in thread
From: Dan Carpenter @ 2015-12-02 13:21 UTC (permalink / raw)
To: Benjamin Romer; +Cc: gregkh, sparmaintainer, driverdev-devel
On Mon, Nov 30, 2015 at 02:46:14PM -0500, Benjamin Romer wrote:
> @@ -1651,7 +1651,7 @@ service_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
> * netif_wake_queue()
> */
> if (vnic_hit_low_watermark(devdata,
> - devdata->lower_threshold_net_xmits)) {
> + devdata->lower_threshold_net_xmits)) {
The original was best. It is suggesting:
if (vnic_hit_low_watermark(devdata,
devdata->lower_threshold_net_xmits)) {
But that is over 80 chars.
regards,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 14/15] staging: unisys: fix alignment in visornic_main.c
2015-12-02 13:21 ` Dan Carpenter
@ 2015-12-03 15:02 ` Arfvidson, Erik
0 siblings, 0 replies; 20+ messages in thread
From: Arfvidson, Erik @ 2015-12-03 15:02 UTC (permalink / raw)
To: Dan Carpenter, Romer, Benjamin M
Cc: gregkh, *S-Par-Maintainer, driverdev-devel
On 12/2/15 8:22 AM, Dan Carpenter wrote:
> On Mon, Nov 30, 2015 at 02:46:14PM -0500, Benjamin Romer wrote:
>> @@ -1651,7 +1651,7 @@ service_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
>> * netif_wake_queue()
>> */
>> if (vnic_hit_low_watermark(devdata,
>> - devdata->lower_threshold_net_xmits)) {
>> + devdata->lower_threshold_net_xmits)) {
> The original was best. It is suggesting:
>
> if (vnic_hit_low_watermark(devdata,
> devdata->lower_threshold_net_xmits)) {
>
> But that is over 80 chars.
>
> regards,
> dan carpenter
>
>
Thanks,
Must have missed it.
Cheers,
Erik A
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2015-12-03 15:02 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 19:46 [PATCH 00/15] staging: unisys: checkpatch cleanup series Benjamin Romer
2015-11-30 19:46 ` [PATCH 01/15] staging: unisys: Fix guestlinuxdebug.h comments Benjamin Romer
2015-11-30 19:46 ` [PATCH 02/15] staging: unisys: fix comments for controlvmchannel.h Benjamin Romer
2015-11-30 19:46 ` [PATCH 03/15] staging: unisys: Fix NULL comparison vbusdeviceinfo.h Benjamin Romer
2015-11-30 19:46 ` [PATCH 04/15] staging: unisys: fix trailing comment in vbusdeviceinfo.h Benjamin Romer
2015-11-30 19:46 ` [PATCH 05/15] staging: unisys: fix comments in visorchipset Benjamin Romer
2015-11-30 19:46 ` [PATCH 06/15] staging: unisys: fix spacing in visorchipset.c Benjamin Romer
2015-12-01 5:33 ` Sudip Mukherjee
2015-11-30 19:46 ` [PATCH 07/15] staging: unisys: fix comparison to NULL " Benjamin Romer
2015-11-30 19:46 ` [PATCH 08/15] staging: unisys: fix blank lines " Benjamin Romer
2015-11-30 19:46 ` [PATCH 09/15] staging: unisys: fix spaces after cast visorchipset.c Benjamin Romer
2015-11-30 19:46 ` [PATCH 10/15] staging: unisys: fix comments in visorbus_main.c Benjamin Romer
2015-11-30 19:46 ` [PATCH 11/15] staging: unisys: fix block comments in ultrainputreport.h Benjamin Romer
2015-11-30 19:46 ` [PATCH 12/15] staging: unisys: fix comments in visornic_main.c Benjamin Romer
2015-11-30 19:46 ` [PATCH 13/15] staging: unisys: fix else statement " Benjamin Romer
2015-11-30 19:46 ` [PATCH 14/15] staging: unisys: fix alignment " Benjamin Romer
2015-12-02 13:21 ` Dan Carpenter
2015-12-03 15:02 ` Arfvidson, Erik
2015-11-30 19:46 ` [PATCH 15/15] staging: unisys: fix blank line " Benjamin Romer
2015-12-01 5:52 ` Sudip Mukherjee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.