[PATCH] staging: vt6655: channel.c: Fix block comments usage warning by checkpatch.pl
This patch fixes the following checkpatch.pl warnings: WARNING: Block comments use * on subsequent lines + /* TX_PE will reserve 3 us for MAX2829 A mode only, + it is for better TX throughput */ WARNING: Block comments use a trailing */ on a separate line + it is for better TX throughput */ Signed-off-by: Anson Jacob --- drivers/staging/vt6655/channel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c index b7d43a5..029a8df 100644 --- a/drivers/staging/vt6655/channel.c +++ b/drivers/staging/vt6655/channel.c @@ -193,7 +193,8 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch) MACvRegBitsOn(priv->PortOffset, MAC_REG_MACCR, MACCR_CLRNAV); /* TX_PE will reserve 3 us for MAX2829 A mode only, - it is for better TX throughput */ +* it is for better TX throughput +*/ if (priv->byRFType == RF_AIROHA7230) RFbAL7230SelectChannelPostProcess(priv, priv->byCurrentCh, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6655: Fix checkpatch warning
Fix warning by checkpatch.pl Add * for block comments on subsequent lines Signed-off-by: Anson Jacob --- drivers/staging/vt6655/device_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 4941640..ed12b5c 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -113,10 +113,10 @@ DEVICE_PARAM(ShortRetryLimit, "Short frame retry limits"); DEVICE_PARAM(LongRetryLimit, "long frame retry limits"); /* BasebandType[] baseband type selected - 0: indicate 802.11a type - 1: indicate 802.11b type - 2: indicate 802.11g type -*/ + * 0: indicate 802.11a type + * 1: indicate 802.11b type + * 2: indicate 802.11g type + */ #define BBP_TYPE_MIN 0 #define BBP_TYPE_MAX 2 #define BBP_TYPE_DEF 2 -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6655: power.c: Fix checkpatch warning
Fix checkpatch.pl warning for trailing */ on a separate line Remove '+' postfix and '-' prefix from the start and end of block comments Signed-off-by: Anson Jacob --- drivers/staging/vt6655/power.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index bc8ca98..7d6e746 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -52,7 +52,7 @@ /*- Export Functions --*/ -/*+ +/* * * Routine Description: * Enable hw power saving functions @@ -60,7 +60,7 @@ * Return Value: *None. * - -*/ + */ void PSvEnablePowerSaving( @@ -104,7 +104,7 @@ PSvEnablePowerSaving( pr_debug("PS:Power Saving Mode Enable...\n"); } -/*+ +/* * * Routine Description: * Disable hw power saving functions @@ -112,7 +112,7 @@ PSvEnablePowerSaving( * Return Value: *None. * - -*/ + */ void PSvDisablePowerSaving( @@ -134,7 +134,7 @@ PSvDisablePowerSaving( } -/*+ +/* * * Routine Description: * Check if Next TBTT must wake up @@ -142,7 +142,7 @@ PSvDisablePowerSaving( * Return Value: *None. * - -*/ + */ bool PSbIsNextTBTTWakeUp( -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6655: channel.c: Fix block comments usage warning by checkpatch.pl
This patch fixes the following checkpatch.pl warnings: WARNING: Block comments use * on subsequent lines + /* TX_PE will reserve 3 us for MAX2829 A mode only, + it is for better TX throughput */ WARNING: Block comments use a trailing */ on a separate line + it is for better TX throughput */ Signed-off-by: Anson Jacob --- drivers/staging/vt6655/channel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c index b7d43a5..029a8df 100644 --- a/drivers/staging/vt6655/channel.c +++ b/drivers/staging/vt6655/channel.c @@ -193,7 +193,8 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch) MACvRegBitsOn(priv->PortOffset, MAC_REG_MACCR, MACCR_CLRNAV); /* TX_PE will reserve 3 us for MAX2829 A mode only, - it is for better TX throughput */ +* it is for better TX throughput +*/ if (priv->byRFType == RF_AIROHA7230) RFbAL7230SelectChannelPostProcess(priv, priv->byCurrentCh, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6655: device_main.c: Fix checkpatch warning
Fix warning by checkpatch.pl Add * for block comments on subsequent lines Signed-off-by: Anson Jacob --- drivers/staging/vt6655/device_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 4941640..ed12b5c 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -113,10 +113,10 @@ DEVICE_PARAM(ShortRetryLimit, "Short frame retry limits"); DEVICE_PARAM(LongRetryLimit, "long frame retry limits"); /* BasebandType[] baseband type selected - 0: indicate 802.11a type - 1: indicate 802.11b type - 2: indicate 802.11g type -*/ + * 0: indicate 802.11a type + * 1: indicate 802.11b type + * 2: indicate 802.11g type + */ #define BBP_TYPE_MIN 0 #define BBP_TYPE_MAX 2 #define BBP_TYPE_DEF 2 -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6655: power.c: Fix checkpatch warning
Fix checkpatch.pl warning for trailing */ on a separate line Remove '+' postfix and '-' prefix from the start and end of block comments Signed-off-by: Anson Jacob --- drivers/staging/vt6655/power.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index bc8ca98..7d6e746 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -52,7 +52,7 @@ /*- Export Functions --*/ -/*+ +/* * * Routine Description: * Enable hw power saving functions @@ -60,7 +60,7 @@ * Return Value: *None. * - -*/ + */ void PSvEnablePowerSaving( @@ -104,7 +104,7 @@ PSvEnablePowerSaving( pr_debug("PS:Power Saving Mode Enable...\n"); } -/*+ +/* * * Routine Description: * Disable hw power saving functions @@ -112,7 +112,7 @@ PSvEnablePowerSaving( * Return Value: *None. * - -*/ + */ void PSvDisablePowerSaving( @@ -134,7 +134,7 @@ PSvDisablePowerSaving( } -/*+ +/* * * Routine Description: * Check if Next TBTT must wake up @@ -142,7 +142,7 @@ PSvDisablePowerSaving( * Return Value: *None. * - -*/ + */ bool PSbIsNextTBTTWakeUp( -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: dgnc: fix 'line over 80 characters'
fix checkpatch.pl warning about 'line over 80 characters'. Signed-off-by: Anson Jacob --- drivers/staging/dgnc/dgnc_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h index 3092abe..88d2696 100644 --- a/drivers/staging/dgnc/dgnc_driver.h +++ b/drivers/staging/dgnc/dgnc_driver.h @@ -390,7 +390,7 @@ extern uint dgnc_major; /* Our driver/mgmt major */ extern int dgnc_poll_tick; /* Poll interval - 20 ms */ extern spinlock_t dgnc_global_lock; /* Driver global spinlock */ extern spinlock_t dgnc_poll_lock; /* Poll scheduling lock */ -extern uintdgnc_num_boards;/* Total number of boards */ +extern uintdgnc_num_boards;/* Total number of boards */ extern struct dgnc_board *dgnc_board[MAXBOARDS]; /* Array of board * structs */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: fix checkpatch error
convert spaces to tab fix the following error messages from checkpatch.pl ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line Signed-off-by: Anson Jacob --- drivers/staging/lustre/lustre/include/cl_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h index 3cd4a25..80c13c9 100644 --- a/drivers/staging/lustre/lustre/include/cl_object.h +++ b/drivers/staging/lustre/lustre/include/cl_object.h @@ -2354,7 +2354,7 @@ struct cl_client_cache { * Waitq for awaiting unstable pages to reach zero. * Used at umounting time and signaled on BRW commit */ -wait_queue_head_t ccc_unstable_waitq; + wait_queue_head_t ccc_unstable_waitq; }; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: fix bare use of 'unsigned'
fix checkpatch.pl warning Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Anson Jacob --- drivers/staging/lustre/lustre/include/cl_object.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h index 3cd4a25..db910ea 100644 --- a/drivers/staging/lustre/lustre/include/cl_object.h +++ b/drivers/staging/lustre/lustre/include/cl_object.h @@ -367,7 +367,7 @@ struct cl_object_operations { * cl_object_operations::coo_attr_get() is used. */ int (*coo_attr_set)(const struct lu_env *env, struct cl_object *obj, - const struct cl_attr *attr, unsigned valid); + const struct cl_attr *attr, unsigned int valid); /** * Update object configuration. Called top-to-bottom to modify object * configuration. @@ -757,7 +757,7 @@ struct cl_page { /** Link to a queue, for debugging. */ struct lu_ref_link cp_queue_ref; /** Per-page flags from enum cl_page_flags. Protected by a VM lock. */ - unsigned cp_flags; + unsigned int cp_flags; /** Assigned if doing a sync_io */ struct cl_sync_io *cp_sync_io; }; @@ -1316,7 +1316,7 @@ do { \ * @{ */ struct cl_page_list { - unsigned pl_nr; + unsigned int pl_nr; struct list_head pl_pages; struct task_struct *pl_owner; }; @@ -1834,7 +1834,7 @@ struct cl_io { /** * Number of pages owned by this IO. For invariant checking. */ - unsigned ci_owned_nr; + unsigned int ci_owned_nr; }; /** @} cl_io */ @@ -1992,11 +1992,11 @@ struct cl_req { /** A list of pages being transferred */ struct list_headcrq_pages; /** Number of pages in cl_req::crq_pages */ - unsigned crq_nrpages; + unsigned int crq_nrpages; /** An array of objects which pages are in ->crq_pages */ struct cl_req_obj*crq_o; /** Number of elements in cl_req::crq_objs[] */ - unsigned crq_nrobjs; + unsigned int crq_nrobjs; struct list_headcrq_layers; }; @@ -2177,7 +2177,7 @@ void cl_object_attr_unlock(struct cl_object *o); int cl_object_attr_get(const struct lu_env *env, struct cl_object *obj, struct cl_attr *attr); int cl_object_attr_set(const struct lu_env *env, struct cl_object *obj, - const struct cl_attr *attr, unsigned valid); + const struct cl_attr *attr, unsigned int valid); int cl_object_glimpse(const struct lu_env *env, struct cl_object *obj, struct ost_lvb *lvb); int cl_conf_set(const struct lu_env *env, struct cl_object *obj, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/2] staging: vt6655: fix checkpatch warning for trailing */ on a separate line
*** BLURB HERE *** Anson Jacob (2): staging: vt6655: rf.c: Fix checkpatch warning staging: vt6655: rxtx.c: Fix checkpatch warning drivers/staging/vt6655/rf.c | 19 --- drivers/staging/vt6655/rxtx.c | 41 - 2 files changed, 36 insertions(+), 24 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: vt6655: rf.c: Fix checkpatch warning
Fix checkpatch.pl warning for trailing */ on a separate line Remove '+' postfix and '-' prefix from the start and end of block comments Signed-off-by: Anson Jacob --- drivers/staging/vt6655/rf.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c index ae10da2..447882c 100644 --- a/drivers/staging/vt6655/rf.c +++ b/drivers/staging/vt6655/rf.c @@ -169,7 +169,8 @@ static unsigned long dwAL2230PowerTable[AL2230_PWR_IDX_LEN] = { }; /* 40MHz reference frequency - * Need to Pull PLLON(PE3) low when writing channel registers through 3-wire.*/ + * Need to Pull PLLON(PE3) low when writing channel registers through 3-wire. + */ static const unsigned long dwAL7230InitTable[CB_AL7230_INIT_SEQ] = { 0x00379000+(BY_AL7230_REG_LEN<<3)+IFREGCTL_REGW, /* Channel1 // Need modify for 11a */ 0x1100+(BY_AL7230_REG_LEN<<3)+IFREGCTL_REGW, /* Channel1 // Need modify for 11a */ @@ -463,7 +464,8 @@ static bool s_bAL7230Init(struct vnt_private *priv) } /* Need to Pull PLLON low when writing channel registers through - * 3-wire interface */ + * 3-wire interface + */ static bool s_bAL7230SelectChannel(struct vnt_private *priv, unsigned char byChannel) { void __iomem *dwIoBase = priv->PortOffset; @@ -873,7 +875,8 @@ bool RFbRawSetPower( case RF_AIROHA7230: /* 0x080F1B00 for 3 wire control TxGain(D10) -* and 0x31 as TX Gain value */ +* and 0x31 as TX Gain value +*/ dwMax7230Pwr = 0x080C0B00 | ((byPwr) << 12) | (BY_AL7230_REG_LEN << 3) | IFREGCTL_REGW; @@ -886,7 +889,7 @@ bool RFbRawSetPower( return ret; } -/*+ +/* * * Routine Description: * Translate RSSI to dBm @@ -900,7 +903,7 @@ bool RFbRawSetPower( * * Return Value: none * - -*/ + */ void RFvRSSITodBm( struct vnt_private *priv, @@ -927,7 +930,8 @@ RFvRSSITodBm( } /* Post processing for the 11b/g and 11a. - * for save time on changing Reg2,3,5,7,10,12,15 */ + * for save time on changing Reg2,3,5,7,10,12,15 + */ bool RFbAL7230SelectChannelPostProcess(struct vnt_private *priv, u16 byOldChannel, u16 byNewChannel) @@ -938,7 +942,8 @@ bool RFbAL7230SelectChannelPostProcess(struct vnt_private *priv, /* if change between 11 b/g and 11a need to update the following * register -* Channel Index 1~14 */ +* Channel Index 1~14 +*/ if ((byOldChannel <= CB_MAX_CHANNEL_24G) && (byNewChannel > CB_MAX_CHANNEL_24G)) { /* Change from 2.4G to 5G [Reg] */ ret &= IFRFbWriteEmbedded(priv, dwAL7230InitTableAMode[2]); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: vt6655: rxtx.c: Fix checkpatch warning
Fix checkpatch.pl warning for trailing */ on a separate line Remove '+' postfix and '-' prefix from the start and end of block comments Signed-off-by: Anson Jacob --- drivers/staging/vt6655/rxtx.c | 41 - 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index e4c3165..890d108 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -64,8 +64,10 @@ /*- Static Functions --*/ /*- Static Definitions -*/ -#define CRITICAL_PACKET_LEN 256/* if packet size < 256 -> in-direct send -packet size >= 256 -> direct send */ +/* if packet size < 256 -> in-direct send + * vpacket size >= 256 -> direct send + */ +#define CRITICAL_PACKET_LEN 256 static const unsigned short wTimeStampOff[2][MAX_RATE] = { {384, 288, 226, 209, 54, 43, 37, 31, 28, 25, 24, 23}, /* Long Preamble */ @@ -158,11 +160,11 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate) [rate % MAX_RATE]); } -/*byPktType : PK_TYPE_11A 0 - PK_TYPE_11B 1 - PK_TYPE_11GB2 - PK_TYPE_11GA3 -*/ +/* byPktType : PK_TYPE_11A 0 + * PK_TYPE_11B 1 + * PK_TYPE_11GB2 + * PK_TYPE_11GA3 + */ static unsigned int s_uGetTxRsvTime( @@ -650,13 +652,16 @@ s_vFillRTSHead( return; if (bDisCRC) { - /* When CRCDIS bit is on, H/W forgot to generate FCS for RTS frame, -in this case we need to decrease its length by 4. */ + /* When CRCDIS bit is on, H/W forgot to generate FCS for +* RTS frame, in this case we need to decrease its length by 4. +*/ uRTSFrameLen -= 4; } - /* Note: So far RTSHead doesn't appear in ATIM & Beacom DMA, so we don't need to take them into account. - Otherwise, we need to modify codes for them. */ + /* Note: So far RTSHead doesn't appear in ATIM & Beacom DMA, +* so we don't need to take them into account. +* Otherwise, we need to modify codes for them. +*/ if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { if (byFBOption == AUTO_FB_NONE) { struct vnt_rts_g *buf = pvRTS; @@ -842,8 +847,9 @@ s_vFillCTSHead( return; if (bDisCRC) { - /* When CRCDIS bit is on, H/W forgot to generate FCS for CTS frame, -in this case we need to decrease its length by 4. */ + /* When CRCDIS bit is on, H/W forgot to generate FCS for +* CTS frame, in this case we need to decrease its length by 4. +*/ uCTSFrameLen -= 4; } @@ -915,7 +921,7 @@ s_vFillCTSHead( } } -/*+ +/* * * Description: * Generate FIFO control for MAC & Baseband controller @@ -937,7 +943,8 @@ s_vFillCTSHead( * Return Value: none * - - * unsigned int cbFrameSize, Hdr+Payload+FCS */ + * unsigned int cbFrameSize, Hdr+Payload+FCS + */ static void s_vGenerateTxParameter( @@ -972,8 +979,8 @@ s_vGenerateTxParameter( return; if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { - if (pvRTS != NULL) { /* RTS_need -Fill RsvTime */ + if (pvRTS != NULL) { /* RTS_need */ + /* Fill RsvTime */ struct vnt_rrv_time_rts *buf = pvRrvTime; buf->rts_rrv_time_aa = s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6656: usbpipe.c: Fix checkpatch warning
Fix checkpatch.pl warning for line over 80 characters Signed-off-by: Anson Jacob --- drivers/staging/vt6656/usbpipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index f546553..e9b6b21 100644 --- a/drivers/staging/vt6656/usbpipe.c +++ b/drivers/staging/vt6656/usbpipe.c @@ -28,8 +28,9 @@ * vnt_control_in_u8 - Read one byte from MEM/BB/MAC/EEPROM * * Revision History: - * 04-05-2004 Jerry Chen: Initial release - * 11-24-2004 Warren Hsu: Add ControlvWriteByte,ControlvReadByte,ControlvMaskByte + * 04-05-2004 Jerry Chen: Initial release + * 11-24-2004 Warren Hsu: Add ControlvWriteByte,ControlvReadByte, + * ControlvMaskByte * */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 0/2] staging: vt6655: fix checkpatch warning for trailing */ on a separate line
Fix checkpatch.pl warning for trailing */ on a separate line Remove '+' postfix and '-' prefix from the start and end of block comments Anson Jacob (2): staging: vt6655: rf.c: Fix checkpatch warning staging: vt6655: rxtx.c: Fix checkpatch warning drivers/staging/vt6655/rf.c | 19 --- drivers/staging/vt6655/rxtx.c | 41 - 2 files changed, 36 insertions(+), 24 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/2] staging: vt6655: rf.c: Fix checkpatch warning
Fix checkpatch.pl warning for trailing */ on a separate line Remove '+' postfix and '-' prefix from the start and end of block comments Signed-off-by: Anson Jacob --- drivers/staging/vt6655/rf.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c index ae10da2..447882c 100644 --- a/drivers/staging/vt6655/rf.c +++ b/drivers/staging/vt6655/rf.c @@ -169,7 +169,8 @@ static unsigned long dwAL2230PowerTable[AL2230_PWR_IDX_LEN] = { }; /* 40MHz reference frequency - * Need to Pull PLLON(PE3) low when writing channel registers through 3-wire.*/ + * Need to Pull PLLON(PE3) low when writing channel registers through 3-wire. + */ static const unsigned long dwAL7230InitTable[CB_AL7230_INIT_SEQ] = { 0x00379000+(BY_AL7230_REG_LEN<<3)+IFREGCTL_REGW, /* Channel1 // Need modify for 11a */ 0x1100+(BY_AL7230_REG_LEN<<3)+IFREGCTL_REGW, /* Channel1 // Need modify for 11a */ @@ -463,7 +464,8 @@ static bool s_bAL7230Init(struct vnt_private *priv) } /* Need to Pull PLLON low when writing channel registers through - * 3-wire interface */ + * 3-wire interface + */ static bool s_bAL7230SelectChannel(struct vnt_private *priv, unsigned char byChannel) { void __iomem *dwIoBase = priv->PortOffset; @@ -873,7 +875,8 @@ bool RFbRawSetPower( case RF_AIROHA7230: /* 0x080F1B00 for 3 wire control TxGain(D10) -* and 0x31 as TX Gain value */ +* and 0x31 as TX Gain value +*/ dwMax7230Pwr = 0x080C0B00 | ((byPwr) << 12) | (BY_AL7230_REG_LEN << 3) | IFREGCTL_REGW; @@ -886,7 +889,7 @@ bool RFbRawSetPower( return ret; } -/*+ +/* * * Routine Description: * Translate RSSI to dBm @@ -900,7 +903,7 @@ bool RFbRawSetPower( * * Return Value: none * - -*/ + */ void RFvRSSITodBm( struct vnt_private *priv, @@ -927,7 +930,8 @@ RFvRSSITodBm( } /* Post processing for the 11b/g and 11a. - * for save time on changing Reg2,3,5,7,10,12,15 */ + * for save time on changing Reg2,3,5,7,10,12,15 + */ bool RFbAL7230SelectChannelPostProcess(struct vnt_private *priv, u16 byOldChannel, u16 byNewChannel) @@ -938,7 +942,8 @@ bool RFbAL7230SelectChannelPostProcess(struct vnt_private *priv, /* if change between 11 b/g and 11a need to update the following * register -* Channel Index 1~14 */ +* Channel Index 1~14 +*/ if ((byOldChannel <= CB_MAX_CHANNEL_24G) && (byNewChannel > CB_MAX_CHANNEL_24G)) { /* Change from 2.4G to 5G [Reg] */ ret &= IFRFbWriteEmbedded(priv, dwAL7230InitTableAMode[2]); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 2/2] staging: vt6655: rxtx.c: Fix checkpatch warning
Fix checkpatch.pl warning for trailing */ on a separate line Remove '+' postfix and '-' prefix from the start and end of block comments Signed-off-by: Anson Jacob --- drivers/staging/vt6655/rxtx.c | 41 - 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index e4c3165..890d108 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -64,8 +64,10 @@ /*- Static Functions --*/ /*- Static Definitions -*/ -#define CRITICAL_PACKET_LEN 256/* if packet size < 256 -> in-direct send -packet size >= 256 -> direct send */ +/* if packet size < 256 -> in-direct send + * vpacket size >= 256 -> direct send + */ +#define CRITICAL_PACKET_LEN 256 static const unsigned short wTimeStampOff[2][MAX_RATE] = { {384, 288, 226, 209, 54, 43, 37, 31, 28, 25, 24, 23}, /* Long Preamble */ @@ -158,11 +160,11 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate) [rate % MAX_RATE]); } -/*byPktType : PK_TYPE_11A 0 - PK_TYPE_11B 1 - PK_TYPE_11GB2 - PK_TYPE_11GA3 -*/ +/* byPktType : PK_TYPE_11A 0 + * PK_TYPE_11B 1 + * PK_TYPE_11GB2 + * PK_TYPE_11GA3 + */ static unsigned int s_uGetTxRsvTime( @@ -650,13 +652,16 @@ s_vFillRTSHead( return; if (bDisCRC) { - /* When CRCDIS bit is on, H/W forgot to generate FCS for RTS frame, -in this case we need to decrease its length by 4. */ + /* When CRCDIS bit is on, H/W forgot to generate FCS for +* RTS frame, in this case we need to decrease its length by 4. +*/ uRTSFrameLen -= 4; } - /* Note: So far RTSHead doesn't appear in ATIM & Beacom DMA, so we don't need to take them into account. - Otherwise, we need to modify codes for them. */ + /* Note: So far RTSHead doesn't appear in ATIM & Beacom DMA, +* so we don't need to take them into account. +* Otherwise, we need to modify codes for them. +*/ if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { if (byFBOption == AUTO_FB_NONE) { struct vnt_rts_g *buf = pvRTS; @@ -842,8 +847,9 @@ s_vFillCTSHead( return; if (bDisCRC) { - /* When CRCDIS bit is on, H/W forgot to generate FCS for CTS frame, -in this case we need to decrease its length by 4. */ + /* When CRCDIS bit is on, H/W forgot to generate FCS for +* CTS frame, in this case we need to decrease its length by 4. +*/ uCTSFrameLen -= 4; } @@ -915,7 +921,7 @@ s_vFillCTSHead( } } -/*+ +/* * * Description: * Generate FIFO control for MAC & Baseband controller @@ -937,7 +943,8 @@ s_vFillCTSHead( * Return Value: none * - - * unsigned int cbFrameSize, Hdr+Payload+FCS */ + * unsigned int cbFrameSize, Hdr+Payload+FCS + */ static void s_vGenerateTxParameter( @@ -972,8 +979,8 @@ s_vGenerateTxParameter( return; if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { - if (pvRTS != NULL) { /* RTS_need -Fill RsvTime */ + if (pvRTS != NULL) { /* RTS_need */ + /* Fill RsvTime */ struct vnt_rrv_time_rts *buf = pvRrvTime; buf->rts_rrv_time_aa = s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/2] staging: vt6655: fix checkpatch warning for trailing */ on a separate line
On Mon, Aug 22, 2016 at 04:36:26PM -0400, Greg Kroah-Hartman wrote: > On Mon, Aug 22, 2016 at 12:54:12PM -0400, Anson Jacob wrote: > > *** BLURB HERE *** > > You forgot the blurb :) > Sorry about that. Uploaded a new patchset with blurb :) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: android: lowmemorykiller.c: Fix checkpatch warning
Fix checkpatch.pl 'line over 80 characters' warning Signed-off-by: Anson Jacob --- drivers/staging/android/lowmemorykiller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index 45a1b4e..80d7adf 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -92,8 +92,8 @@ static unsigned long lowmem_scan(struct shrinker *s, struct shrink_control *sc) int array_size = ARRAY_SIZE(lowmem_adj); int other_free = global_page_state(NR_FREE_PAGES) - totalreserve_pages; int other_file = global_node_page_state(NR_FILE_PAGES) - - global_node_page_state(NR_SHMEM) - - total_swapcache_pages(); + global_node_page_state(NR_SHMEM) - + total_swapcache_pages(); if (lowmem_adj_size < array_size) array_size = lowmem_adj_size; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/6] staging: comedi: cb_pcidas64.c: Fix checkpatch warning
Fix checkpath.pl warning: line over 80 characters Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Statements should start on a tabstop Comparisons should place the constant on the right side of the test Anson Jacob (6): staging: comedi: cb_pcidas64.c: Fix checkpatch warning staging: comedi: jr3_pci.h: Fix checkpatch warning staging: comedi: ni_atmio.c: Fix checkpatch warning staging: comedi: s626.h: Fix checkpatch warning staging: comedi: jr3_pci.c: Fix checkpatch warning staging: comedi: ni_at_a2150.c: Fix checkpatch warning drivers/staging/comedi/drivers/cb_pcidas64.c | 105 ++- drivers/staging/comedi/drivers/jr3_pci.c | 3 +- drivers/staging/comedi/drivers/jr3_pci.h | 13 ++-- drivers/staging/comedi/drivers/ni_at_a2150.c | 82 - drivers/staging/comedi/drivers/ni_atmio.c| 4 +- drivers/staging/comedi/drivers/s626.h| 2 +- 6 files changed, 113 insertions(+), 96 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/6] staging: comedi: cb_pcidas64.c: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/cb_pcidas64.c | 105 ++- 1 file changed, 55 insertions(+), 50 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index aae839e..29725c5 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -1,34 +1,34 @@ /* -comedi/drivers/cb_pcidas64.c -This is a driver for the ComputerBoards/MeasurementComputing PCI-DAS -64xx, 60xx, and 4020 cards. - -Author: Frank Mori Hess -Copyright (C) 2001, 2002 Frank Mori Hess - -Thanks also go to the following people: - -Steve Rosenbluth, for providing the source code for -his pci-das6402 driver, and source code for working QNX pci-6402 -drivers by Greg Laird and Mariusz Bogacz. None of the code was -used directly here, but it was useful as an additional source of -documentation on how to program the boards. - -John Sims, for much testing and feedback on pcidas-4020 support. - -COMEDI - Linux Control and Measurement Device Interface -Copyright (C) 1997-8 David A. Schleef - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -*/ + * comedi/drivers/cb_pcidas64.c + * This is a driver for the ComputerBoards/MeasurementComputing PCI-DAS + * 64xx, 60xx, and 4020 cards. + * + * Author: Frank Mori Hess + * Copyright (C) 2001, 2002 Frank Mori Hess + * + * Thanks also go to the following people: + * + * Steve Rosenbluth, for providing the source code for + * his pci-das6402 driver, and source code for working QNX pci-6402 + * drivers by Greg Laird and Mariusz Bogacz. None of the code was + * used directly here, but it was useful as an additional source of + * documentation on how to program the boards. + * + * John Sims, for much testing and feedback on pcidas-4020 support. + * + * COMEDI - Linux Control and Measurement Device Interface + * Copyright (C) 1997-8 David A. Schleef + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ /* * Driver: cb_pcidas64 @@ -66,19 +66,18 @@ */ /* - -TODO: - make it return error if user attempts an ai command that uses the - external queue, and an ao command simultaneously user counter subdevice - there are a number of boards this driver will support when they are - fully released, but does not yet since the pci device id numbers - are not yet available. - - support prescaled 100khz clock for slow pacing (not available on 6000 - series?) - - make ao fifo size adjustable like ai fifo -*/ + * TODO: + * make it return error if user attempts an ai command that uses the + * external queue, and an ao command simultaneously user counter subdevice + * there are a number of boards this driver will support when they are + * fully released, but does not yet since the pci device id numbers + * are not yet available. + * + * support prescaled 100khz clock for slow pacing (not available on 6000 + * series?) + * + * make ao fifo size adjustable like ai fifo + */ #include #include @@ -91,11 +90,12 @@ TODO: #define TIMER_BASE 25 /* 40MHz master clock */ /* 100kHz 'prescaled' clock for slow acquisition, - * maybe I'll support this someday */ + * maybe I'll support this someday + */ #define PRESCALED_TIMER_BASE 1 #define DMA_BUFFER_SIZE 0x1000 -/* maximum value that can be loaded into board's 24-bit counters*/ +/* maximum value that can be loaded into board's 24-bit counters */ static const int max_counter_value = 0xff; /* PCI-DAS64xxx base addresses */ @@ -216,7 +216,8 @@ enum hw_config_contents { /* use 225 nanosec strobe when loading dac instead of 50 nanosec */ SLOW_DAC_BIT = 0x400, /* bit with unknown function yet given as default value in pci-das64 -* manual */ +* manual +*/
[PATCH 3/6] staging: comedi: ni_atmio.c: Fix checkpatch warning
Fix checkpatch.pl warning for 'Statements should start on a tabstop' Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/ni_atmio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c index 162a000..27ed117 100644 --- a/drivers/staging/comedi/drivers/ni_atmio.c +++ b/drivers/staging/comedi/drivers/ni_atmio.c @@ -278,10 +278,10 @@ static const struct ni_board_struct *ni_atmio_probe(struct comedi_device *dev) } if (device_id == 255) dev_err(dev->class_dev, "can't find board\n"); -else if (device_id == 0) + else if (device_id == 0) dev_err(dev->class_dev, "EEPROM read error (?) or device not found\n"); -else + else dev_err(dev->class_dev, "unknown device ID %d -- contact author\n", device_id); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] staging: comedi: s626.h: Fix checkpatch warning
Fix checkpatch.pl warning for Comparisons should place the constant on the right side of the test Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/s626.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/s626.h b/drivers/staging/comedi/drivers/s626.h index 6a00a64..95f8359 100644 --- a/drivers/staging/comedi/drivers/s626.h +++ b/drivers/staging/comedi/drivers/s626.h @@ -329,7 +329,7 @@ * WS1-WS4 = CS* outputs. */ -#if S626_PLATFORM == S626_INTEL/* +#if (S626_PLATFORM == S626_INTEL) /* * Base ACON1 config: always run * A1 based on TSL1. */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/6] staging: comedi: jr3_pci.h: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/jr3_pci.h | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/jr3_pci.h b/drivers/staging/comedi/drivers/jr3_pci.h index 356811d..f3614b4 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.h +++ b/drivers/staging/comedi/drivers/jr3_pci.h @@ -421,12 +421,13 @@ struct jr3_channel { */ struct force_array filter[7]; /* offset 0x0090, - offset 0x0098, - offset 0x00a0, - offset 0x00a8, - offset 0x00b0, - offset 0x00b8 , - offset 0x00c0 */ +* offset 0x0098, +* offset 0x00a0, +* offset 0x00a8, +* offset 0x00b0, +* offset 0x00b8, +* offset 0x00c0 +*/ /* Rate_data is the calculated rate data. It is a first derivative * calculation. It is calculated at a frequency specified by the -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/6] staging: comedi: jr3_pci.c: Fix checkpatch warning
Fix checkpatch.pl warning 'line over 80 characters' Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/jr3_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index 6c4ff02..0291d3d 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c @@ -448,7 +448,8 @@ static int jr3_download_firmware(struct comedi_device *dev, return 0; } -static struct jr3_pci_poll_delay jr3_pci_poll_subdevice(struct comedi_subdevice *s) +static struct jr3_pci_poll_delay +jr3_pci_poll_subdevice(struct comedi_subdevice *s) { struct jr3_pci_subdev_private *spriv = s->private; struct jr3_pci_poll_delay result = poll_delay_min_max(1000, 2000); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/6] staging: comedi: ni_at_a2150.c: Fix checkpatch warning
Fix checkpatch.pl warning 'line over 80 characters' Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/ni_at_a2150.c | 82 1 file changed, 46 insertions(+), 36 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index 957fb9f..3c00de1 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -58,41 +58,49 @@ /* Registers and bits */ #define CONFIG_REG 0x0 -#define CHANNEL_BITS(x) ((x) & 0x7) -#define CHANNEL_MASK 0x7 -#define CLOCK_SELECT_BITS(x) (((x) & 0x3) << 3) -#define CLOCK_DIVISOR_BITS(x)(((x) & 0x3) << 5) -#define CLOCK_MASK (0xf << 3) -#define ENABLE0_BIT 0x80/* enable (don't internally ground) channels 0 and 1 */ -#define ENABLE1_BIT 0x100 /* enable (don't internally ground) channels 2 and 3 */ -#define AC0_BIT 0x200 /* ac couple channels 0,1 */ -#define AC1_BIT 0x400 /* ac couple channels 2,3 */ -#define APD_BIT 0x800 /* analog power down */ -#define DPD_BIT 0x1000 /* digital power down */ -#define TRIGGER_REG0x2 /* trigger config register */ -#define POST_TRIGGER_BITS0x2 -#define DELAY_TRIGGER_BITS 0x3 -#define HW_TRIG_EN 0x10/* enable hardware trigger */ -#define FIFO_START_REG 0x6 /* software start aquistion trigger */ -#define FIFO_RESET_REG 0x8 /* clears fifo + fifo flags */ -#define FIFO_DATA_REG 0xa /* read data */ -#define DMA_TC_CLEAR_REG 0xe /* clear dma terminal count interrupt */ -#define STATUS_REG 0x12/* read only */ -#define FNE_BIT 0x1 /* fifo not empty */ -#define OVFL_BIT 0x8 /* fifo overflow */ -#define EDAQ_BIT 0x10/* end of acquisition interrupt */ -#define DCAL_BIT 0x20/* offset calibration in progress */ -#define INTR_BIT 0x40/* interrupt has occurred */ -#define DMA_TC_BIT 0x80/* dma terminal count interrupt has occurred */ -#define ID_BITS(x) (((x) >> 8) & 0x3) -#define IRQ_DMA_CNTRL_REG 0x12/* write only */ -#define DMA_CHAN_BITS(x) ((x) & 0x7) /* sets dma channel */ -#define DMA_EN_BIT 0x8 /* enables dma */ -#define IRQ_LVL_BITS(x) (((x) & 0xf) << 4) /* sets irq level */ -#define FIFO_INTR_EN_BIT 0x100 /* enable fifo interrupts */ -#define FIFO_INTR_FHF_BIT0x200 /* interrupt fifo half full */ -#define DMA_INTR_EN_BIT 0x800 /* enable interrupt on dma terminal count */ -#define DMA_DEM_EN_BIT 0x1000 /* enables demand mode dma */ +#define CHANNEL_BITS(x)((x) & 0x7) +#define CHANNEL_MASK 0x7 +#define CLOCK_SELECT_BITS(x) (((x) & 0x3) << 3) +#define CLOCK_DIVISOR_BITS(x) (((x) & 0x3) << 5) +#define CLOCK_MASK (0xf << 3) +#define ENABLE0_BIT0x80/* enable (don't internally ground) +* channels 0 and 1 +*/ +#define ENABLE1_BIT0x100 /* enable (don't internally ground) +* channels 2 and 3 +*/ +#define AC0_BIT0x200 /* ac couple channels 0,1 */ +#define AC1_BIT0x400 /* ac couple channels 2,3 */ +#define APD_BIT0x800 /* analog power down */ +#define DPD_BIT0x1000 /* digital power down */ +#define TRIGGER_REG0x2 /* trigger config register */ +#define POST_TRIGGER_BITS 0x2 +#define DELAY_TRIGGER_BITS 0x3 +#define HW_TRIG_EN 0x10/* enable hardware trigger */ +#define FIFO_START_REG 0x6 /* software start aquistion trigger */ +#define FIFO_RESET_REG 0x8 /* clears fifo + fifo flags */ +#define FIFO_DATA_REG 0xa /* read data */ +#define DMA_TC_CLEAR_REG 0xe /* clear dma terminal count interrupt */ +#define STATUS_REG 0x12/* read only */ +#define FNE_BIT0x1 /* fifo not empty */ +#define OVFL_BIT 0x8 /* fifo overflow */ +#define EDAQ_BIT 0x10/* end of acquisition interrupt */ +#define DCAL_BIT 0x20/* offset calibration in progress */ +#define INTR_BIT 0x40/* interrupt has occurred */ +#define DMA_TC_BIT 0x80/* dma terminal count interrupt has +* occurred +
[PATCH] staging: emxx_udc: Fix checkpatch warning
Fix checkpatch.pl warning Block comments use * on subsequent lines Signed-off-by: Anson Jacob --- drivers/staging/emxx_udc/emxx_udc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 3b56b28..f4d9000 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -2264,9 +2264,7 @@ static int _nbu2ss_enable_controller(struct nbu2ss_udc *udc) if (udc->udc_enabled) return 0; - /* - Reset - */ + /* Reset */ _nbu2ss_bitset(&udc->p_regs->EPCTR, (DIRPD | EPC_RST)); udelay(EPC_RST_DISABLE_TIME); /* 1us wait */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/9] staging: fbtft: fb_s6d02a1.c: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob --- drivers/staging/fbtft/fb_s6d02a1.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/fbtft/fb_s6d02a1.c b/drivers/staging/fbtft/fb_s6d02a1.c index 3113355..774b0ff 100644 --- a/drivers/staging/fbtft/fb_s6d02a1.c +++ b/drivers/staging/fbtft/fb_s6d02a1.c @@ -113,12 +113,14 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) #define MV BIT(5) static int set_var(struct fbtft_par *par) { - /* Memory data access control (0x36h) -RGB/BGR: - 1. Mode selection pin SRGB - RGB H/W pin for color filter setting: 0=RGB, 1=BGR - 2. MADCTL RGB bit - RGB-BGR ORDER color filter panel: 0=RGB, 1=BGR */ + /* +* Memory data access control (0x36h) +* RGB/BGR: +* 1. Mode selection pin SRGB +* RGB H/W pin for color filter setting: 0=RGB, 1=BGR +* 2. MADCTL RGB bit +* RGB-BGR ORDER color filter panel: 0=RGB, 1=BGR +*/ switch (par->info->var.rotate) { case 0: write_reg(par, MIPI_DCS_SET_ADDRESS_MODE, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/9] staging: fbtft: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Anson Jacob (9): staging: fbtft: fb_s6d02a1.c: Fix checkpatch warning staging: fbtft: fb_s6d1121.c: Fix checkpatch warning staging: fbtft: fb_ssd1289: Fix checkpatch warning staging: fbtft: fb_ssd1306: Fix checkpatch warning staging: fbtft: fb_ssd1331: Fix checkpatch warning staging: fbtft: fb_st7735r: Fix checkpatch warning staging: fbtft: fbtft-bus: Fix checkpatch warning staging: fbtft: fbtft_device: Fix checkpatch warning staging: fbtft: fb_tls8204: Fix checkpatch warning drivers/staging/fbtft/fb_s6d02a1.c | 14 + drivers/staging/fbtft/fb_s6d1121.c | 8 ++--- drivers/staging/fbtft/fb_ssd1289.c | 8 ++--- drivers/staging/fbtft/fb_ssd1306.c | 23 --- drivers/staging/fbtft/fb_ssd1331.c | 40 - drivers/staging/fbtft/fb_st7735r.c | 43 --- drivers/staging/fbtft/fb_tls8204.c | 57 ++-- drivers/staging/fbtft/fbtft-bus.c| 3 +- drivers/staging/fbtft/fbtft_device.c | 8 +++-- 9 files changed, 110 insertions(+), 94 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/9] staging: fbtft: fb_s6d1121.c: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Signed-off-by: Anson Jacob --- drivers/staging/fbtft/fb_s6d1121.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fbtft/fb_s6d1121.c b/drivers/staging/fbtft/fb_s6d1121.c index d6ae76b..9b1d70b 100644 --- a/drivers/staging/fbtft/fb_s6d1121.c +++ b/drivers/staging/fbtft/fb_s6d1121.c @@ -125,10 +125,10 @@ static int set_var(struct fbtft_par *par) } /* - Gamma string format: -PKP0 PKP1 PKP2 PKP3 PKP4 PKP5 PKP6 PKP7 PKP8 PKP9 PKP10 PKP11 VRP0 VRP1 -PKN0 PKN1 PKN2 PKN3 PKN4 PKN5 PKN6 PKN7 PRN8 PRN9 PRN10 PRN11 VRN0 VRN1 -*/ + * Gamma string format: + * PKP0 PKP1 PKP2 PKP3 PKP4 PKP5 PKP6 PKP7 PKP8 PKP9 PKP10 PKP11 VRP0 VRP1 + * PKN0 PKN1 PKN2 PKN3 PKN4 PKN5 PKN6 PKN7 PRN8 PRN9 PRN10 PRN11 VRN0 VRN1 + */ #define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int set_gamma(struct fbtft_par *par, unsigned long *curves) { -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/9] staging: fbtft: fb_ssd1306: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob --- drivers/staging/fbtft/fb_ssd1306.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/staging/fbtft/fb_ssd1306.c b/drivers/staging/fbtft/fb_ssd1306.c index e0b34a4..80fc570 100644 --- a/drivers/staging/fbtft/fb_ssd1306.c +++ b/drivers/staging/fbtft/fb_ssd1306.c @@ -27,15 +27,15 @@ #define HEIGHT 64 /* - write_reg() caveat: - - This doesn't work because D/C has to be LOW for both values: - write_reg(par, val1, val2); - - Do it like this: - write_reg(par, val1); - write_reg(par, val2); -*/ + * write_reg() caveat: + * + * This doesn't work because D/C has to be LOW for both values: + * write_reg(par, val1, val2); + * + * Do it like this: + * write_reg(par, val1); + * write_reg(par, val2); + */ /* Init sequence taken from the Adafruit SSD1306 Arduino library */ static int init_display(struct fbtft_par *par) @@ -113,8 +113,9 @@ static int init_display(struct fbtft_par *par) write_reg(par, 0xA4); /* Set Normal Display - 0 in RAM: OFF in display panel - 1 in RAM: ON in display panel */ +* 0 in RAM: OFF in display panel +* 1 in RAM: ON in display panel +*/ write_reg(par, 0xA6); /* Set Display ON */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/9] staging: fbtft: fb_ssd1289: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Signed-off-by: Anson Jacob --- drivers/staging/fbtft/fb_ssd1289.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fbtft/fb_ssd1289.c b/drivers/staging/fbtft/fb_ssd1289.c index 5d5f280..25f9fbe 100644 --- a/drivers/staging/fbtft/fb_ssd1289.c +++ b/drivers/staging/fbtft/fb_ssd1289.c @@ -131,10 +131,10 @@ static int set_var(struct fbtft_par *par) } /* - Gamma string format: -VRP0 VRP1 PRP0 PRP1 PKP0 PKP1 PKP2 PKP3 PKP4 PKP5 -VRN0 VRN1 PRN0 PRN1 PKN0 PKN1 PKN2 PKN3 PKN4 PKN5 -*/ + * Gamma string format: + * VRP0 VRP1 PRP0 PRP1 PKP0 PKP1 PKP2 PKP3 PKP4 PKP5 + * VRN0 VRN1 PRN0 PRN1 PKN0 PKN1 PKN2 PKN3 PKN4 PKN5 + */ #define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int set_gamma(struct fbtft_par *par, unsigned long *curves) { -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/9] staging: fbtft: fb_st7735r: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob --- drivers/staging/fbtft/fb_st7735r.c | 43 +++--- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/drivers/staging/fbtft/fb_st7735r.c b/drivers/staging/fbtft/fb_st7735r.c index c5e51fe..6670f2b 100644 --- a/drivers/staging/fbtft/fb_st7735r.c +++ b/drivers/staging/fbtft/fb_st7735r.c @@ -33,35 +33,43 @@ static int default_init_sequence[] = { -2, 500, /* delay */ /* FRMCTR1 - frame rate control: normal mode -frame rate = fosc / (1 x 2 + 40) * (LINE + 2C + 2D) */ +* frame rate = fosc / (1 x 2 + 40) * (LINE + 2C + 2D) +*/ -1, 0xB1, 0x01, 0x2C, 0x2D, /* FRMCTR2 - frame rate control: idle mode -frame rate = fosc / (1 x 2 + 40) * (LINE + 2C + 2D) */ +* frame rate = fosc / (1 x 2 + 40) * (LINE + 2C + 2D) +*/ -1, 0xB2, 0x01, 0x2C, 0x2D, /* FRMCTR3 - frame rate control - partial mode -dot inversion mode, line inversion mode */ +* dot inversion mode, line inversion mode +*/ -1, 0xB3, 0x01, 0x2C, 0x2D, 0x01, 0x2C, 0x2D, /* INVCTR - display inversion control -no inversion */ +* no inversion +*/ -1, 0xB4, 0x07, /* PWCTR1 - Power Control --4.6V, AUTO mode */ +* -4.6V, AUTO mode +*/ -1, 0xC0, 0xA2, 0x02, 0x84, /* PWCTR2 - Power Control -VGH25 = 2.4C VGSEL = -10 VGH = 3 * AVDD */ +* VGH25 = 2.4C VGSEL = -10 VGH = 3 * AVDD +*/ -1, 0xC1, 0xC5, /* PWCTR3 - Power Control -Opamp current small, Boost frequency */ +* Opamp current small, Boost frequency +*/ -1, 0xC2, 0x0A, 0x00, /* PWCTR4 - Power Control -BCLK/2, Opamp current small & Medium low */ +* BCLK/2, Opamp current small & Medium low +*/ -1, 0xC3, 0x8A, 0x2A, /* PWCTR5 - Power Control */ @@ -101,11 +109,12 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) static int set_var(struct fbtft_par *par) { /* MADCTL - Memory data access control -RGB/BGR: -1. Mode selection pin SRGB - RGB H/W pin for color filter setting: 0=RGB, 1=BGR -2. MADCTL RGB bit - RGB-BGR ORDER color filter panel: 0=RGB, 1=BGR */ +* RGB/BGR: +* 1. Mode selection pin SRGB +*RGB H/W pin for color filter setting: 0=RGB, 1=BGR +* 2. MADCTL RGB bit +*RGB-BGR ORDER color filter panel: 0=RGB, 1=BGR +*/ switch (par->info->var.rotate) { case 0: write_reg(par, MIPI_DCS_SET_ADDRESS_MODE, @@ -129,10 +138,10 @@ static int set_var(struct fbtft_par *par) } /* - Gamma string format: -VRF0P VOS0P PK0P PK1P PK2P PK3P PK4P PK5P PK6P PK7P PK8P PK9P SELV0P SELV1P SELV62P SELV63P -VRF0N VOS0N PK0N PK1N PK2N PK3N PK4N PK5N PK6N PK7N PK8N PK9N SELV0N SELV1N SELV62N SELV63N -*/ + * Gamma string format: + * VRF0P VOS0P PK0P PK1P PK2P PK3P PK4P PK5P PK6P PK7P PK8P PK9P SELV0P SELV1P SELV62P SELV63P + * VRF0N VOS0N PK0N PK1N PK2N PK3N PK4N PK5N PK6N PK7N PK8N PK9N SELV0N SELV1N SELV62N SELV63N + */ #define CURVE(num, idx) curves[num * par->gamma.num_values + idx] static int set_gamma(struct fbtft_par *par, unsigned long *curves) { -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/9] staging: fbtft: fb_ssd1331: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Signed-off-by: Anson Jacob --- drivers/staging/fbtft/fb_ssd1331.c | 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/fbtft/fb_ssd1331.c b/drivers/staging/fbtft/fb_ssd1331.c index bd294f8..1d74ac1 100644 --- a/drivers/staging/fbtft/fb_ssd1331.c +++ b/drivers/staging/fbtft/fb_ssd1331.c @@ -102,26 +102,26 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...) } /* - Grayscale Lookup Table - GS1 - GS63 - The driver Gamma curve contains the relative values between the entries - in the Lookup table. - - From datasheet: - 8.8 Gray Scale Decoder - - there are total 180 Gamma Settings (Setting 0 to Setting 180) - available for the Gray Scale table. - - The gray scale is defined in incremental way, with reference - to the length of previous table entry: - Setting of GS1 has to be >= 0 - Setting of GS2 has to be > Setting of GS1 +1 - Setting of GS3 has to be > Setting of GS2 +1 - : - Setting of GS63 has to be > Setting of GS62 +1 - -*/ + * Grayscale Lookup Table + * GS1 - GS63 + * The driver Gamma curve contains the relative values between the entries + * in the Lookup table. + * + * From datasheet: + * 8.8 Gray Scale Decoder + * + * there are total 180 Gamma Settings (Setting 0 to Setting 180) + * available for the Gray Scale table. + * + * The gray scale is defined in incremental way, with reference + * to the length of previous table entry: + * Setting of GS1 has to be >= 0 + * Setting of GS2 has to be > Setting of GS1 +1 + * Setting of GS3 has to be > Setting of GS2 +1 + * : + * Setting of GS63 has to be > Setting of GS62 +1 + * + */ static int set_gamma(struct fbtft_par *par, unsigned long *curves) { unsigned long tmp[GAMMA_NUM * GAMMA_LEN]; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 7/9] staging: fbtft: fbtft-bus: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob --- drivers/staging/fbtft/fbtft-bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c index 83505bc..ec45043 100644 --- a/drivers/staging/fbtft/fbtft-bus.c +++ b/drivers/staging/fbtft/fbtft-bus.c @@ -92,7 +92,8 @@ void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...) if (par->spi && (par->spi->bits_per_word == 8)) { /* we're emulating 9-bit, pad start of buffer with no-ops - (assuming here that zero is a no-op) */ +* (assuming here that zero is a no-op) +*/ pad = (len % 4) ? 4 - (len % 4) : 0; for (i = 0; i < pad; i++) *buf++ = 0x000; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 8/9] staging: fbtft: fbtft_device: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob --- drivers/staging/fbtft/fbtft_device.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index 4d1f1e9..924abd3 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1215,7 +1215,8 @@ static struct fbtft_device_display displays[] = { } }, { /* This should be the last item. - Used with the custom argument */ +* Used with the custom argument +*/ .name = "", .spi = &(struct spi_board_info) { .modalias = "", @@ -1306,8 +1307,9 @@ static struct fbtft_gpio fbtft_device_param_gpios[MAX_GPIOS + 1] = { }; static void fbtft_device_pdev_release(struct device *dev) { /* Needed to silence this message: -Device 'xxx' does not have a release() function, it is broken and must be fixed -*/ + * Device 'xxx' does not have a release() function, + * it is broken and must be fixed + */ } static int spi_device_found(struct device *dev, void *data) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 9/9] staging: fbtft: fb_tls8204: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob --- drivers/staging/fbtft/fb_tls8204.c | 57 +++--- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/drivers/staging/fbtft/fb_tls8204.c b/drivers/staging/fbtft/fb_tls8204.c index 545f7cb..ea2ddac 100644 --- a/drivers/staging/fbtft/fb_tls8204.c +++ b/drivers/staging/fbtft/fb_tls8204.c @@ -44,21 +44,21 @@ static int init_display(struct fbtft_par *par) par->fbtftops.reset(par); /* Enter extended command mode */ - write_reg(par, 0x21); /* 5:1 1 -2:0 PD - Powerdown control: chip is active -1:0 V - Entry mode: horizontal addressing -0:1 H - Extended instruction set control: - extended - */ + write_reg(par, 0x21); /* 5:1 1 +* 2:0 PD - Powerdown control: chip is active +* 1:0 V - Entry mode: horizontal addressing +* 0:1 H - Extended instruction set control: +* extended +*/ /* H=1 Bias system */ - write_reg(par, 0x10 | (bs & 0x7)); /* -4:1 1 -3:0 0 -2:x BS2 - Bias System -1:x BS1 -0:x BS0 - */ + write_reg(par, 0x10 | (bs & 0x7)); + /* 4:1 1 +* 3:0 0 +* 2:x BS2 - Bias System +* 1:x BS1 +* 0:x BS0 +*/ /* Set the address of the first display line. */ write_reg(par, 0x04 | (64 >> 6)); @@ -68,12 +68,12 @@ static int init_display(struct fbtft_par *par) write_reg(par, 0x20); /* H=0 Display control */ - write_reg(par, 0x08 | 4); /* -3:1 1 -2:1 D - DE: 10=normal mode -1:0 0 -0:0 E - */ + write_reg(par, 0x08 | 4); + /* 3:1 1 +* 2:1 D - DE: 10=normal mode +* 1:0 0 +* 0:0 E +*/ return 0; } @@ -81,15 +81,15 @@ static int init_display(struct fbtft_par *par) static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) { /* H=0 Set X address of RAM */ - write_reg(par, 0x80); /* 7:1 1 -6-0: X[6:0] - 0x00 - */ + write_reg(par, 0x80); /* 7:1 1 +* 6-0: X[6:0] - 0x00 +*/ /* H=0 Set Y address of RAM */ - write_reg(par, 0x40); /* 7:0 0 -6:1 1 -2-0: Y[2:0] - 0x0 - */ + write_reg(par, 0x40); /* 7:0 0 +* 6:1 1 +* 2-0: Y[2:0] - 0x0 +*/ } static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) @@ -100,8 +100,9 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) for (y = 0; y < HEIGHT / 8; y++) { u8 *buf = par->txbuf.buf; - /* The display is 102x68 but the LCD is 84x48. Set - the write pointer at the start of each row. */ + /* The display is 102x68 but the LCD is 84x48. +* Set the write pointer at the start of each row. +*/ gpio_set_value(par->gpio.dc, 0); write_reg(par, 0x80 | 0); write_reg(par, 0x40 | y); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 6/6] staging: comedi: ni_at_a2150.c: Fix checkpatch warning
Thank you for your comments. On Thu, Aug 25, 2016 at 06:47:08PM +0300, Andrey Utkin wrote: > > > +#define CHANNEL_BITS(x)((x) & 0x7) > > +#define CHANNEL_MASK 0x7 > > No uniform alignment. Please get everything in a row. > If it's hard or this part of driver is expected to have a lot of changes > in near future, then I'd remove any whitespace over single space between > name and value. > I didn't get your point in this case. Could you explain it. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 0/7] staging: comedi: Fix checkpatch warning
Fix checkpath.pl warning: line over 80 characters Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Statements should start on a tabstop Comparisons should place the constant on the right side of the test Changes in V2: Remove extra space after /* Align single line comment Block comments starts with /* followed by comments on the next line Anson Jacob (7): staging: comedi: cb_pcidas64.c: Fix checkpatch warning staging: comedi: cb_pcidas64: Fix commenting style staging: comedi: jr3_pci.h: Fix checkpatch warning staging: comedi: ni_atmio.c: Fix checkpatch warning staging: comedi: s626.h: Fix checkpatch warning staging: comedi: jr3_pci.c: Fix checkpatch warning staging: comedi: ni_at_a2150: Fix checkpatch warning drivers/staging/comedi/drivers/cb_pcidas64.c | 569 ++- drivers/staging/comedi/drivers/jr3_pci.c | 13 +- drivers/staging/comedi/drivers/jr3_pci.h | 290 -- drivers/staging/comedi/drivers/ni_at_a2150.c | 170 drivers/staging/comedi/drivers/ni_atmio.c| 11 +- drivers/staging/comedi/drivers/s626.h| 4 +- 6 files changed, 560 insertions(+), 497 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/7] staging: comedi: cb_pcidas64.c: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/cb_pcidas64.c | 148 ++- 1 file changed, 77 insertions(+), 71 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index aae839e..281dc56 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -1,34 +1,34 @@ /* -comedi/drivers/cb_pcidas64.c -This is a driver for the ComputerBoards/MeasurementComputing PCI-DAS -64xx, 60xx, and 4020 cards. - -Author: Frank Mori Hess -Copyright (C) 2001, 2002 Frank Mori Hess - -Thanks also go to the following people: - -Steve Rosenbluth, for providing the source code for -his pci-das6402 driver, and source code for working QNX pci-6402 -drivers by Greg Laird and Mariusz Bogacz. None of the code was -used directly here, but it was useful as an additional source of -documentation on how to program the boards. - -John Sims, for much testing and feedback on pcidas-4020 support. - -COMEDI - Linux Control and Measurement Device Interface -Copyright (C) 1997-8 David A. Schleef - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -*/ + * comedi/drivers/cb_pcidas64.c + * This is a driver for the ComputerBoards/MeasurementComputing PCI-DAS + * 64xx, 60xx, and 4020 cards. + * + * Author: Frank Mori Hess + * Copyright (C) 2001, 2002 Frank Mori Hess + * + * Thanks also go to the following people: + * + * Steve Rosenbluth, for providing the source code for + * his pci-das6402 driver, and source code for working QNX pci-6402 + * drivers by Greg Laird and Mariusz Bogacz. None of the code was + * used directly here, but it was useful as an additional source of + * documentation on how to program the boards. + * + * John Sims, for much testing and feedback on pcidas-4020 support. + * + * COMEDI - Linux Control and Measurement Device Interface + * Copyright (C) 1997-8 David A. Schleef + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ /* * Driver: cb_pcidas64 @@ -66,19 +66,18 @@ */ /* - -TODO: - make it return error if user attempts an ai command that uses the - external queue, and an ao command simultaneously user counter subdevice - there are a number of boards this driver will support when they are - fully released, but does not yet since the pci device id numbers - are not yet available. - - support prescaled 100khz clock for slow pacing (not available on 6000 - series?) - - make ao fifo size adjustable like ai fifo -*/ + * TODO: + * make it return error if user attempts an ai command that uses the + * external queue, and an ao command simultaneously user counter subdevice + * there are a number of boards this driver will support when they are + * fully released, but does not yet since the pci device id numbers + * are not yet available. + * + * support prescaled 100khz clock for slow pacing (not available on 6000 + * series?) + * + * make ao fifo size adjustable like ai fifo + */ #include #include @@ -90,53 +89,55 @@ TODO: #include "plx9080.h" #define TIMER_BASE 25 /* 40MHz master clock */ -/* 100kHz 'prescaled' clock for slow acquisition, - * maybe I'll support this someday */ +/* + * 100kHz 'prescaled' clock for slow acquisition, + * maybe I'll support this someday + */ #define PRESCALED_TIMER_BASE 1 #define DMA_BUFFER_SIZE 0x1000 -/* maximum value that can be loaded into board's 24-bit counters*/ +/* maximum value that can be loaded into board's 24-bit counters */ static const int max_counter_value = 0xff; /* PCI-DAS64xxx base addresses */ /* devpriv->main_iobase registers */ enum write_only_registers { - INTR_ENABLE_REG = 0x0, /* interrupt enable register */ - HW_CONFIG_REG = 0x2,/* hardware config register */
[PATCH v2 2/7] staging: comedi: cb_pcidas64: Fix commenting style
Remove additional space after /* Convert single line block comment into single line comment Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/cb_pcidas64.c | 431 +-- 1 file changed, 214 insertions(+), 217 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index 281dc56..a71d16f 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -169,8 +169,8 @@ enum read_only_registers { }; enum read_write_registers { - I8255_4020_REG = 0x48, /* 8255 offset, for 4020 only */ - /* external channel/gain queue, uses same bits as ADC_QUEUE_LOAD_REG */ + I8255_4020_REG = 0x48, /* 8255 offset, for 4020 only */ + /* external channel/gain queue, uses same bits as ADC_QUEUE_LOAD_REG */ ADC_QUEUE_FIFO_REG = 0x100, ADC_FIFO_REG = 0x200, /* adc data fifo */ /* dac data fifo, has weird interactions with external channel queue */ @@ -189,51 +189,52 @@ enum dio_counter_registers { /* bit definitions for write-only registers */ enum intr_enable_contents { - ADC_INTR_SRC_MASK = 0x3,/* adc interrupt source mask */ - ADC_INTR_QFULL_BITS = 0x0, /* interrupt fifo quarter full */ - ADC_INTR_EOC_BITS = 0x1,/* interrupt end of conversion */ - ADC_INTR_EOSCAN_BITS = 0x2, /* interrupt end of scan */ - ADC_INTR_EOSEQ_BITS = 0x3, /* interrupt end of sequence mask */ - EN_ADC_INTR_SRC_BIT = 0x4, /* enable adc interrupt source */ - EN_ADC_DONE_INTR_BIT = 0x8, /* enable adc acquisition done intr */ + ADC_INTR_SRC_MASK = 0x3,/* adc interrupt source mask */ + ADC_INTR_QFULL_BITS = 0x0, /* interrupt fifo quarter full */ + ADC_INTR_EOC_BITS = 0x1,/* interrupt end of conversion */ + ADC_INTR_EOSCAN_BITS = 0x2, /* interrupt end of scan */ + ADC_INTR_EOSEQ_BITS = 0x3, /* interrupt end of sequence mask */ + EN_ADC_INTR_SRC_BIT = 0x4, /* enable adc interrupt source */ + EN_ADC_DONE_INTR_BIT = 0x8, /* enable adc acquisition done intr */ DAC_INTR_SRC_MASK = 0x30, DAC_INTR_QEMPTY_BITS = 0x0, DAC_INTR_HIGH_CHAN_BITS = 0x10, - EN_DAC_INTR_SRC_BIT = 0x40, /* enable dac interrupt source */ + EN_DAC_INTR_SRC_BIT = 0x40, /* enable dac interrupt source */ EN_DAC_DONE_INTR_BIT = 0x80, - EN_ADC_ACTIVE_INTR_BIT = 0x200, /* enable adc active interrupt */ - EN_ADC_STOP_INTR_BIT = 0x400, /* enable adc stop trigger interrupt */ - EN_DAC_ACTIVE_INTR_BIT = 0x800, /* enable dac active interrupt */ - EN_DAC_UNDERRUN_BIT = 0x4000, /* enable dac underrun status bit */ - EN_ADC_OVERRUN_BIT = 0x8000,/* enable adc overrun status bit */ + EN_ADC_ACTIVE_INTR_BIT = 0x200, /* enable adc active interrupt */ + EN_ADC_STOP_INTR_BIT = 0x400, /* enable adc stop trigger interrupt */ + EN_DAC_ACTIVE_INTR_BIT = 0x800, /* enable dac active interrupt */ + EN_DAC_UNDERRUN_BIT = 0x4000, /* enable dac underrun status bit */ + EN_ADC_OVERRUN_BIT = 0x8000,/* enable adc overrun status bit */ }; enum hw_config_contents { - MASTER_CLOCK_4020_MASK = 0x3, /* master clock source mask for 4020 */ - INTERNAL_CLOCK_4020_BITS = 0x1, /* use 40 MHz internal master clock */ - BNC_CLOCK_4020_BITS = 0x2, /* use BNC input for master clock */ - EXT_CLOCK_4020_BITS = 0x3, /* use dio input for master clock */ - EXT_QUEUE_BIT = 0x200, /* use external channel/gain queue */ - /* use 225 nanosec strobe when loading dac instead of 50 nanosec */ + MASTER_CLOCK_4020_MASK = 0x3, /* master clock source mask for 4020 */ + INTERNAL_CLOCK_4020_BITS = 0x1, /* use 40 MHz internal master clock */ + BNC_CLOCK_4020_BITS = 0x2, /* use BNC input for master clock */ + EXT_CLOCK_4020_BITS = 0x3, /* use dio input for master clock */ + EXT_QUEUE_BIT = 0x200, /* use external channel/gain queue */ + /* use 225 nanosec strobe when loading dac instead of 50 nanosec */ SLOW_DAC_BIT = 0x400, - /* bit with unknown function yet given as default value in pci-das64 -* manual + /* +* bit with unknown function yet given as default value in pci-das64 +* manual */ HW_CONFIG_DUMMY_BITS = 0x2000, - /* bit selects channels 1/0 for analog input/output, otherwise 0/1 */ + /* bit selects channels 1/0 for analog input/output, otherwise 0/1 */ DMA_CH_SELECT_BIT = 0x8000, - FIFO_SIZE_REG = 0x4,/* allows adjustment of fifo sizes */ - DAC_FIFO_SIZE_MASK = 0xff00,/* bits that set dac fifo size */ - DAC_FIFO_BITS = 0xf800, /* 8k sample ao fifo */ + FIFO_SIZE_REG = 0x4,/* allows
[PATCH v2 3/7] staging: comedi: jr3_pci.h: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Block comments starts with /* followed by comments on the next line Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/jr3_pci.h | 290 ++- 1 file changed, 172 insertions(+), 118 deletions(-) diff --git a/drivers/staging/comedi/drivers/jr3_pci.h b/drivers/staging/comedi/drivers/jr3_pci.h index 356811d..5e5e34f 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.h +++ b/drivers/staging/comedi/drivers/jr3_pci.h @@ -1,4 +1,5 @@ -/* Helper types to take care of the fact that the DSP card memory +/* + * Helper types to take care of the fact that the DSP card memory * is 16 bits, but aligned on a 32 bit PCI boundary */ @@ -22,7 +23,8 @@ static inline void set_s16(s32 __iomem *p, s16 val) writel(val, p); } -/* The raw data is stored in a format which facilitates rapid +/* + * The raw data is stored in a format which facilitates rapid * processing by the JR3 DSP chip. The raw_channel structure shows the * format for a single channel of data. Each channel takes four, * two-byte words. @@ -47,7 +49,8 @@ struct raw_channel { s32 reserved[2]; }; -/* The force_array structure shows the layout for the decoupled and +/* + * The force_array structure shows the layout for the decoupled and * filtered force data. */ struct force_array { @@ -61,7 +64,8 @@ struct force_array { s32 v2; }; -/* The six_axis_array structure shows the layout for the offsets and +/* + * The six_axis_array structure shows the layout for the offsets and * the full scales. */ struct six_axis_array { @@ -74,7 +78,8 @@ struct six_axis_array { }; /* VECT_BITS */ -/* The vect_bits structure shows the layout for indicating +/* + * The vect_bits structure shows the layout for indicating * which axes to use in computing the vectors. Each bit signifies * selection of a single axis. The V1x axis bit corresponds to a hex * value of 0x0001 and the V2z bit corresponds to a hex value of @@ -100,12 +105,14 @@ enum { }; /* WARNING_BITS */ -/* The warning_bits structure shows the bit pattern for the warning +/* + * The warning_bits structure shows the bit pattern for the warning * word. The bit fields are shown from bit 0 (lsb) to bit 15 (msb). */ -/* XX_NEAR_SET */ -/* The xx_near_sat bits signify that the indicated axis has reached or +/* XX_NEAR_SET */ +/* + * The xx_near_sat bits signify that the indicated axis has reached or * exceeded the near saturation value. */ @@ -118,12 +125,13 @@ enum { mz_near_sat = 0x0020 }; -/* ERROR_BITS */ -/* XX_SAT */ -/* MEMORY_ERROR */ -/* SENSOR_CHANGE */ +/* ERROR_BITS */ +/* XX_SAT */ +/* MEMORY_ERROR */ +/* SENSOR_CHANGE */ -/* The error_bits structure shows the bit pattern for the error word. +/* + * The error_bits structure shows the bit pattern for the error word. * The bit fields are shown from bit 0 (lsb) to bit 15 (msb). The * xx_sat bits signify that the indicated axis has reached or exceeded * the saturation value. The memory_error bit indicates that a problem @@ -134,9 +142,10 @@ enum { * */ -/* SYSTEM_BUSY */ +/* SYSTEM_BUSY */ -/* The system_busy bit indicates that the JR3 DSP is currently busy +/* + * The system_busy bit indicates that the JR3 DSP is currently busy * and is not calculating force data. This occurs when a new * coordinate transformation, or new sensor full scale is set by the * user. A very fast system using the force data for feedback might @@ -146,9 +155,10 @@ enum { * calibration CRC. */ -/* CAL_CRC_BAD */ +/* CAL_CRC_BAD */ -/* The cal_crc_bad bit indicates that the calibration CRC has not +/* + * The cal_crc_bad bit indicates that the calibration CRC has not * calculated to zero. CRC is short for cyclic redundancy code. It is * a method for determining the integrity of messages in data * communication. The calibration data stored inside the sensor is @@ -168,7 +178,8 @@ enum { /* WATCH_DOG */ /* WATCH_DOG2 */ -/* The watch_dog and watch_dog2 bits are sensor, not processor, watch +/* + * The watch_dog and watch_dog2 bits are sensor, not processor, watch * dog bits. Watch_dog indicates that the sensor data line seems to be * acting correctly, while watch_dog2 indicates that sensor data and * clock are being received. It is possible for watch_dog2 to go off @@ -192,9 +203,10 @@ enum error_bits_t { watch_dog = 0x8000 }; -/* THRESH_STRUCT */ +/* THRESH_STRUCT */ -/* This structure shows the layout for a single threshold packet inside of a +/* + * This structure shows the layout for a single threshold packet inside of a * load envelope. Each load envelope can contain several threshold structures. * 1. data_address contains the address of the data for that threshold. This *includes filtered, unfiltered, raw, rate, counters, error and warning data @@ -210,9 +222,10
[PATCH v2 4/7] staging: comedi: ni_atmio.c: Fix checkpatch warning
Fix checkpatch.pl warning for 'Statements should start on a tabstop' Convert single line block comment to single line comment Align single line comment Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/ni_atmio.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c index 162a000..ffcf7af 100644 --- a/drivers/staging/comedi/drivers/ni_atmio.c +++ b/drivers/staging/comedi/drivers/ni_atmio.c @@ -89,10 +89,7 @@ #include "ni_stc.h" #include "8255.h" -/* - * AT specific setup - */ - +/* AT specific setup */ static const struct ni_board_struct ni_boards[] = { { .name = "at-mio-16e-1", @@ -206,7 +203,7 @@ static const struct ni_board_struct ni_boards[] = { .n_adchan = 16, .ai_maxdata = 0x, .ai_fifo_depth = 512, - .alwaysdither = 1,/* unknown */ + .alwaysdither = 1,/* unknown */ .gainlkup = ai_gain_14, .ai_speed = 1, .caldac = { dac8800, dac8043, ad8522 }, @@ -278,10 +275,10 @@ static const struct ni_board_struct *ni_atmio_probe(struct comedi_device *dev) } if (device_id == 255) dev_err(dev->class_dev, "can't find board\n"); -else if (device_id == 0) + else if (device_id == 0) dev_err(dev->class_dev, "EEPROM read error (?) or device not found\n"); -else + else dev_err(dev->class_dev, "unknown device ID %d -- contact author\n", device_id); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 5/7] staging: comedi: s626.h: Fix checkpatch warning
Fix checkpatch.pl warning for Comparisons should place the constant on the right side of the test Remove extra space after /* Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/s626.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.h b/drivers/staging/comedi/drivers/s626.h index 6a00a64..4cef452 100644 --- a/drivers/staging/comedi/drivers/s626.h +++ b/drivers/staging/comedi/drivers/s626.h @@ -79,7 +79,7 @@ /* Address offsets, in DWORDS, from base of DMA buffer. */ #define S626_DAC_WDMABUF_OSS626_ADC_DMABUF_DWORDS -/* Interrupt enable bit in ISR and IER. */ +/* Interrupt enable bit in ISR and IER. */ #define S626_IRQ_GPIO3 0x0040 /* IRQ enable for GPIO3. */ #define S626_IRQ_RPS1 0x1000 #define S626_ISR_AFOU 0x0800 @@ -329,7 +329,7 @@ * WS1-WS4 = CS* outputs. */ -#if S626_PLATFORM == S626_INTEL/* +#if (S626_PLATFORM == S626_INTEL) /* * Base ACON1 config: always run * A1 based on TSL1. */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 7/7] staging: comedi: ni_at_a2150: Fix checkpatch warning
Fix checkpatch.pl warning 'line over 80 characters' Remove extra space after /* Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/ni_at_a2150.c | 170 ++- 1 file changed, 89 insertions(+), 81 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index 957fb9f..5a4dcc6 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -58,48 +58,52 @@ /* Registers and bits */ #define CONFIG_REG 0x0 -#define CHANNEL_BITS(x) ((x) & 0x7) +#define CHANNEL_BITS(x) ((x) & 0x7) #define CHANNEL_MASK 0x7 -#define CLOCK_SELECT_BITS(x) (((x) & 0x3) << 3) -#define CLOCK_DIVISOR_BITS(x)(((x) & 0x3) << 5) +#define CLOCK_SELECT_BITS(x) (((x) & 0x3) << 3) +#define CLOCK_DIVISOR_BITS(x)(((x) & 0x3) << 5) #define CLOCK_MASK (0xf << 3) -#define ENABLE0_BIT 0x80/* enable (don't internally ground) channels 0 and 1 */ -#define ENABLE1_BIT 0x100 /* enable (don't internally ground) channels 2 and 3 */ -#define AC0_BIT 0x200 /* ac couple channels 0,1 */ -#define AC1_BIT 0x400 /* ac couple channels 2,3 */ -#define APD_BIT 0x800 /* analog power down */ -#define DPD_BIT 0x1000 /* digital power down */ -#define TRIGGER_REG0x2 /* trigger config register */ -#define POST_TRIGGER_BITS0x2 -#define DELAY_TRIGGER_BITS 0x3 -#define HW_TRIG_EN 0x10/* enable hardware trigger */ -#define FIFO_START_REG 0x6 /* software start aquistion trigger */ -#define FIFO_RESET_REG 0x8 /* clears fifo + fifo flags */ -#define FIFO_DATA_REG 0xa /* read data */ -#define DMA_TC_CLEAR_REG 0xe /* clear dma terminal count interrupt */ -#define STATUS_REG 0x12/* read only */ -#define FNE_BIT 0x1 /* fifo not empty */ -#define OVFL_BIT 0x8 /* fifo overflow */ -#define EDAQ_BIT 0x10/* end of acquisition interrupt */ -#define DCAL_BIT 0x20/* offset calibration in progress */ -#define INTR_BIT 0x40/* interrupt has occurred */ -#define DMA_TC_BIT 0x80/* dma terminal count interrupt has occurred */ -#define ID_BITS(x) (((x) >> 8) & 0x3) -#define IRQ_DMA_CNTRL_REG 0x12/* write only */ -#define DMA_CHAN_BITS(x) ((x) & 0x7) /* sets dma channel */ -#define DMA_EN_BIT 0x8 /* enables dma */ -#define IRQ_LVL_BITS(x) (((x) & 0xf) << 4) /* sets irq level */ -#define FIFO_INTR_EN_BIT 0x100 /* enable fifo interrupts */ -#define FIFO_INTR_FHF_BIT0x200 /* interrupt fifo half full */ -#define DMA_INTR_EN_BIT 0x800 /* enable interrupt on dma terminal count */ -#define DMA_DEM_EN_BIT 0x1000 /* enables demand mode dma */ +/* enable (don't internally ground) channels 0 and 1 */ +#define ENABLE0_BIT 0x80 +/* enable (don't internally ground) channels 2 and 3 */ +#define ENABLE1_BIT 0x100 +#define AC0_BIT 0x200 /* ac couple channels 0,1 */ +#define AC1_BIT 0x400 /* ac couple channels 2,3 */ +#define APD_BIT 0x800 /* analog power down */ +#define DPD_BIT 0x1000 /* digital power down */ +#define TRIGGER_REG0x2 /* trigger config register */ +#define POST_TRIGGER_BITS0x2 +#define DELAY_TRIGGER_BITS 0x3 +#define HW_TRIG_EN 0x10/* enable hardware trigger */ +#define FIFO_START_REG 0x6 /* software start aquistion trigger */ +#define FIFO_RESET_REG 0x8 /* clears fifo + fifo flags */ +#define FIFO_DATA_REG 0xa /* read data */ +#define DMA_TC_CLEAR_REG 0xe /* clear dma terminal count interrupt */ +#define STATUS_REG 0x12/* read only */ +#define FNE_BIT 0x1 /* fifo not empty */ +#define OVFL_BIT 0x8 /* fifo overflow */ +#define EDAQ_BIT 0x10/* end of acquisition interrupt */ +#define DCAL_BIT 0x20/* offset calibration in progress */ +#define INTR_BIT 0x40/* interrupt has occurred */ +/* dma terminal count interrupt has occurred */ +#define DMA_TC_BIT 0x80 +#define ID_BITS(x) (((x) >> 8) & 0x3) +#define IRQ_DMA_CNTRL_REG 0x12/* write only */ +#define DMA_CHAN_BITS(x) ((x) & 0x7) /* sets dma channel */ +#define DMA_EN_BIT 0x8 /* enables dma */ +#define IRQ_LVL_BITS(x)
[PATCH v2 6/7] staging: comedi: jr3_pci.c: Fix checkpatch warning
Fix checkpatch.pl warning 'line over 80 characters' Remove extra space after /* Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/jr3_pci.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index 6c4ff02..8306f6b 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c @@ -141,7 +141,7 @@ static void set_transforms(struct jr3_channel __iomem *channel, { int i; - num &= 0x000f; /* Make sure that 0 <= num <= 15 */ + num &= 0x000f; /* Make sure that 0 <= num <= 15 */ for (i = 0; i < 8; i++) { set_u16(&channel->transforms[num].link[i].link_type, transf.link[i].link_type); @@ -323,10 +323,10 @@ static int read_idm_word(const u8 *data, size_t size, int *pos, int value; if (pos && val) { - /* Skip over non hex */ + /* Skip over non hex */ for (; *pos < size && !isxdigit(data[*pos]); (*pos)++) ; - /* Collect value */ + /* Collect value */ *val = 0; for (; *pos < size; (*pos)++) { value = hex_to_bin(data[*pos]); @@ -448,7 +448,8 @@ static int jr3_download_firmware(struct comedi_device *dev, return 0; } -static struct jr3_pci_poll_delay jr3_pci_poll_subdevice(struct comedi_subdevice *s) +static struct jr3_pci_poll_delay +jr3_pci_poll_subdevice(struct comedi_subdevice *s) { struct jr3_pci_subdev_private *spriv = s->private; struct jr3_pci_poll_delay result = poll_delay_min_max(1000, 2000); @@ -733,7 +734,7 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, } } - /* Reset DSP card */ + /* Reset DSP card */ writel(0, &devpriv->iobase->channel[0].reset); ret = comedi_load_firmware(dev, &comedi_to_pci_dev(dev)->dev, @@ -763,7 +764,7 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, data.copyright[i]) >> 8); } - /* Start card timer */ + /* Start card timer */ for (i = 0; i < dev->n_subdevices; i++) { s = &dev->subdevices[i]; spriv = s->private; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 3/7] staging: comedi: jr3_pci.h: Fix checkpatch warning
On Sat, Aug 27, 2016 at 12:23:58AM +0300, Andrey Utkin wrote: > On Fri, Aug 26, 2016 at 02:33:08PM -0400, Anson Jacob wrote: > > > > - /* Default_FS contains the full scale that is used if the user does */ > > - /* not set a full scale. */ > > + /* > > Applying: staging: comedi: jr3_pci.h: Fix checkpatch warning > .git/rebase-apply/patch:226: trailing whitespace. > /* > warning: 1 line adds whitespace errors. > > This means you have a space after asterisk. You would catch this if you run > checkpatch.pl after making your commits. > > Actually, some files you have amended, still have issues of same difficulty. > You are encouraged to sort that out, too. See > > for x in drivers/staging/comedi/drivers/cb_pcidas64.c > drivers/staging/comedi/drivers/jr3_pci.c > drivers/staging/comedi/drivers/jr3_pci.h > drivers/staging/comedi/drivers/ni_at_a2150.c > drivers/staging/comedi/drivers/ni_atmio.c > drivers/staging/comedi/drivers/s626.h; do ./scripts/checkpatch.pl --strict -f > $x; done Thank you for the comments and the code snippet. I only found one trailing whitespace issue in the patchset. I will be uploading a new patchset with the fix for the trailing whitespace. Are my commits are too long. Am I supposed to submit shorter ones. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 0/8] staging: comedi: Fix checkpatch warning
Fix checkpath.pl warning: line over 80 characters Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Statements should start on a tabstop Comparisons should place the constant on the right side of the test Changes in V2: Remove extra space after /* Align single line comment Block comments starts with /* followed by comments on the next line Changes in V3: Fix trailing space Fix checkpatch.pl warning for blank line after enum declaration Move macro definition to the top of the file Align macro definitions Anson Jacob (8): staging: comedi: cb_pcidas64.c: Fix checkpatch warning staging: comedi: cb_pcidas64: Fix commenting style staging: comedi: jr3_pci.h: Fix checkpatch warning staging: comedi: ni_atmio.c: Fix checkpatch warning staging: comedi: s626.h: Fix checkpatch warning staging: comedi: jr3_pci.c: Fix checkpatch warning staging: comedi: ni_at_a2150: Fix checkpatch warning staging: comedi: cb_pcidas64: Fix checkpath warning drivers/staging/comedi/drivers/cb_pcidas64.c | 573 ++- drivers/staging/comedi/drivers/jr3_pci.c | 13 +- drivers/staging/comedi/drivers/jr3_pci.h | 290 -- drivers/staging/comedi/drivers/ni_at_a2150.c | 170 drivers/staging/comedi/drivers/ni_atmio.c| 11 +- drivers/staging/comedi/drivers/s626.h| 4 +- 6 files changed, 562 insertions(+), 499 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 1/8] staging: comedi: cb_pcidas64.c: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/cb_pcidas64.c | 148 ++- 1 file changed, 77 insertions(+), 71 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index aae839e..281dc56 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -1,34 +1,34 @@ /* -comedi/drivers/cb_pcidas64.c -This is a driver for the ComputerBoards/MeasurementComputing PCI-DAS -64xx, 60xx, and 4020 cards. - -Author: Frank Mori Hess -Copyright (C) 2001, 2002 Frank Mori Hess - -Thanks also go to the following people: - -Steve Rosenbluth, for providing the source code for -his pci-das6402 driver, and source code for working QNX pci-6402 -drivers by Greg Laird and Mariusz Bogacz. None of the code was -used directly here, but it was useful as an additional source of -documentation on how to program the boards. - -John Sims, for much testing and feedback on pcidas-4020 support. - -COMEDI - Linux Control and Measurement Device Interface -Copyright (C) 1997-8 David A. Schleef - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -*/ + * comedi/drivers/cb_pcidas64.c + * This is a driver for the ComputerBoards/MeasurementComputing PCI-DAS + * 64xx, 60xx, and 4020 cards. + * + * Author: Frank Mori Hess + * Copyright (C) 2001, 2002 Frank Mori Hess + * + * Thanks also go to the following people: + * + * Steve Rosenbluth, for providing the source code for + * his pci-das6402 driver, and source code for working QNX pci-6402 + * drivers by Greg Laird and Mariusz Bogacz. None of the code was + * used directly here, but it was useful as an additional source of + * documentation on how to program the boards. + * + * John Sims, for much testing and feedback on pcidas-4020 support. + * + * COMEDI - Linux Control and Measurement Device Interface + * Copyright (C) 1997-8 David A. Schleef + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ /* * Driver: cb_pcidas64 @@ -66,19 +66,18 @@ */ /* - -TODO: - make it return error if user attempts an ai command that uses the - external queue, and an ao command simultaneously user counter subdevice - there are a number of boards this driver will support when they are - fully released, but does not yet since the pci device id numbers - are not yet available. - - support prescaled 100khz clock for slow pacing (not available on 6000 - series?) - - make ao fifo size adjustable like ai fifo -*/ + * TODO: + * make it return error if user attempts an ai command that uses the + * external queue, and an ao command simultaneously user counter subdevice + * there are a number of boards this driver will support when they are + * fully released, but does not yet since the pci device id numbers + * are not yet available. + * + * support prescaled 100khz clock for slow pacing (not available on 6000 + * series?) + * + * make ao fifo size adjustable like ai fifo + */ #include #include @@ -90,53 +89,55 @@ TODO: #include "plx9080.h" #define TIMER_BASE 25 /* 40MHz master clock */ -/* 100kHz 'prescaled' clock for slow acquisition, - * maybe I'll support this someday */ +/* + * 100kHz 'prescaled' clock for slow acquisition, + * maybe I'll support this someday + */ #define PRESCALED_TIMER_BASE 1 #define DMA_BUFFER_SIZE 0x1000 -/* maximum value that can be loaded into board's 24-bit counters*/ +/* maximum value that can be loaded into board's 24-bit counters */ static const int max_counter_value = 0xff; /* PCI-DAS64xxx base addresses */ /* devpriv->main_iobase registers */ enum write_only_registers { - INTR_ENABLE_REG = 0x0, /* interrupt enable register */ - HW_CONFIG_REG = 0x2,/* hardware config register */
[PATCH v3 2/8] staging: comedi: cb_pcidas64: Fix commenting style
Remove additional space after /* Convert single line block comment into single line comment Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/cb_pcidas64.c | 431 +-- 1 file changed, 214 insertions(+), 217 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index 281dc56..ac24c10 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -169,8 +169,8 @@ enum read_only_registers { }; enum read_write_registers { - I8255_4020_REG = 0x48, /* 8255 offset, for 4020 only */ - /* external channel/gain queue, uses same bits as ADC_QUEUE_LOAD_REG */ + I8255_4020_REG = 0x48, /* 8255 offset, for 4020 only */ + /* external channel/gain queue, uses same bits as ADC_QUEUE_LOAD_REG */ ADC_QUEUE_FIFO_REG = 0x100, ADC_FIFO_REG = 0x200, /* adc data fifo */ /* dac data fifo, has weird interactions with external channel queue */ @@ -189,51 +189,52 @@ enum dio_counter_registers { /* bit definitions for write-only registers */ enum intr_enable_contents { - ADC_INTR_SRC_MASK = 0x3,/* adc interrupt source mask */ - ADC_INTR_QFULL_BITS = 0x0, /* interrupt fifo quarter full */ - ADC_INTR_EOC_BITS = 0x1,/* interrupt end of conversion */ - ADC_INTR_EOSCAN_BITS = 0x2, /* interrupt end of scan */ - ADC_INTR_EOSEQ_BITS = 0x3, /* interrupt end of sequence mask */ - EN_ADC_INTR_SRC_BIT = 0x4, /* enable adc interrupt source */ - EN_ADC_DONE_INTR_BIT = 0x8, /* enable adc acquisition done intr */ + ADC_INTR_SRC_MASK = 0x3,/* adc interrupt source mask */ + ADC_INTR_QFULL_BITS = 0x0, /* interrupt fifo quarter full */ + ADC_INTR_EOC_BITS = 0x1,/* interrupt end of conversion */ + ADC_INTR_EOSCAN_BITS = 0x2, /* interrupt end of scan */ + ADC_INTR_EOSEQ_BITS = 0x3, /* interrupt end of sequence mask */ + EN_ADC_INTR_SRC_BIT = 0x4, /* enable adc interrupt source */ + EN_ADC_DONE_INTR_BIT = 0x8, /* enable adc acquisition done intr */ DAC_INTR_SRC_MASK = 0x30, DAC_INTR_QEMPTY_BITS = 0x0, DAC_INTR_HIGH_CHAN_BITS = 0x10, - EN_DAC_INTR_SRC_BIT = 0x40, /* enable dac interrupt source */ + EN_DAC_INTR_SRC_BIT = 0x40, /* enable dac interrupt source */ EN_DAC_DONE_INTR_BIT = 0x80, - EN_ADC_ACTIVE_INTR_BIT = 0x200, /* enable adc active interrupt */ - EN_ADC_STOP_INTR_BIT = 0x400, /* enable adc stop trigger interrupt */ - EN_DAC_ACTIVE_INTR_BIT = 0x800, /* enable dac active interrupt */ - EN_DAC_UNDERRUN_BIT = 0x4000, /* enable dac underrun status bit */ - EN_ADC_OVERRUN_BIT = 0x8000,/* enable adc overrun status bit */ + EN_ADC_ACTIVE_INTR_BIT = 0x200, /* enable adc active interrupt */ + EN_ADC_STOP_INTR_BIT = 0x400, /* enable adc stop trigger interrupt */ + EN_DAC_ACTIVE_INTR_BIT = 0x800, /* enable dac active interrupt */ + EN_DAC_UNDERRUN_BIT = 0x4000, /* enable dac underrun status bit */ + EN_ADC_OVERRUN_BIT = 0x8000,/* enable adc overrun status bit */ }; enum hw_config_contents { - MASTER_CLOCK_4020_MASK = 0x3, /* master clock source mask for 4020 */ - INTERNAL_CLOCK_4020_BITS = 0x1, /* use 40 MHz internal master clock */ - BNC_CLOCK_4020_BITS = 0x2, /* use BNC input for master clock */ - EXT_CLOCK_4020_BITS = 0x3, /* use dio input for master clock */ - EXT_QUEUE_BIT = 0x200, /* use external channel/gain queue */ - /* use 225 nanosec strobe when loading dac instead of 50 nanosec */ + MASTER_CLOCK_4020_MASK = 0x3, /* master clock source mask for 4020 */ + INTERNAL_CLOCK_4020_BITS = 0x1, /* use 40 MHz internal master clock */ + BNC_CLOCK_4020_BITS = 0x2, /* use BNC input for master clock */ + EXT_CLOCK_4020_BITS = 0x3, /* use dio input for master clock */ + EXT_QUEUE_BIT = 0x200, /* use external channel/gain queue */ + /* use 225 nanosec strobe when loading dac instead of 50 nanosec */ SLOW_DAC_BIT = 0x400, - /* bit with unknown function yet given as default value in pci-das64 -* manual + /* +* bit with unknown function yet given as default value in pci-das64 +* manual */ HW_CONFIG_DUMMY_BITS = 0x2000, - /* bit selects channels 1/0 for analog input/output, otherwise 0/1 */ + /* bit selects channels 1/0 for analog input/output, otherwise 0/1 */ DMA_CH_SELECT_BIT = 0x8000, - FIFO_SIZE_REG = 0x4,/* allows adjustment of fifo sizes */ - DAC_FIFO_SIZE_MASK = 0xff00,/* bits that set dac fifo size */ - DAC_FIFO_BITS = 0xf800, /* 8k sample ao fifo */ + FIFO_SIZE_REG = 0x4,/* allows
[PATCH v3 3/8] staging: comedi: jr3_pci.h: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Block comments starts with /* followed by comments on the next line Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/jr3_pci.h | 290 ++- 1 file changed, 172 insertions(+), 118 deletions(-) diff --git a/drivers/staging/comedi/drivers/jr3_pci.h b/drivers/staging/comedi/drivers/jr3_pci.h index 356811d..f10a84f 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.h +++ b/drivers/staging/comedi/drivers/jr3_pci.h @@ -1,4 +1,5 @@ -/* Helper types to take care of the fact that the DSP card memory +/* + * Helper types to take care of the fact that the DSP card memory * is 16 bits, but aligned on a 32 bit PCI boundary */ @@ -22,7 +23,8 @@ static inline void set_s16(s32 __iomem *p, s16 val) writel(val, p); } -/* The raw data is stored in a format which facilitates rapid +/* + * The raw data is stored in a format which facilitates rapid * processing by the JR3 DSP chip. The raw_channel structure shows the * format for a single channel of data. Each channel takes four, * two-byte words. @@ -47,7 +49,8 @@ struct raw_channel { s32 reserved[2]; }; -/* The force_array structure shows the layout for the decoupled and +/* + * The force_array structure shows the layout for the decoupled and * filtered force data. */ struct force_array { @@ -61,7 +64,8 @@ struct force_array { s32 v2; }; -/* The six_axis_array structure shows the layout for the offsets and +/* + * The six_axis_array structure shows the layout for the offsets and * the full scales. */ struct six_axis_array { @@ -74,7 +78,8 @@ struct six_axis_array { }; /* VECT_BITS */ -/* The vect_bits structure shows the layout for indicating +/* + * The vect_bits structure shows the layout for indicating * which axes to use in computing the vectors. Each bit signifies * selection of a single axis. The V1x axis bit corresponds to a hex * value of 0x0001 and the V2z bit corresponds to a hex value of @@ -100,12 +105,14 @@ enum { }; /* WARNING_BITS */ -/* The warning_bits structure shows the bit pattern for the warning +/* + * The warning_bits structure shows the bit pattern for the warning * word. The bit fields are shown from bit 0 (lsb) to bit 15 (msb). */ -/* XX_NEAR_SET */ -/* The xx_near_sat bits signify that the indicated axis has reached or +/* XX_NEAR_SET */ +/* + * The xx_near_sat bits signify that the indicated axis has reached or * exceeded the near saturation value. */ @@ -118,12 +125,13 @@ enum { mz_near_sat = 0x0020 }; -/* ERROR_BITS */ -/* XX_SAT */ -/* MEMORY_ERROR */ -/* SENSOR_CHANGE */ +/* ERROR_BITS */ +/* XX_SAT */ +/* MEMORY_ERROR */ +/* SENSOR_CHANGE */ -/* The error_bits structure shows the bit pattern for the error word. +/* + * The error_bits structure shows the bit pattern for the error word. * The bit fields are shown from bit 0 (lsb) to bit 15 (msb). The * xx_sat bits signify that the indicated axis has reached or exceeded * the saturation value. The memory_error bit indicates that a problem @@ -134,9 +142,10 @@ enum { * */ -/* SYSTEM_BUSY */ +/* SYSTEM_BUSY */ -/* The system_busy bit indicates that the JR3 DSP is currently busy +/* + * The system_busy bit indicates that the JR3 DSP is currently busy * and is not calculating force data. This occurs when a new * coordinate transformation, or new sensor full scale is set by the * user. A very fast system using the force data for feedback might @@ -146,9 +155,10 @@ enum { * calibration CRC. */ -/* CAL_CRC_BAD */ +/* CAL_CRC_BAD */ -/* The cal_crc_bad bit indicates that the calibration CRC has not +/* + * The cal_crc_bad bit indicates that the calibration CRC has not * calculated to zero. CRC is short for cyclic redundancy code. It is * a method for determining the integrity of messages in data * communication. The calibration data stored inside the sensor is @@ -168,7 +178,8 @@ enum { /* WATCH_DOG */ /* WATCH_DOG2 */ -/* The watch_dog and watch_dog2 bits are sensor, not processor, watch +/* + * The watch_dog and watch_dog2 bits are sensor, not processor, watch * dog bits. Watch_dog indicates that the sensor data line seems to be * acting correctly, while watch_dog2 indicates that sensor data and * clock are being received. It is possible for watch_dog2 to go off @@ -192,9 +203,10 @@ enum error_bits_t { watch_dog = 0x8000 }; -/* THRESH_STRUCT */ +/* THRESH_STRUCT */ -/* This structure shows the layout for a single threshold packet inside of a +/* + * This structure shows the layout for a single threshold packet inside of a * load envelope. Each load envelope can contain several threshold structures. * 1. data_address contains the address of the data for that threshold. This *includes filtered, unfiltered, raw, rate, counters, error and warning data @@ -210,9 +222,10
[PATCH v3 5/8] staging: comedi: s626.h: Fix checkpatch warning
Fix checkpatch.pl warning for Comparisons should place the constant on the right side of the test Remove extra space after /* Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/s626.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.h b/drivers/staging/comedi/drivers/s626.h index 6a00a64..4cef452 100644 --- a/drivers/staging/comedi/drivers/s626.h +++ b/drivers/staging/comedi/drivers/s626.h @@ -79,7 +79,7 @@ /* Address offsets, in DWORDS, from base of DMA buffer. */ #define S626_DAC_WDMABUF_OSS626_ADC_DMABUF_DWORDS -/* Interrupt enable bit in ISR and IER. */ +/* Interrupt enable bit in ISR and IER. */ #define S626_IRQ_GPIO3 0x0040 /* IRQ enable for GPIO3. */ #define S626_IRQ_RPS1 0x1000 #define S626_ISR_AFOU 0x0800 @@ -329,7 +329,7 @@ * WS1-WS4 = CS* outputs. */ -#if S626_PLATFORM == S626_INTEL/* +#if (S626_PLATFORM == S626_INTEL) /* * Base ACON1 config: always run * A1 based on TSL1. */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 4/8] staging: comedi: ni_atmio.c: Fix checkpatch warning
Fix checkpatch.pl warning for 'Statements should start on a tabstop' Convert single line block comment to single line comment Align single line comment Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/ni_atmio.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c index 162a000..ffcf7af 100644 --- a/drivers/staging/comedi/drivers/ni_atmio.c +++ b/drivers/staging/comedi/drivers/ni_atmio.c @@ -89,10 +89,7 @@ #include "ni_stc.h" #include "8255.h" -/* - * AT specific setup - */ - +/* AT specific setup */ static const struct ni_board_struct ni_boards[] = { { .name = "at-mio-16e-1", @@ -206,7 +203,7 @@ static const struct ni_board_struct ni_boards[] = { .n_adchan = 16, .ai_maxdata = 0x, .ai_fifo_depth = 512, - .alwaysdither = 1,/* unknown */ + .alwaysdither = 1,/* unknown */ .gainlkup = ai_gain_14, .ai_speed = 1, .caldac = { dac8800, dac8043, ad8522 }, @@ -278,10 +275,10 @@ static const struct ni_board_struct *ni_atmio_probe(struct comedi_device *dev) } if (device_id == 255) dev_err(dev->class_dev, "can't find board\n"); -else if (device_id == 0) + else if (device_id == 0) dev_err(dev->class_dev, "EEPROM read error (?) or device not found\n"); -else + else dev_err(dev->class_dev, "unknown device ID %d -- contact author\n", device_id); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 7/8] staging: comedi: ni_at_a2150: Fix checkpatch warning
Fix checkpatch.pl warning 'line over 80 characters' Remove extra space after /* Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/ni_at_a2150.c | 170 ++- 1 file changed, 89 insertions(+), 81 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index 957fb9f..5a4dcc6 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -58,48 +58,52 @@ /* Registers and bits */ #define CONFIG_REG 0x0 -#define CHANNEL_BITS(x) ((x) & 0x7) +#define CHANNEL_BITS(x) ((x) & 0x7) #define CHANNEL_MASK 0x7 -#define CLOCK_SELECT_BITS(x) (((x) & 0x3) << 3) -#define CLOCK_DIVISOR_BITS(x)(((x) & 0x3) << 5) +#define CLOCK_SELECT_BITS(x) (((x) & 0x3) << 3) +#define CLOCK_DIVISOR_BITS(x)(((x) & 0x3) << 5) #define CLOCK_MASK (0xf << 3) -#define ENABLE0_BIT 0x80/* enable (don't internally ground) channels 0 and 1 */ -#define ENABLE1_BIT 0x100 /* enable (don't internally ground) channels 2 and 3 */ -#define AC0_BIT 0x200 /* ac couple channels 0,1 */ -#define AC1_BIT 0x400 /* ac couple channels 2,3 */ -#define APD_BIT 0x800 /* analog power down */ -#define DPD_BIT 0x1000 /* digital power down */ -#define TRIGGER_REG0x2 /* trigger config register */ -#define POST_TRIGGER_BITS0x2 -#define DELAY_TRIGGER_BITS 0x3 -#define HW_TRIG_EN 0x10/* enable hardware trigger */ -#define FIFO_START_REG 0x6 /* software start aquistion trigger */ -#define FIFO_RESET_REG 0x8 /* clears fifo + fifo flags */ -#define FIFO_DATA_REG 0xa /* read data */ -#define DMA_TC_CLEAR_REG 0xe /* clear dma terminal count interrupt */ -#define STATUS_REG 0x12/* read only */ -#define FNE_BIT 0x1 /* fifo not empty */ -#define OVFL_BIT 0x8 /* fifo overflow */ -#define EDAQ_BIT 0x10/* end of acquisition interrupt */ -#define DCAL_BIT 0x20/* offset calibration in progress */ -#define INTR_BIT 0x40/* interrupt has occurred */ -#define DMA_TC_BIT 0x80/* dma terminal count interrupt has occurred */ -#define ID_BITS(x) (((x) >> 8) & 0x3) -#define IRQ_DMA_CNTRL_REG 0x12/* write only */ -#define DMA_CHAN_BITS(x) ((x) & 0x7) /* sets dma channel */ -#define DMA_EN_BIT 0x8 /* enables dma */ -#define IRQ_LVL_BITS(x) (((x) & 0xf) << 4) /* sets irq level */ -#define FIFO_INTR_EN_BIT 0x100 /* enable fifo interrupts */ -#define FIFO_INTR_FHF_BIT0x200 /* interrupt fifo half full */ -#define DMA_INTR_EN_BIT 0x800 /* enable interrupt on dma terminal count */ -#define DMA_DEM_EN_BIT 0x1000 /* enables demand mode dma */ +/* enable (don't internally ground) channels 0 and 1 */ +#define ENABLE0_BIT 0x80 +/* enable (don't internally ground) channels 2 and 3 */ +#define ENABLE1_BIT 0x100 +#define AC0_BIT 0x200 /* ac couple channels 0,1 */ +#define AC1_BIT 0x400 /* ac couple channels 2,3 */ +#define APD_BIT 0x800 /* analog power down */ +#define DPD_BIT 0x1000 /* digital power down */ +#define TRIGGER_REG0x2 /* trigger config register */ +#define POST_TRIGGER_BITS0x2 +#define DELAY_TRIGGER_BITS 0x3 +#define HW_TRIG_EN 0x10/* enable hardware trigger */ +#define FIFO_START_REG 0x6 /* software start aquistion trigger */ +#define FIFO_RESET_REG 0x8 /* clears fifo + fifo flags */ +#define FIFO_DATA_REG 0xa /* read data */ +#define DMA_TC_CLEAR_REG 0xe /* clear dma terminal count interrupt */ +#define STATUS_REG 0x12/* read only */ +#define FNE_BIT 0x1 /* fifo not empty */ +#define OVFL_BIT 0x8 /* fifo overflow */ +#define EDAQ_BIT 0x10/* end of acquisition interrupt */ +#define DCAL_BIT 0x20/* offset calibration in progress */ +#define INTR_BIT 0x40/* interrupt has occurred */ +/* dma terminal count interrupt has occurred */ +#define DMA_TC_BIT 0x80 +#define ID_BITS(x) (((x) >> 8) & 0x3) +#define IRQ_DMA_CNTRL_REG 0x12/* write only */ +#define DMA_CHAN_BITS(x) ((x) & 0x7) /* sets dma channel */ +#define DMA_EN_BIT 0x8 /* enables dma */ +#define IRQ_LVL_BITS(x)
[PATCH v3 6/8] staging: comedi: jr3_pci.c: Fix checkpatch warning
Fix checkpatch.pl warning 'line over 80 characters' Remove extra space after /* Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/jr3_pci.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index 6c4ff02..8306f6b 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c @@ -141,7 +141,7 @@ static void set_transforms(struct jr3_channel __iomem *channel, { int i; - num &= 0x000f; /* Make sure that 0 <= num <= 15 */ + num &= 0x000f; /* Make sure that 0 <= num <= 15 */ for (i = 0; i < 8; i++) { set_u16(&channel->transforms[num].link[i].link_type, transf.link[i].link_type); @@ -323,10 +323,10 @@ static int read_idm_word(const u8 *data, size_t size, int *pos, int value; if (pos && val) { - /* Skip over non hex */ + /* Skip over non hex */ for (; *pos < size && !isxdigit(data[*pos]); (*pos)++) ; - /* Collect value */ + /* Collect value */ *val = 0; for (; *pos < size; (*pos)++) { value = hex_to_bin(data[*pos]); @@ -448,7 +448,8 @@ static int jr3_download_firmware(struct comedi_device *dev, return 0; } -static struct jr3_pci_poll_delay jr3_pci_poll_subdevice(struct comedi_subdevice *s) +static struct jr3_pci_poll_delay +jr3_pci_poll_subdevice(struct comedi_subdevice *s) { struct jr3_pci_subdev_private *spriv = s->private; struct jr3_pci_poll_delay result = poll_delay_min_max(1000, 2000); @@ -733,7 +734,7 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, } } - /* Reset DSP card */ + /* Reset DSP card */ writel(0, &devpriv->iobase->channel[0].reset); ret = comedi_load_firmware(dev, &comedi_to_pci_dev(dev)->dev, @@ -763,7 +764,7 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, data.copyright[i]) >> 8); } - /* Start card timer */ + /* Start card timer */ for (i = 0; i < dev->n_subdevices; i++) { s = &dev->subdevices[i]; spriv = s->private; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 8/8] staging: comedi: cb_pcidas64: Fix checkpath warning
Fix checkpatch.pl warning: Please use a blank line after function/struct/union/enum declarations Move macro definition to the top of the file Aligne macro definitions Signed-off-by: Anson Jacob --- drivers/staging/comedi/drivers/cb_pcidas64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index ac24c10..cb9c269 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -94,7 +94,8 @@ * maybe I'll support this someday */ #define PRESCALED_TIMER_BASE 1 -#define DMA_BUFFER_SIZE 0x1000 +#define DMA_BUFFER_SIZE0x1000 +#define DAC_FIFO_SIZE 0x2000 /* maximum value that can be loaded into board's 24-bit counters */ static const int max_counter_value = 0xff; @@ -227,7 +228,6 @@ enum hw_config_contents { DAC_FIFO_SIZE_MASK = 0xff00,/* bits that set dac fifo size */ DAC_FIFO_BITS = 0xf800, /* 8k sample ao fifo */ }; -#define DAC_FIFO_SIZE 0x2000 enum daq_atrig_low_4020_contents { /* use trig/ext clk bnc input for analog gate signal */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/2] staging: fsl-mc: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Fix Commenting Style Anson Jacob (2): staging: fsl-mc: dpmng-cmd: Fix checkpatch warning staging: fsl-mc: dprc-cmd: Fix checkpatch warning drivers/staging/fsl-mc/bus/dpmng-cmd.h | 15 --- drivers/staging/fsl-mc/bus/dprc-cmd.h | 15 --- 2 files changed, 16 insertions(+), 14 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: fsl-mc: dpmng-cmd: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Fix Commenting Style Signed-off-by: Anson Jacob --- drivers/staging/fsl-mc/bus/dpmng-cmd.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dpmng-cmd.h b/drivers/staging/fsl-mc/bus/dpmng-cmd.h index 779bf9c..a7b77d5 100644 --- a/drivers/staging/fsl-mc/bus/dpmng-cmd.h +++ b/drivers/staging/fsl-mc/bus/dpmng-cmd.h @@ -1,4 +1,5 @@ -/* Copyright 2013-2016 Freescale Semiconductor Inc. +/* + * Copyright 2013-2016 Freescale Semiconductor Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,12 +31,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/*//* - dpmng-cmd.h - - defines portal commands - - *//**/ +/* + * dpmng-cmd.h + * + * defines portal commands + * + */ #ifndef __FSL_DPMNG_CMD_H #define __FSL_DPMNG_CMD_H -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: fsl-mc: dprc-cmd: Fix checkpatch warning
Fix checkpatch.pl warning: Block comments use * on subsequent lines Fix Commenting Style Signed-off-by: Anson Jacob --- drivers/staging/fsl-mc/bus/dprc-cmd.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dprc-cmd.h b/drivers/staging/fsl-mc/bus/dprc-cmd.h index bb127f4..009d656 100644 --- a/drivers/staging/fsl-mc/bus/dprc-cmd.h +++ b/drivers/staging/fsl-mc/bus/dprc-cmd.h @@ -1,4 +1,5 @@ -/* Copyright 2013-2016 Freescale Semiconductor Inc. +/* + * Copyright 2013-2016 Freescale Semiconductor Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,12 +31,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/*//* - dprc-cmd.h - - defines dprc portal commands - - *//**/ +/* + * dprc-cmd.h + * + * defines dprc portal commands + * + */ #ifndef _FSL_DPRC_CMD_H #define _FSL_DPRC_CMD_H -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: i4l: act2000: capi: Fix checkpatch warning
Fix checkpath.pl warning: trailing statements should be on next line open brace '{' following function declarations go on the next line Signed-off-by: Anson Jacob --- drivers/staging/i4l/act2000/capi.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/i4l/act2000/capi.c b/drivers/staging/i4l/act2000/capi.c index 3f66ca2..799b723 100644 --- a/drivers/staging/i4l/act2000/capi.c +++ b/drivers/staging/i4l/act2000/capi.c @@ -113,7 +113,9 @@ actcapi_chkhdr(act2000_card *card, actcapi_msghdr *hdr) m->hdr.cmd.cmd = c; \ m->hdr.cmd.subcmd = s; \ m->hdr.msgnum = actcapi_nextsmsg(card); \ - } else m = NULL;\ + } else {\ + m = NULL; \ + } \ } #define ACTCAPI_CHKSKB if (!skb) { \ @@ -990,7 +992,8 @@ actcapi_debug_dlpd(actcapi_dlpd *dlpd) } #ifdef DEBUG_DUMP_SKB -static void dump_skb(struct sk_buff *skb) { +static void dump_skb(struct sk_buff *skb) +{ char tmp[80]; char *p = skb->data; char *t = tmp; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: i4l: act2000: Fix checkpatch warning
Fix checkpatch.pl warning: line over 80 characters Signed-off-by: Anson Jacob --- drivers/staging/i4l/act2000/act2000.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/i4l/act2000/act2000.h b/drivers/staging/i4l/act2000/act2000.h index 321d437..16be456 100644 --- a/drivers/staging/i4l/act2000/act2000.h +++ b/drivers/staging/i4l/act2000/act2000.h @@ -198,5 +198,5 @@ static inline void act2000_schedule_poll(act2000_card *card) extern char *act2000_find_eaz(act2000_card *, char); -#endif /* defined(__KERNEL__) || defined(__DEBUGVAR__) */ -#endif /* act2000_h */ +#endif /* defined(__KERNEL__) || defined(__DEBUGVAR__) */ +#endif /* act2000_h */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: i4l: act2000: Fix checkpatch warning
Fix checkpatch.pl warning: braces {} are not necessary for single statement blocks Missing a blank line after declarations Signed-off-by: Anson Jacob --- drivers/staging/i4l/act2000/act2000_isa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/i4l/act2000/act2000_isa.c b/drivers/staging/i4l/act2000/act2000_isa.c index f0eb844..fbb15f5 100644 --- a/drivers/staging/i4l/act2000/act2000_isa.c +++ b/drivers/staging/i4l/act2000/act2000_isa.c @@ -134,9 +134,9 @@ act2000_isa_config_irq(act2000_card *card, short irq) { int old_irq; - if (card->flags & ACT2000_FLAGS_IVALID) { + if (card->flags & ACT2000_FLAGS_IVALID) free_irq(card->irq, card); - } + card->flags &= ~ACT2000_FLAGS_IVALID; outb(ISA_COR_IRQOFF, ISA_PORT_COR); if (!irq) @@ -259,6 +259,7 @@ act2000_isa_receive(act2000_card *card) "act2000_isa_receive: Invalid CAPI msg\n"); { int i; __u8 *p; __u8 *t; __u8 tmp[30]; + for (i = 0, p = (__u8 *)&card->idat.isa.rcvhdr, t = tmp; i < 8; i++) t += sprintf(t, "%02x ", *(p++)); printk(KERN_WARNING "act2000_isa_receive: %s\n", tmp); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: i4l: act2000: Remove braces for single statement
Fix checkpatch.pl warning: braces {} are not necessary for single statement blocks Signed-off-by: Anson Jacob --- drivers/staging/i4l/act2000/act2000_isa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/i4l/act2000/act2000_isa.c b/drivers/staging/i4l/act2000/act2000_isa.c index f0eb844..1d93151 100644 --- a/drivers/staging/i4l/act2000/act2000_isa.c +++ b/drivers/staging/i4l/act2000/act2000_isa.c @@ -134,9 +134,9 @@ act2000_isa_config_irq(act2000_card *card, short irq) { int old_irq; - if (card->flags & ACT2000_FLAGS_IVALID) { + if (card->flags & ACT2000_FLAGS_IVALID) free_irq(card->irq, card); - } + card->flags &= ~ACT2000_FLAGS_IVALID; outb(ISA_COR_IRQOFF, ISA_PORT_COR); if (!irq) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: i4l: act2000: Add blank line after declaration
Fix checkpatch.pl warning: Missing a blank line after declarations Signed-off-by: Anson Jacob --- drivers/staging/i4l/act2000/act2000_isa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/i4l/act2000/act2000_isa.c b/drivers/staging/i4l/act2000/act2000_isa.c index 1d93151..fbb15f5 100644 --- a/drivers/staging/i4l/act2000/act2000_isa.c +++ b/drivers/staging/i4l/act2000/act2000_isa.c @@ -259,6 +259,7 @@ act2000_isa_receive(act2000_card *card) "act2000_isa_receive: Invalid CAPI msg\n"); { int i; __u8 *p; __u8 *t; __u8 tmp[30]; + for (i = 0, p = (__u8 *)&card->idat.isa.rcvhdr, t = tmp; i < 8; i++) t += sprintf(t, "%02x ", *(p++)); printk(KERN_WARNING "act2000_isa_receive: %s\n", tmp); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel