[PATCH] aout: incorrct use of strncpy fixed.
Found a bug with the source / dest length updated to have size limit as the size of dest not size or source. Signed-off-by: Derek Robson --- arch/x86/ia32/ia32_aout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index f65b78d32f5e..1e7f71723ee0 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c @@ -157,7 +157,7 @@ static int aout_core_dump(struct coredump_params *cprm) fs = get_fs(); set_fs(KERNEL_DS); has_dumped = 1; - strncpy(dump.u_comm, current->comm, sizeof(current->comm)); + strncpy(dump.u_comm, current->comm, sizeof(dump.u_comm)); dump.u_ar0 = offsetof(struct user32, regs); dump.signal = cprm->siginfo->si_signo; dump_thread32(cprm->regs, ); -- 2.20.1
Re: Regression in 4.16-rc7 - ipsec vpn broken
Thanks, that patch has solved issue. On Thu, Mar 29, 2018 at 7:51 PM, Steffen Klassert <steffen.klass...@secunet.com> wrote: > Please always make sure to Cc net...@vger.kernel.org > on networking problems. > > On Wed, Mar 28, 2018 at 10:21:32PM +, Derek Robson wrote: >> The ipsec VPN is broken in 4.16-rc7 and seem to have been broken in all of >> 4.15 >> >> connecting from an iphone seems to give a timeout. >> >> >> A bisect brings me to this commit as the one that is the issue. >> >> commit: acf568ee859f098279eadf551612f103afdacb4e (xfrm: Reinject >> transport-mode packets through tasklet) > > I have a fix queued for this commit in the ipsec tree. > > Can you please try if the patch below fixes your problems? > > Thanks! > > Subject: [PATCH] xfrm: Fix transport mode skb control buffer usage. > > A recent commit introduced a new struct xfrm_trans_cb > that is used with the sk_buff control buffer. Unfortunately > it placed the structure in front of the control buffer and > overlooked that the IPv4/IPv6 control buffer is still needed > for some layer 4 protocols. As a result the IPv4/IPv6 control > buffer is overwritten with this structure. Fix this by setting > a apropriate header in front of the structure. > > Fixes acf568ee859f ("xfrm: Reinject transport-mode packets ...") > Signed-off-by: Steffen Klassert <steffen.klass...@secunet.com> > --- > net/xfrm/xfrm_input.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c > index 1472c0857975..81788105c164 100644 > --- a/net/xfrm/xfrm_input.c > +++ b/net/xfrm/xfrm_input.c > @@ -26,6 +26,12 @@ struct xfrm_trans_tasklet { > }; > > struct xfrm_trans_cb { > + union { > + struct inet_skb_parmh4; > +#if IS_ENABLED(CONFIG_IPV6) > + struct inet6_skb_parm h6; > +#endif > + } header; > int (*finish)(struct net *net, struct sock *sk, struct sk_buff *skb); > }; > > -- > 2.14.1 >
Re: Regression in 4.16-rc7 - ipsec vpn broken
Thanks, that patch has solved issue. On Thu, Mar 29, 2018 at 7:51 PM, Steffen Klassert wrote: > Please always make sure to Cc net...@vger.kernel.org > on networking problems. > > On Wed, Mar 28, 2018 at 10:21:32PM +, Derek Robson wrote: >> The ipsec VPN is broken in 4.16-rc7 and seem to have been broken in all of >> 4.15 >> >> connecting from an iphone seems to give a timeout. >> >> >> A bisect brings me to this commit as the one that is the issue. >> >> commit: acf568ee859f098279eadf551612f103afdacb4e (xfrm: Reinject >> transport-mode packets through tasklet) > > I have a fix queued for this commit in the ipsec tree. > > Can you please try if the patch below fixes your problems? > > Thanks! > > Subject: [PATCH] xfrm: Fix transport mode skb control buffer usage. > > A recent commit introduced a new struct xfrm_trans_cb > that is used with the sk_buff control buffer. Unfortunately > it placed the structure in front of the control buffer and > overlooked that the IPv4/IPv6 control buffer is still needed > for some layer 4 protocols. As a result the IPv4/IPv6 control > buffer is overwritten with this structure. Fix this by setting > a apropriate header in front of the structure. > > Fixes acf568ee859f ("xfrm: Reinject transport-mode packets ...") > Signed-off-by: Steffen Klassert > --- > net/xfrm/xfrm_input.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c > index 1472c0857975..81788105c164 100644 > --- a/net/xfrm/xfrm_input.c > +++ b/net/xfrm/xfrm_input.c > @@ -26,6 +26,12 @@ struct xfrm_trans_tasklet { > }; > > struct xfrm_trans_cb { > + union { > + struct inet_skb_parmh4; > +#if IS_ENABLED(CONFIG_IPV6) > + struct inet6_skb_parm h6; > +#endif > + } header; > int (*finish)(struct net *net, struct sock *sk, struct sk_buff *skb); > }; > > -- > 2.14.1 >
Regression in 4.16-rc7 - ipsec vpn broken
The ipsec VPN is broken in 4.16-rc7 and seems to have been broken in all of 4.15 connecting from an iphone seems to give a timeout. A bisect brings me to this commit as the one that is the issue. commit: acf568ee859f098279eadf551612f103afdacb4e (xfrm: Reinject transport-mode packets through tasklet) Reverting commit acf568ee859f098279eadf551612f103afdacb4e against 4.16-rc7 causes the VPN to function again.
Regression in 4.16-rc7 - ipsec vpn broken
The ipsec VPN is broken in 4.16-rc7 and seems to have been broken in all of 4.15 connecting from an iphone seems to give a timeout. A bisect brings me to this commit as the one that is the issue. commit: acf568ee859f098279eadf551612f103afdacb4e (xfrm: Reinject transport-mode packets through tasklet) Reverting commit acf568ee859f098279eadf551612f103afdacb4e against 4.16-rc7 causes the VPN to function again.
[PATCH] Staging: pi433 - fix ccheckpatch issue, updated include line.
Updated the include of compat.h to fix checkpatch error Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/pi433/pi433_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index 1d7c50c1ac23..0555c76cea49 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -48,7 +48,7 @@ #include #include #ifdef CONFIG_COMPAT -#include +#include #endif #include "pi433_if.h" -- 2.15.1
[PATCH] Staging: pi433 - fix ccheckpatch issue, updated include line.
Updated the include of compat.h to fix checkpatch error Signed-off-by: Derek Robson --- drivers/staging/pi433/pi433_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index 1d7c50c1ac23..0555c76cea49 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -48,7 +48,7 @@ #include #include #ifdef CONFIG_COMPAT -#include +#include #endif #include "pi433_if.h" -- 2.15.1
[PATCH] Staging: Pi433: style fix - tabs and spaces
Fixed checkpatch errors, spaces before tabs. Found using checkpatch. Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/pi433/rf69.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h index fbccaae51c61..5c0c95628f2f 100644 --- a/drivers/staging/pi433/rf69.h +++ b/drivers/staging/pi433/rf69.h @@ -20,10 +20,10 @@ #include "rf69_enum.h" #include "rf69_registers.h" -#define F_OSC 3200 /* in Hz */ +#define F_OSC 3200 /* in Hz */ #define FREQUENCY 43392 /* in Hz, modifying this value impacts CE certification */ -#define FIFO_SIZE 66/* in byte */ -#define FIFO_THRESHOLD 15/* in byte */ +#define FIFO_SIZE 66 /* in byte */ +#define FIFO_THRESHOLD 15 /* in byte */ int rf69_set_mode(struct spi_device *spi, enum mode mode); int rf69_set_data_mode(struct spi_device *spi, enum dataMode dataMode); -- 2.14.1
[PATCH] Staging: Pi433: style fix - tabs and spaces
Fixed checkpatch errors, spaces before tabs. Found using checkpatch. Signed-off-by: Derek Robson --- drivers/staging/pi433/rf69.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h index fbccaae51c61..5c0c95628f2f 100644 --- a/drivers/staging/pi433/rf69.h +++ b/drivers/staging/pi433/rf69.h @@ -20,10 +20,10 @@ #include "rf69_enum.h" #include "rf69_registers.h" -#define F_OSC 3200 /* in Hz */ +#define F_OSC 3200 /* in Hz */ #define FREQUENCY 43392 /* in Hz, modifying this value impacts CE certification */ -#define FIFO_SIZE 66/* in byte */ -#define FIFO_THRESHOLD 15/* in byte */ +#define FIFO_SIZE 66 /* in byte */ +#define FIFO_THRESHOLD 15 /* in byte */ int rf69_set_mode(struct spi_device *spi, enum mode mode); int rf69_set_data_mode(struct spi_device *spi, enum dataMode dataMode); -- 2.14.1
[PATCH 3/3] staging: pi433: - style fix, space at start of line
Fixed checkpatch errors of "please, no spaces at the start of a line" Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/pi433/rf69.c | 4 +- drivers/staging/pi433/rf69_enum.h | 206 +++--- 2 files changed, 105 insertions(+), 105 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index d931437f0b6a..f450bbf3fbbc 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -440,8 +440,8 @@ int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse mant // check value for mantisse and exponent if (exponent > 7) INVALID_PARAM; if ( (mantisse!=mantisse16) && -(mantisse!=mantisse20) && - (mantisse!=mantisse24) ) INVALID_PARAM; + (mantisse!=mantisse20) && + (mantisse!=mantisse24) ) INVALID_PARAM; // read old value newValue = READ_REG(reg); diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h index fbfb59bd3f3d..635629415e63 100644 --- a/drivers/staging/pi433/rf69_enum.h +++ b/drivers/staging/pi433/rf69_enum.h @@ -20,181 +20,181 @@ enum optionOnOff { -optionOff, -optionOn + optionOff, + optionOn }; enum mode { -mode_sleep, -standby, -synthesizer, -transmit, -receive + mode_sleep, + standby, + synthesizer, + transmit, + receive }; enum dataMode { -packet, -continuous, -continuousNoSync + packet, + continuous, + continuousNoSync }; enum modulation { -OOK, -FSK + OOK, + FSK }; enum modShaping { -shapingOff, -shaping1_0, -shaping0_5, -shaping0_3, -shapingBR, -shaping2BR + shapingOff, + shaping1_0, + shaping0_5, + shaping0_3, + shapingBR, + shaping2BR }; enum paRamp { -ramp3400, -ramp2000, -ramp1000, -ramp500, -ramp250, -ramp125, -ramp100, -ramp62, -ramp50, -ramp40, -ramp31, -ramp25, -ramp20, -ramp15, -ramp12, -ramp10 + ramp3400, + ramp2000, + ramp1000, + ramp500, + ramp250, + ramp125, + ramp100, + ramp62, + ramp50, + ramp40, + ramp31, + ramp25, + ramp20, + ramp15, + ramp12, + ramp10 }; enum antennaImpedance { -fiftyOhm, -twohundretOhm + fiftyOhm, + twohundretOhm }; enum lnaGain { -automatic, -max, -maxMinus6, -maxMinus12, -maxMinus24, -maxMinus36, -maxMinus48, -undefined + automatic, + max, + maxMinus6, + maxMinus12, + maxMinus24, + maxMinus36, + maxMinus48, + undefined }; enum dccPercent { -dcc16Percent, -dcc8Percent, -dcc4Percent, -dcc2Percent, -dcc1Percent, -dcc0_5Percent, -dcc0_25Percent, -dcc0_125Percent + dcc16Percent, + dcc8Percent, + dcc4Percent, + dcc2Percent, + dcc1Percent, + dcc0_5Percent, + dcc0_25Percent, + dcc0_125Percent }; enum mantisse { -mantisse16, -mantisse20, -mantisse24 + mantisse16, + mantisse20, + mantisse24 }; enum thresholdType { -fixed, -peak, -average + fixed, + peak, + average }; enum thresholdStep { -step_0_5db, -step_1_0db, -step_1_5db, -step_2_0db, -step_3_0db, -step_4_0db, -step_5_0db, -step_6_0db + step_0_5db, + step_1_0db, + step_1_5db, + step_2_0db, + step_3_0db, + step_4_0db, + step_5_0db, + step_6_0db }; enum thresholdDecrement { -dec_every8th, -dec_every4th, -dec_every2nd, -dec_once, -dec_twice, -dec_4times, -dec_8times, -dec_16times + dec_every8th, + dec_every4th, + dec_every2nd, + dec_once, + dec_twice, + dec_4times, + dec_8times, + dec_16times }; enum flag { -modeSwitchCompleted, -readyToReceive, -readyToSend, -pllLocked, -rssiExceededThreshold, -timeout, -automode, -syncAddressMatch, -fifoFull, -//fifoNotEmpty, collision with next enum; replaced by following enum... -fifoEmpty, -fifoLevelBelowThreshold, -fifoOverrun, -packetSent, -payloadReady, -crcOk, -batteryLow + modeSwitchCompleted, + readyToReceive, + readyToSend, + pllLocked, + rssiExceededThreshold, + timeout, + automode, + syncAddressMatch, + fifoFull, + // fifoNotEmpty, collision with next enum; replaced by following enum... + fifoEmpty, + fifoLevelBelowThreshold, + fifoOverrun, + packetSent, + payloadReady, + crcOk, + batteryLow }; enum fifoFillCondit
[PATCH 3/3] staging: pi433: - style fix, space at start of line
Fixed checkpatch errors of "please, no spaces at the start of a line" Signed-off-by: Derek Robson --- drivers/staging/pi433/rf69.c | 4 +- drivers/staging/pi433/rf69_enum.h | 206 +++--- 2 files changed, 105 insertions(+), 105 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index d931437f0b6a..f450bbf3fbbc 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -440,8 +440,8 @@ int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg, enum mantisse mant // check value for mantisse and exponent if (exponent > 7) INVALID_PARAM; if ( (mantisse!=mantisse16) && -(mantisse!=mantisse20) && - (mantisse!=mantisse24) ) INVALID_PARAM; + (mantisse!=mantisse20) && + (mantisse!=mantisse24) ) INVALID_PARAM; // read old value newValue = READ_REG(reg); diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h index fbfb59bd3f3d..635629415e63 100644 --- a/drivers/staging/pi433/rf69_enum.h +++ b/drivers/staging/pi433/rf69_enum.h @@ -20,181 +20,181 @@ enum optionOnOff { -optionOff, -optionOn + optionOff, + optionOn }; enum mode { -mode_sleep, -standby, -synthesizer, -transmit, -receive + mode_sleep, + standby, + synthesizer, + transmit, + receive }; enum dataMode { -packet, -continuous, -continuousNoSync + packet, + continuous, + continuousNoSync }; enum modulation { -OOK, -FSK + OOK, + FSK }; enum modShaping { -shapingOff, -shaping1_0, -shaping0_5, -shaping0_3, -shapingBR, -shaping2BR + shapingOff, + shaping1_0, + shaping0_5, + shaping0_3, + shapingBR, + shaping2BR }; enum paRamp { -ramp3400, -ramp2000, -ramp1000, -ramp500, -ramp250, -ramp125, -ramp100, -ramp62, -ramp50, -ramp40, -ramp31, -ramp25, -ramp20, -ramp15, -ramp12, -ramp10 + ramp3400, + ramp2000, + ramp1000, + ramp500, + ramp250, + ramp125, + ramp100, + ramp62, + ramp50, + ramp40, + ramp31, + ramp25, + ramp20, + ramp15, + ramp12, + ramp10 }; enum antennaImpedance { -fiftyOhm, -twohundretOhm + fiftyOhm, + twohundretOhm }; enum lnaGain { -automatic, -max, -maxMinus6, -maxMinus12, -maxMinus24, -maxMinus36, -maxMinus48, -undefined + automatic, + max, + maxMinus6, + maxMinus12, + maxMinus24, + maxMinus36, + maxMinus48, + undefined }; enum dccPercent { -dcc16Percent, -dcc8Percent, -dcc4Percent, -dcc2Percent, -dcc1Percent, -dcc0_5Percent, -dcc0_25Percent, -dcc0_125Percent + dcc16Percent, + dcc8Percent, + dcc4Percent, + dcc2Percent, + dcc1Percent, + dcc0_5Percent, + dcc0_25Percent, + dcc0_125Percent }; enum mantisse { -mantisse16, -mantisse20, -mantisse24 + mantisse16, + mantisse20, + mantisse24 }; enum thresholdType { -fixed, -peak, -average + fixed, + peak, + average }; enum thresholdStep { -step_0_5db, -step_1_0db, -step_1_5db, -step_2_0db, -step_3_0db, -step_4_0db, -step_5_0db, -step_6_0db + step_0_5db, + step_1_0db, + step_1_5db, + step_2_0db, + step_3_0db, + step_4_0db, + step_5_0db, + step_6_0db }; enum thresholdDecrement { -dec_every8th, -dec_every4th, -dec_every2nd, -dec_once, -dec_twice, -dec_4times, -dec_8times, -dec_16times + dec_every8th, + dec_every4th, + dec_every2nd, + dec_once, + dec_twice, + dec_4times, + dec_8times, + dec_16times }; enum flag { -modeSwitchCompleted, -readyToReceive, -readyToSend, -pllLocked, -rssiExceededThreshold, -timeout, -automode, -syncAddressMatch, -fifoFull, -//fifoNotEmpty, collision with next enum; replaced by following enum... -fifoEmpty, -fifoLevelBelowThreshold, -fifoOverrun, -packetSent, -payloadReady, -crcOk, -batteryLow + modeSwitchCompleted, + readyToReceive, + readyToSend, + pllLocked, + rssiExceededThreshold, + timeout, + automode, + syncAddressMatch, + fifoFull, + // fifoNotEmpty, collision with next enum; replaced by following enum... + fifoEmpty, + fifoLevelBelowThreshold, + fifoOverrun, + packetSent, + payloadReady, + crcOk, + batteryLow }; enum fifoFillCondition {
[PATCH 2/3] staging: pi433: - style fix, space before tabs
Fixed checkpatch errors of "no space before tabs" Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/pi433/pi433_if.c | 12 ++-- drivers/staging/pi433/pi433_if.h | 4 ++-- drivers/staging/pi433/rf69.c | 8 drivers/staging/pi433/rf69.h | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index 9cdebe93657c..b9e9292c01d9 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -190,12 +190,12 @@ rf69_set_rx_cfg(struct pi433_device *dev, struct pi433_rx_cfg *rx_cfg) SET_CHECKED(rf69_set_frequency (dev->spi, rx_cfg->frequency)); SET_CHECKED(rf69_set_bit_rate (dev->spi, rx_cfg->bit_rate)); SET_CHECKED(rf69_set_modulation (dev->spi, rx_cfg->modulation)); - SET_CHECKED(rf69_set_antenna_impedance (dev->spi, rx_cfg->antenna_impedance)); - SET_CHECKED(rf69_set_rssi_threshold (dev->spi, rx_cfg->rssi_threshold)); - SET_CHECKED(rf69_set_ook_threshold_dec (dev->spi, rx_cfg->thresholdDecrement)); - SET_CHECKED(rf69_set_bandwidth (dev->spi, rx_cfg->bw_mantisse, rx_cfg->bw_exponent)); + SET_CHECKED(rf69_set_antenna_impedance(dev->spi, rx_cfg->antenna_impedance)); + SET_CHECKED(rf69_set_rssi_threshold(dev->spi, rx_cfg->rssi_threshold)); + SET_CHECKED(rf69_set_ook_threshold_dec(dev->spi, rx_cfg->thresholdDecrement)); + SET_CHECKED(rf69_set_bandwidth(dev->spi, rx_cfg->bw_mantisse, rx_cfg->bw_exponent)); SET_CHECKED(rf69_set_bandwidth_during_afc(dev->spi, rx_cfg->bw_mantisse, rx_cfg->bw_exponent)); - SET_CHECKED(rf69_set_dagc(dev->spi, rx_cfg->dagc)); + SET_CHECKED(rf69_set_dagc(dev->spi, rx_cfg->dagc)); dev->rx_bytes_to_drop = rx_cfg->bytes_to_drop; @@ -959,7 +959,7 @@ static int pi433_release(struct inode *inode, struct file *filp) static int setup_GPIOs(struct pi433_device *device) { - charname[5]; + charname[5]; int retval; int i; diff --git a/drivers/staging/pi433/pi433_if.h b/drivers/staging/pi433/pi433_if.h index e6ed3cd9b2e2..aae71f029c60 100644 --- a/drivers/staging/pi433/pi433_if.h +++ b/drivers/staging/pi433/pi433_if.h @@ -57,7 +57,7 @@ * * NOTE: struct layout is the same in 64bit and 32bit userspace. */ -#define PI433_TX_CFG_IOCTL_NR 0 +#define PI433_TX_CFG_IOCTL_NR 0 struct pi433_tx_cfg { __u32 frequency; @@ -107,7 +107,7 @@ struct pi433_tx_cfg * * NOTE: struct layout is the same in 64bit and 32bit userspace. */ -#define PI433_RX_CFG_IOCTL_NR 1 +#define PI433_RX_CFG_IOCTL_NR 1 struct pi433_rx_cfg { __u32 frequency; __u16 bit_rate; diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 7f4db9a1f39a..d931437f0b6a 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -28,8 +28,8 @@ #include "rf69.h" #include "rf69_registers.h" -#define F_OSC3200 /* in Hz */ -#define FIFO_SIZE 66 /* in byte */ +#define F_OSC 3200 /* in Hz */ +#define FIFO_SIZE 66 /* in byte */ /*-*/ @@ -885,8 +885,8 @@ int rf69_read_fifo (struct spi_device *spi, u8 *buffer, unsigned int size) /* prepare a bidirectional transfer */ local_buffer[0] = REG_FIFO; memset(, 0, sizeof(transfer)); - transfer.tx_buf = local_buffer; - transfer.rx_buf = local_buffer; + transfer.tx_buf = local_buffer; + transfer.rx_buf = local_buffer; transfer.len= size+1; retval = spi_sync_transfer(spi, , 1); diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h index b81e0762032e..373df64b6891 100644 --- a/drivers/staging/pi433/rf69.h +++ b/drivers/staging/pi433/rf69.h @@ -20,10 +20,10 @@ #include "rf69_enum.h" #include "rf69_registers.h" -#define F_OSC 3200 /* in Hz */ +#define F_OSC 3200 /* in Hz */ #define FREQUENCY 43392 /* in Hz, modifying this value impacts CE certification */ -#define FIFO_SIZE 66/* in byte */ -#define FIFO_THRESHOLD 15/* in byte */ +#define FIFO_SIZE 66 /* in byte */ +#define FIFO_THRESHOLD 15 /* in byte */ int rf69_set_mode(struct spi_device *spi, enum mode mode); int rf69_set_data_mode(struct spi_device *spi, enum dataMode dataMode); -- 2.13.2
[PATCH 2/3] staging: pi433: - style fix, space before tabs
Fixed checkpatch errors of "no space before tabs" Signed-off-by: Derek Robson --- drivers/staging/pi433/pi433_if.c | 12 ++-- drivers/staging/pi433/pi433_if.h | 4 ++-- drivers/staging/pi433/rf69.c | 8 drivers/staging/pi433/rf69.h | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index 9cdebe93657c..b9e9292c01d9 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -190,12 +190,12 @@ rf69_set_rx_cfg(struct pi433_device *dev, struct pi433_rx_cfg *rx_cfg) SET_CHECKED(rf69_set_frequency (dev->spi, rx_cfg->frequency)); SET_CHECKED(rf69_set_bit_rate (dev->spi, rx_cfg->bit_rate)); SET_CHECKED(rf69_set_modulation (dev->spi, rx_cfg->modulation)); - SET_CHECKED(rf69_set_antenna_impedance (dev->spi, rx_cfg->antenna_impedance)); - SET_CHECKED(rf69_set_rssi_threshold (dev->spi, rx_cfg->rssi_threshold)); - SET_CHECKED(rf69_set_ook_threshold_dec (dev->spi, rx_cfg->thresholdDecrement)); - SET_CHECKED(rf69_set_bandwidth (dev->spi, rx_cfg->bw_mantisse, rx_cfg->bw_exponent)); + SET_CHECKED(rf69_set_antenna_impedance(dev->spi, rx_cfg->antenna_impedance)); + SET_CHECKED(rf69_set_rssi_threshold(dev->spi, rx_cfg->rssi_threshold)); + SET_CHECKED(rf69_set_ook_threshold_dec(dev->spi, rx_cfg->thresholdDecrement)); + SET_CHECKED(rf69_set_bandwidth(dev->spi, rx_cfg->bw_mantisse, rx_cfg->bw_exponent)); SET_CHECKED(rf69_set_bandwidth_during_afc(dev->spi, rx_cfg->bw_mantisse, rx_cfg->bw_exponent)); - SET_CHECKED(rf69_set_dagc(dev->spi, rx_cfg->dagc)); + SET_CHECKED(rf69_set_dagc(dev->spi, rx_cfg->dagc)); dev->rx_bytes_to_drop = rx_cfg->bytes_to_drop; @@ -959,7 +959,7 @@ static int pi433_release(struct inode *inode, struct file *filp) static int setup_GPIOs(struct pi433_device *device) { - charname[5]; + charname[5]; int retval; int i; diff --git a/drivers/staging/pi433/pi433_if.h b/drivers/staging/pi433/pi433_if.h index e6ed3cd9b2e2..aae71f029c60 100644 --- a/drivers/staging/pi433/pi433_if.h +++ b/drivers/staging/pi433/pi433_if.h @@ -57,7 +57,7 @@ * * NOTE: struct layout is the same in 64bit and 32bit userspace. */ -#define PI433_TX_CFG_IOCTL_NR 0 +#define PI433_TX_CFG_IOCTL_NR 0 struct pi433_tx_cfg { __u32 frequency; @@ -107,7 +107,7 @@ struct pi433_tx_cfg * * NOTE: struct layout is the same in 64bit and 32bit userspace. */ -#define PI433_RX_CFG_IOCTL_NR 1 +#define PI433_RX_CFG_IOCTL_NR 1 struct pi433_rx_cfg { __u32 frequency; __u16 bit_rate; diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 7f4db9a1f39a..d931437f0b6a 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -28,8 +28,8 @@ #include "rf69.h" #include "rf69_registers.h" -#define F_OSC3200 /* in Hz */ -#define FIFO_SIZE 66 /* in byte */ +#define F_OSC 3200 /* in Hz */ +#define FIFO_SIZE 66 /* in byte */ /*-*/ @@ -885,8 +885,8 @@ int rf69_read_fifo (struct spi_device *spi, u8 *buffer, unsigned int size) /* prepare a bidirectional transfer */ local_buffer[0] = REG_FIFO; memset(, 0, sizeof(transfer)); - transfer.tx_buf = local_buffer; - transfer.rx_buf = local_buffer; + transfer.tx_buf = local_buffer; + transfer.rx_buf = local_buffer; transfer.len= size+1; retval = spi_sync_transfer(spi, , 1); diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h index b81e0762032e..373df64b6891 100644 --- a/drivers/staging/pi433/rf69.h +++ b/drivers/staging/pi433/rf69.h @@ -20,10 +20,10 @@ #include "rf69_enum.h" #include "rf69_registers.h" -#define F_OSC 3200 /* in Hz */ +#define F_OSC 3200 /* in Hz */ #define FREQUENCY 43392 /* in Hz, modifying this value impacts CE certification */ -#define FIFO_SIZE 66/* in byte */ -#define FIFO_THRESHOLD 15/* in byte */ +#define FIFO_SIZE 66 /* in byte */ +#define FIFO_THRESHOLD 15 /* in byte */ int rf69_set_mode(struct spi_device *spi, enum mode mode); int rf69_set_data_mode(struct spi_device *spi, enum dataMode dataMode); -- 2.13.2
[PATCH 1/3] staging: pi433: Style fix - align block comments
Fixed the alignment of block comments Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/pi433/pi433_if.c | 38 +++-- drivers/staging/pi433/rf69.c | 10 +- drivers/staging/pi433/rf69_registers.h | 280 - 3 files changed, 169 insertions(+), 159 deletions(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index 1bc478a7f49e..9cdebe93657c 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -67,9 +67,11 @@ static DEFINE_MUTEX(minor_lock); /* Protect idr accesses */ static struct class *pi433_class; /* mainly for udev to create /dev/pi433 */ /* tx config is instance specific - so with each open a new tx config struct is needed */ + * so with each open a new tx config struct is needed + */ /* rx config is device specific - so we have just one rx config, ebedded in device struct */ + * so we have just one rx config, ebedded in device struct + */ struct pi433_device { /* device handling related values */ dev_t devt; @@ -486,9 +488,10 @@ pi433_tx_thread(void *data) return 0; /* get data from fifo in the following order: - - tx_cfg - - size of message - - message */ +* - tx_cfg +* - size of message +* - message +*/ mutex_lock(>tx_fifo_lock); retval = kfifo_out(>tx_fifo, _cfg, sizeof(tx_cfg)); @@ -537,23 +540,26 @@ pi433_tx_thread(void *data) mutex_unlock(>tx_fifo_lock); /* if rx is active, we need to interrupt the waiting for - incoming telegrams, to be able to send something. - We are only allowed, if currently no reception takes - place otherwise we need to wait for the incoming telegram - to finish */ +* incoming telegrams, to be able to send something. +* We are only allowed, if currently no reception takes +* place otherwise we need to wait for the incoming telegram +* to finish +*/ wait_event_interruptible(device->tx_wait_queue, !device->rx_active || device->interrupt_rx_allowed == true); /* prevent race conditions - irq will be reenabled after tx config is set */ +* irq will be reenabled after tx config is set +*/ disable_irq(device->irq_num[DIO0]); device->tx_active = true; if (device->rx_active && rx_interrupted == false) { /* rx is currently waiting for a telegram; - we need to set the radio module to standby */ +* we need to set the radio module to standby +*/ SET_CHECKED(rf69_set_mode(device->spi, standby)); rx_interrupted = true; } @@ -712,9 +718,10 @@ pi433_write(struct file *filp, const char __user *buf, return -EMSGSIZE; /* write the following sequence into fifo: - - tx_cfg - - size of message - - message */ +* - tx_cfg +* - size of message +* - message +*/ mutex_lock(>tx_fifo_lock); retval = kfifo_in(>tx_fifo, >tx_cfg, sizeof(instance->tx_cfg)); if ( retval != sizeof(instance->tx_cfg) ) @@ -1269,7 +1276,8 @@ static int __init pi433_init(void) int status; /* If MAX_MSG_SIZE is smaller then FIFO_SIZE, the driver won't - work stable - risk of buffer overflow */ +* work stable - risk of buffer overflow +*/ if (MAX_MSG_SIZE < FIFO_SIZE) return -EINVAL; diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index e391ce777bc7..7f4db9a1f39a 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -939,8 +939,9 @@ u8 rf69_read_reg(struct spi_device *spi, u8 addr) #ifdef DEBUG_VALUES if (retval < 0) /* should never happen, since we already checked, - that module is connected. Therefore no error - handling, just an optional error message... */ +* that module is connected. Therefore no error +* handling, just an optional error message... +*/ dev_dbg(>dev, "read 0x%x FAILED\n", addr); else @@ -965,8 +966,9 @@
[PATCH 1/3] staging: pi433: Style fix - align block comments
Fixed the alignment of block comments Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/pi433/pi433_if.c | 38 +++-- drivers/staging/pi433/rf69.c | 10 +- drivers/staging/pi433/rf69_registers.h | 280 - 3 files changed, 169 insertions(+), 159 deletions(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index 1bc478a7f49e..9cdebe93657c 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -67,9 +67,11 @@ static DEFINE_MUTEX(minor_lock); /* Protect idr accesses */ static struct class *pi433_class; /* mainly for udev to create /dev/pi433 */ /* tx config is instance specific - so with each open a new tx config struct is needed */ + * so with each open a new tx config struct is needed + */ /* rx config is device specific - so we have just one rx config, ebedded in device struct */ + * so we have just one rx config, ebedded in device struct + */ struct pi433_device { /* device handling related values */ dev_t devt; @@ -486,9 +488,10 @@ pi433_tx_thread(void *data) return 0; /* get data from fifo in the following order: - - tx_cfg - - size of message - - message */ +* - tx_cfg +* - size of message +* - message +*/ mutex_lock(>tx_fifo_lock); retval = kfifo_out(>tx_fifo, _cfg, sizeof(tx_cfg)); @@ -537,23 +540,26 @@ pi433_tx_thread(void *data) mutex_unlock(>tx_fifo_lock); /* if rx is active, we need to interrupt the waiting for - incoming telegrams, to be able to send something. - We are only allowed, if currently no reception takes - place otherwise we need to wait for the incoming telegram - to finish */ +* incoming telegrams, to be able to send something. +* We are only allowed, if currently no reception takes +* place otherwise we need to wait for the incoming telegram +* to finish +*/ wait_event_interruptible(device->tx_wait_queue, !device->rx_active || device->interrupt_rx_allowed == true); /* prevent race conditions - irq will be reenabled after tx config is set */ +* irq will be reenabled after tx config is set +*/ disable_irq(device->irq_num[DIO0]); device->tx_active = true; if (device->rx_active && rx_interrupted == false) { /* rx is currently waiting for a telegram; - we need to set the radio module to standby */ +* we need to set the radio module to standby +*/ SET_CHECKED(rf69_set_mode(device->spi, standby)); rx_interrupted = true; } @@ -712,9 +718,10 @@ pi433_write(struct file *filp, const char __user *buf, return -EMSGSIZE; /* write the following sequence into fifo: - - tx_cfg - - size of message - - message */ +* - tx_cfg +* - size of message +* - message +*/ mutex_lock(>tx_fifo_lock); retval = kfifo_in(>tx_fifo, >tx_cfg, sizeof(instance->tx_cfg)); if ( retval != sizeof(instance->tx_cfg) ) @@ -1269,7 +1276,8 @@ static int __init pi433_init(void) int status; /* If MAX_MSG_SIZE is smaller then FIFO_SIZE, the driver won't - work stable - risk of buffer overflow */ +* work stable - risk of buffer overflow +*/ if (MAX_MSG_SIZE < FIFO_SIZE) return -EINVAL; diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index e391ce777bc7..7f4db9a1f39a 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -939,8 +939,9 @@ u8 rf69_read_reg(struct spi_device *spi, u8 addr) #ifdef DEBUG_VALUES if (retval < 0) /* should never happen, since we already checked, - that module is connected. Therefore no error - handling, just an optional error message... */ +* that module is connected. Therefore no error +* handling, just an optional error message... +*/ dev_dbg(>dev, "read 0x%x FAILED\n", addr); else @@ -965,8 +966,9 @@ int rf69_write_reg
[PATCH 0/3] Drivers: pi433: Style fix
Assorted styel fix across whole driver Found using checkpatch Derek Robson (3): staging: pi433: Style fix - align block comments staging: pi433: - style fix, space before tabs staging: pi433: - style fix, space at start of line drivers/staging/pi433/pi433_if.c | 50 +++--- drivers/staging/pi433/pi433_if.h | 4 +- drivers/staging/pi433/rf69.c | 22 +-- drivers/staging/pi433/rf69.h | 6 +- drivers/staging/pi433/rf69_enum.h | 206 drivers/staging/pi433/rf69_registers.h | 280 - 6 files changed, 289 insertions(+), 279 deletions(-) -- 2.13.2
[PATCH 0/3] Drivers: pi433: Style fix
Assorted styel fix across whole driver Found using checkpatch Derek Robson (3): staging: pi433: Style fix - align block comments staging: pi433: - style fix, space before tabs staging: pi433: - style fix, space at start of line drivers/staging/pi433/pi433_if.c | 50 +++--- drivers/staging/pi433/pi433_if.h | 4 +- drivers/staging/pi433/rf69.c | 22 +-- drivers/staging/pi433/rf69.h | 6 +- drivers/staging/pi433/rf69_enum.h | 206 drivers/staging/pi433/rf69_registers.h | 280 - 6 files changed, 289 insertions(+), 279 deletions(-) -- 2.13.2
[PATCH] Bluetooth: Style fix - align block comments
Fixed alignment of all block comments. Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/bluetooth/ath3k.c | 3 ++- drivers/bluetooth/bt3c_cs.c | 8 +--- drivers/bluetooth/btmrvl_sdio.c | 6 -- drivers/bluetooth/btsdio.c | 3 ++- drivers/bluetooth/btuart_cs.c | 8 +--- drivers/bluetooth/btusb.c | 15 ++- drivers/bluetooth/btwilink.c| 6 +++--- drivers/bluetooth/hci_ldisc.c | 3 ++- drivers/bluetooth/hci_ll.c | 3 ++- 9 files changed, 35 insertions(+), 20 deletions(-) diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index b793853ff05f..204afe66de92 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c @@ -140,7 +140,8 @@ MODULE_DEVICE_TABLE(usb, ath3k_table); #define BTUSB_ATH3012 0x80 /* This table is to load patch and sysconfig files - * for AR3012 */ + * for AR3012 + */ static const struct usb_device_id ath3k_blist_tbl[] = { /* Atheros AR3012 with sflash firmware*/ diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 32dcac017395..194788739a83 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c @@ -684,14 +684,16 @@ static int bt3c_config(struct pcmcia_device *link) unsigned long try; /* First pass: look for a config entry that looks normal. - Two tries: without IO aliases, then with aliases */ +* Two tries: without IO aliases, then with aliases +*/ for (try = 0; try < 2; try++) if (!pcmcia_loop_config(link, bt3c_check_config, (void *) try)) goto found_port; /* Second pass: try to find an entry that isn't picky about - its base address, then try to grab any standard serial port - address, and finally try to get any free port. */ +* its base address, then try to grab any standard serial port +* address, and finally try to get any free port. +*/ if (!pcmcia_loop_config(link, bt3c_check_config_notpicky, NULL)) goto found_port; diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index eb794f08b238..03341ce98c32 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c @@ -1455,7 +1455,8 @@ static void btmrvl_sdio_dump_firmware(struct btmrvl_private *priv) fw_dump_ptr = fw_dump_data; /* Dump all the memory data into single file, a userspace script will - be used to split all the memory data to multiple files*/ +* be used to split all the memory data to multiple files +*/ BT_INFO("== btmrvl firmware dump to /sys/class/devcoredump start"); for (idx = 0; idx < dump_num; idx++) { struct memory_type_mapping *entry = _type_mapping_tbl[idx]; @@ -1482,7 +1483,8 @@ static void btmrvl_sdio_dump_firmware(struct btmrvl_private *priv) } /* fw_dump_data will be free in device coredump release function - after 5 min*/ +* after 5 min +*/ dev_coredumpv(>func->dev, fw_dump_data, fw_dump_len, GFP_KERNEL); BT_INFO("== btmrvl firmware dump to /sys/class/devcoredump end"); } diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c index 1cb958e199eb..c8e945d19ffe 100644 --- a/drivers/bluetooth/btsdio.c +++ b/drivers/bluetooth/btsdio.c @@ -144,7 +144,8 @@ static int btsdio_rx_packet(struct btsdio_data *data) if (!skb) { /* Out of memory. Prepare a read retry and just * return with the expectation that the next time -* we're called we'll have more memory. */ +* we're called we'll have more memory. +*/ return -ENOMEM; } diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index 7df79bb12350..310e9c2e09b6 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c @@ -614,14 +614,16 @@ static int btuart_config(struct pcmcia_device *link) int try; /* First pass: look for a config entry that looks normal. - Two tries: without IO aliases, then with aliases */ +* Two tries: without IO aliases, then with aliases +*/ for (try = 0; try < 2; try++) if (!pcmcia_loop_config(link, btuart_check_config, )) goto found_port; /* Second pass: try to find an entry that isn't picky about - its base address, then try to grab any standard serial port - address, and finally try to get any free port. */ +* its base address, then try to grab any standard serial port +* address, and finally try to get any free port. +*/ if (!pcmcia_loop_config(link, btuart_check_config_notpicky, NULL)) goto found_port; diff --git a/drivers/blue
[PATCH] Bluetooth: Style fix - align block comments
Fixed alignment of all block comments. Found using checkpatch Signed-off-by: Derek Robson --- drivers/bluetooth/ath3k.c | 3 ++- drivers/bluetooth/bt3c_cs.c | 8 +--- drivers/bluetooth/btmrvl_sdio.c | 6 -- drivers/bluetooth/btsdio.c | 3 ++- drivers/bluetooth/btuart_cs.c | 8 +--- drivers/bluetooth/btusb.c | 15 ++- drivers/bluetooth/btwilink.c| 6 +++--- drivers/bluetooth/hci_ldisc.c | 3 ++- drivers/bluetooth/hci_ll.c | 3 ++- 9 files changed, 35 insertions(+), 20 deletions(-) diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index b793853ff05f..204afe66de92 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c @@ -140,7 +140,8 @@ MODULE_DEVICE_TABLE(usb, ath3k_table); #define BTUSB_ATH3012 0x80 /* This table is to load patch and sysconfig files - * for AR3012 */ + * for AR3012 + */ static const struct usb_device_id ath3k_blist_tbl[] = { /* Atheros AR3012 with sflash firmware*/ diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 32dcac017395..194788739a83 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c @@ -684,14 +684,16 @@ static int bt3c_config(struct pcmcia_device *link) unsigned long try; /* First pass: look for a config entry that looks normal. - Two tries: without IO aliases, then with aliases */ +* Two tries: without IO aliases, then with aliases +*/ for (try = 0; try < 2; try++) if (!pcmcia_loop_config(link, bt3c_check_config, (void *) try)) goto found_port; /* Second pass: try to find an entry that isn't picky about - its base address, then try to grab any standard serial port - address, and finally try to get any free port. */ +* its base address, then try to grab any standard serial port +* address, and finally try to get any free port. +*/ if (!pcmcia_loop_config(link, bt3c_check_config_notpicky, NULL)) goto found_port; diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index eb794f08b238..03341ce98c32 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c @@ -1455,7 +1455,8 @@ static void btmrvl_sdio_dump_firmware(struct btmrvl_private *priv) fw_dump_ptr = fw_dump_data; /* Dump all the memory data into single file, a userspace script will - be used to split all the memory data to multiple files*/ +* be used to split all the memory data to multiple files +*/ BT_INFO("== btmrvl firmware dump to /sys/class/devcoredump start"); for (idx = 0; idx < dump_num; idx++) { struct memory_type_mapping *entry = _type_mapping_tbl[idx]; @@ -1482,7 +1483,8 @@ static void btmrvl_sdio_dump_firmware(struct btmrvl_private *priv) } /* fw_dump_data will be free in device coredump release function - after 5 min*/ +* after 5 min +*/ dev_coredumpv(>func->dev, fw_dump_data, fw_dump_len, GFP_KERNEL); BT_INFO("== btmrvl firmware dump to /sys/class/devcoredump end"); } diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c index 1cb958e199eb..c8e945d19ffe 100644 --- a/drivers/bluetooth/btsdio.c +++ b/drivers/bluetooth/btsdio.c @@ -144,7 +144,8 @@ static int btsdio_rx_packet(struct btsdio_data *data) if (!skb) { /* Out of memory. Prepare a read retry and just * return with the expectation that the next time -* we're called we'll have more memory. */ +* we're called we'll have more memory. +*/ return -ENOMEM; } diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index 7df79bb12350..310e9c2e09b6 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c @@ -614,14 +614,16 @@ static int btuart_config(struct pcmcia_device *link) int try; /* First pass: look for a config entry that looks normal. - Two tries: without IO aliases, then with aliases */ +* Two tries: without IO aliases, then with aliases +*/ for (try = 0; try < 2; try++) if (!pcmcia_loop_config(link, btuart_check_config, )) goto found_port; /* Second pass: try to find an entry that isn't picky about - its base address, then try to grab any standard serial port - address, and finally try to get any free port. */ +* its base address, then try to grab any standard serial port +* address, and finally try to get any free port. +*/ if (!pcmcia_loop_config(link, btuart_check_config_notpicky, NULL)) goto found_port; diff --git a/drivers/bluetooth/btusb.c b/drivers/b
[PATCH V3] staging: rtl8192u - add parameter names
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- V2 had vauge subject and V1 comment above the line V1 had vauge subject drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h | 4 ++-- drivers/staging/rtl8192u/r8192U.h| 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 899c77ed2a43..b062cad052b9 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2187,7 +2187,7 @@ int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, struct sk_buff *frag, int hdr_len); int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); -void ieee80211_txb_free(struct ieee80211_txb *); +void ieee80211_txb_free(struct ieee80211_txb *txb); /* ieee80211_rx.c */ diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h index 005bf89aae65..a0aa0f5be63a 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h @@ -82,8 +82,8 @@ struct ieee80211_crypt_data { int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops); int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops); struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name); -void ieee80211_crypt_deinit_entries(struct ieee80211_device *, int); -void ieee80211_crypt_deinit_handler(unsigned long); +void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force); +void ieee80211_crypt_deinit_handler(unsigned long data); void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee, struct ieee80211_crypt_data **crypt); diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4c7a5e3d3e5e..51c150a39fc2 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1147,9 +1147,9 @@ int write_nic_word(struct net_device *dev, int x, u16 y); int write_nic_dword(struct net_device *dev, int x, u32 y); void force_pci_posting(struct net_device *dev); -void rtl8192_rtx_disable(struct net_device *); -void rtl8192_rx_enable(struct net_device *); -void rtl8192_tx_enable(struct net_device *); +void rtl8192_rtx_disable(struct net_device *dev); +void rtl8192_rx_enable(struct net_device *dev); +void rtl8192_tx_enable(struct net_device *dev); void rtl8192_disassociate(struct net_device *dev); void rtl8185_set_rf_pins_enable(struct net_device *dev, u32 a); -- 2.13.0
[PATCH V3] staging: rtl8192u - add parameter names
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson --- V2 had vauge subject and V1 comment above the line V1 had vauge subject drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h | 4 ++-- drivers/staging/rtl8192u/r8192U.h| 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 899c77ed2a43..b062cad052b9 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2187,7 +2187,7 @@ int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, struct sk_buff *frag, int hdr_len); int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); -void ieee80211_txb_free(struct ieee80211_txb *); +void ieee80211_txb_free(struct ieee80211_txb *txb); /* ieee80211_rx.c */ diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h index 005bf89aae65..a0aa0f5be63a 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h @@ -82,8 +82,8 @@ struct ieee80211_crypt_data { int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops); int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops); struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name); -void ieee80211_crypt_deinit_entries(struct ieee80211_device *, int); -void ieee80211_crypt_deinit_handler(unsigned long); +void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force); +void ieee80211_crypt_deinit_handler(unsigned long data); void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee, struct ieee80211_crypt_data **crypt); diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4c7a5e3d3e5e..51c150a39fc2 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1147,9 +1147,9 @@ int write_nic_word(struct net_device *dev, int x, u16 y); int write_nic_dword(struct net_device *dev, int x, u32 y); void force_pci_posting(struct net_device *dev); -void rtl8192_rtx_disable(struct net_device *); -void rtl8192_rx_enable(struct net_device *); -void rtl8192_tx_enable(struct net_device *); +void rtl8192_rtx_disable(struct net_device *dev); +void rtl8192_rx_enable(struct net_device *dev); +void rtl8192_tx_enable(struct net_device *dev); void rtl8192_disassociate(struct net_device *dev); void rtl8185_set_rf_pins_enable(struct net_device *dev, u32 a); -- 2.13.0
[PATCH V3] staging: sm750fb - add parameter names
Fixed checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson <robso...@gmail.com> --- V2 had V1 comment above the line V1 had vauge subject line drivers/staging/sm750fb/sm750.h | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 5b186dafedec..4386122799b2 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -189,14 +189,22 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev); int hw_sm750_deWait(void); int hw_sm750le_deWait(void); -int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*); -int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort); -int hw_sm750_setBLANK(struct lynxfb_output*, int); -int hw_sm750le_setBLANK(struct lynxfb_output*, int); +int hw_sm750_output_setMode(struct lynxfb_output *output, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var); + +int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_setColReg(struct lynxfb_crtc *crtc, ushort index, + ushort red, ushort green, ushort blue); + +int hw_sm750_setBLANK(struct lynxfb_output *output, int blank); +int hw_sm750le_setBLANK(struct lynxfb_output *output, int blank); int hw_sm750_pan_display(struct lynxfb_crtc *crtc, const struct fb_var_screeninfo *var, const struct fb_info *info); -- 2.13.0
[PATCH V3] staging: sm750fb - add parameter names
Fixed checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson --- V2 had V1 comment above the line V1 had vauge subject line drivers/staging/sm750fb/sm750.h | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 5b186dafedec..4386122799b2 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -189,14 +189,22 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev); int hw_sm750_deWait(void); int hw_sm750le_deWait(void); -int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*); -int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort); -int hw_sm750_setBLANK(struct lynxfb_output*, int); -int hw_sm750le_setBLANK(struct lynxfb_output*, int); +int hw_sm750_output_setMode(struct lynxfb_output *output, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var); + +int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_setColReg(struct lynxfb_crtc *crtc, ushort index, + ushort red, ushort green, ushort blue); + +int hw_sm750_setBLANK(struct lynxfb_output *output, int blank); +int hw_sm750le_setBLANK(struct lynxfb_output *output, int blank); int hw_sm750_pan_display(struct lynxfb_crtc *crtc, const struct fb_var_screeninfo *var, const struct fb_info *info); -- 2.13.0
[PATCH V3] staging: rtl8723bs - remove asm includes
Fixed checkpatch warnings "Use #include instead of " Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- V2 had V1 comment above the line V1 had vauge subject lines drivers/staging/rtl8723bs/include/osdep_service_linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service_linux.h b/drivers/staging/rtl8723bs/include/osdep_service_linux.h index 486e8184b0b2..0c9b4f622fee 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service_linux.h +++ b/drivers/staging/rtl8723bs/include/osdep_service_linux.h @@ -26,10 +26,10 @@ /* include */ #include #include - #include + #include #include - #include - #include + #include + #include #include #include #include -- 2.13.0
[PATCH V3] staging: rtl8723bs - remove asm includes
Fixed checkpatch warnings "Use #include instead of " Found using checkpatch Signed-off-by: Derek Robson --- V2 had V1 comment above the line V1 had vauge subject lines drivers/staging/rtl8723bs/include/osdep_service_linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service_linux.h b/drivers/staging/rtl8723bs/include/osdep_service_linux.h index 486e8184b0b2..0c9b4f622fee 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service_linux.h +++ b/drivers/staging/rtl8723bs/include/osdep_service_linux.h @@ -26,10 +26,10 @@ /* include */ #include #include - #include + #include #include - #include - #include + #include + #include #include #include #include -- 2.13.0
[PATCH V3] staging: unisys: visorhba - octal permissions
Fixed style of permissions to octal. Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- V1 and V2 had vauge subject lines drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 2fd31c9762c6..a6e7a6bbc428 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -1090,7 +1090,7 @@ static int visorhba_probe(struct visor_device *dev) goto err_scsi_remove_host; } devdata->debugfs_info = - debugfs_create_file("info", S_IRUSR | S_IRGRP, + debugfs_create_file("info", 0440, devdata->debugfs_dir, devdata, _debugfs_fops); if (!devdata->debugfs_info) { -- 2.13.0
[PATCH V3] staging: unisys: visorhba - octal permissions
Fixed style of permissions to octal. Found using checkpatch Signed-off-by: Derek Robson --- V1 and V2 had vauge subject lines drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 2fd31c9762c6..a6e7a6bbc428 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -1090,7 +1090,7 @@ static int visorhba_probe(struct visor_device *dev) goto err_scsi_remove_host; } devdata->debugfs_info = - debugfs_create_file("info", S_IRUSR | S_IRGRP, + debugfs_create_file("info", 0440, devdata->debugfs_dir, devdata, _debugfs_fops); if (!devdata->debugfs_info) { -- 2.13.0
[PATCH V4] staging: vt6655 - add parameter names
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson <robso...@gmail.com> --- V1,V2 and V3 had vauge subject line. drivers/staging/vt6655/card.h| 30 ++--- drivers/staging/vt6655/channel.h | 4 +-- drivers/staging/vt6655/mac.h | 58 drivers/staging/vt6655/power.h | 16 +++ drivers/staging/vt6655/rf.h | 16 +-- 5 files changed, 57 insertions(+), 67 deletions(-) diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 03369ffaa4d6..1a04dbb57d42 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -64,25 +64,25 @@ typedef enum _CARD_STATUS_TYPE { struct vnt_private; void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type); -void CARDvUpdateBasicTopRate(struct vnt_private *); -bool CARDbIsOFDMinBasicRate(struct vnt_private *); -void CARDvSetLoopbackMode(struct vnt_private *, unsigned short wLoopbackMode); -bool CARDbSoftwareReset(struct vnt_private *); -void CARDvSetFirstNextTBTT(struct vnt_private *, +void CARDvUpdateBasicTopRate(struct vnt_private *priv); +bool CARDbIsOFDMinBasicRate(struct vnt_private *priv); +void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode); +bool CARDbSoftwareReset(struct vnt_private *priv); +void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval); -void CARDvUpdateNextTBTT(struct vnt_private *, u64 qwTSF, +void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, unsigned short wBeaconInterval); -bool CARDbGetCurrentTSF(struct vnt_private *, u64 *pqwCurrTSF); +bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); -unsigned char CARDbyGetPktType(struct vnt_private *); -void CARDvSafeResetTx(struct vnt_private *); -void CARDvSafeResetRx(struct vnt_private *); -bool CARDbRadioPowerOff(struct vnt_private *); -bool CARDbRadioPowerOn(struct vnt_private *); -bool CARDbSetPhyParameter(struct vnt_private *, u8); -bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate, +unsigned char CARDbyGetPktType(struct vnt_private *priv); +void CARDvSafeResetTx(struct vnt_private *priv); +void CARDvSafeResetRx(struct vnt_private *priv); +bool CARDbRadioPowerOff(struct vnt_private *priv); +bool CARDbRadioPowerOn(struct vnt_private *priv); +bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type); +bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, u64 qwBSSTimestamp); -bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval); +bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval); #endif /* __CARD_H__ */ diff --git a/drivers/staging/vt6655/channel.h b/drivers/staging/vt6655/channel.h index 2621dfabff06..8fe70760e548 100644 --- a/drivers/staging/vt6655/channel.h +++ b/drivers/staging/vt6655/channel.h @@ -21,8 +21,8 @@ #include "card.h" -void vnt_init_bands(struct vnt_private *); +void vnt_init_bands(struct vnt_private *priv); -bool set_channel(struct vnt_private *, struct ieee80211_channel *); +bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 33b758cb79d4..db401e32ae23 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -885,57 +885,57 @@ do { \ #define MACvSetRFLE_LatchBase(iobase) \ MACvWordRegBitsOn(iobase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_RFLEOPT) -bool MACbIsRegBitsOn(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOn(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsRegBitsOff(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsIntDisable(struct vnt_private *); +bool MACbIsIntDisable(struct vnt_private *priv); -void MACvSetShortRetryLimit(struct vnt_private *, unsigned char byRetryLimit); +void MACvSetShortRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); -void MACvSetLongRetryLimit(struct vnt_private *, unsigned char byRetryLimit); -void MACvGetLongRetryLimit(struct vnt_private *, +void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); +void MACvGetLongRetryLimit(struct vnt_private *priv, unsigned char *pbyRetryLimit); -void MACvSetLoopbackMode(struct vnt_private *, unsigned char byLoopbackMode); +void
[PATCH V4] staging: vt6655 - add parameter names
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson --- V1,V2 and V3 had vauge subject line. drivers/staging/vt6655/card.h| 30 ++--- drivers/staging/vt6655/channel.h | 4 +-- drivers/staging/vt6655/mac.h | 58 drivers/staging/vt6655/power.h | 16 +++ drivers/staging/vt6655/rf.h | 16 +-- 5 files changed, 57 insertions(+), 67 deletions(-) diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 03369ffaa4d6..1a04dbb57d42 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -64,25 +64,25 @@ typedef enum _CARD_STATUS_TYPE { struct vnt_private; void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type); -void CARDvUpdateBasicTopRate(struct vnt_private *); -bool CARDbIsOFDMinBasicRate(struct vnt_private *); -void CARDvSetLoopbackMode(struct vnt_private *, unsigned short wLoopbackMode); -bool CARDbSoftwareReset(struct vnt_private *); -void CARDvSetFirstNextTBTT(struct vnt_private *, +void CARDvUpdateBasicTopRate(struct vnt_private *priv); +bool CARDbIsOFDMinBasicRate(struct vnt_private *priv); +void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode); +bool CARDbSoftwareReset(struct vnt_private *priv); +void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval); -void CARDvUpdateNextTBTT(struct vnt_private *, u64 qwTSF, +void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, unsigned short wBeaconInterval); -bool CARDbGetCurrentTSF(struct vnt_private *, u64 *pqwCurrTSF); +bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); -unsigned char CARDbyGetPktType(struct vnt_private *); -void CARDvSafeResetTx(struct vnt_private *); -void CARDvSafeResetRx(struct vnt_private *); -bool CARDbRadioPowerOff(struct vnt_private *); -bool CARDbRadioPowerOn(struct vnt_private *); -bool CARDbSetPhyParameter(struct vnt_private *, u8); -bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate, +unsigned char CARDbyGetPktType(struct vnt_private *priv); +void CARDvSafeResetTx(struct vnt_private *priv); +void CARDvSafeResetRx(struct vnt_private *priv); +bool CARDbRadioPowerOff(struct vnt_private *priv); +bool CARDbRadioPowerOn(struct vnt_private *priv); +bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type); +bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, u64 qwBSSTimestamp); -bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval); +bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval); #endif /* __CARD_H__ */ diff --git a/drivers/staging/vt6655/channel.h b/drivers/staging/vt6655/channel.h index 2621dfabff06..8fe70760e548 100644 --- a/drivers/staging/vt6655/channel.h +++ b/drivers/staging/vt6655/channel.h @@ -21,8 +21,8 @@ #include "card.h" -void vnt_init_bands(struct vnt_private *); +void vnt_init_bands(struct vnt_private *priv); -bool set_channel(struct vnt_private *, struct ieee80211_channel *); +bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 33b758cb79d4..db401e32ae23 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -885,57 +885,57 @@ do { \ #define MACvSetRFLE_LatchBase(iobase) \ MACvWordRegBitsOn(iobase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_RFLEOPT) -bool MACbIsRegBitsOn(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOn(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsRegBitsOff(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsIntDisable(struct vnt_private *); +bool MACbIsIntDisable(struct vnt_private *priv); -void MACvSetShortRetryLimit(struct vnt_private *, unsigned char byRetryLimit); +void MACvSetShortRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); -void MACvSetLongRetryLimit(struct vnt_private *, unsigned char byRetryLimit); -void MACvGetLongRetryLimit(struct vnt_private *, +void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); +void MACvGetLongRetryLimit(struct vnt_private *priv, unsigned char *pbyRetryLimit); -void MACvSetLoopbackMode(struct vnt_private *, unsigned char byLoopbackMode); +void MACvSetLoopbackMode(stru
[PATCH V2] staging: rtl8192u: style fix
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> V1 had vauge subjet --- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h | 4 ++-- drivers/staging/rtl8192u/r8192U.h| 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 899c77ed2a43..b062cad052b9 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2187,7 +2187,7 @@ int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, struct sk_buff *frag, int hdr_len); int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); -void ieee80211_txb_free(struct ieee80211_txb *); +void ieee80211_txb_free(struct ieee80211_txb *txb); /* ieee80211_rx.c */ diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h index 005bf89aae65..a0aa0f5be63a 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h @@ -82,8 +82,8 @@ struct ieee80211_crypt_data { int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops); int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops); struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name); -void ieee80211_crypt_deinit_entries(struct ieee80211_device *, int); -void ieee80211_crypt_deinit_handler(unsigned long); +void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force); +void ieee80211_crypt_deinit_handler(unsigned long data); void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee, struct ieee80211_crypt_data **crypt); diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4c7a5e3d3e5e..51c150a39fc2 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1147,9 +1147,9 @@ int write_nic_word(struct net_device *dev, int x, u16 y); int write_nic_dword(struct net_device *dev, int x, u32 y); void force_pci_posting(struct net_device *dev); -void rtl8192_rtx_disable(struct net_device *); -void rtl8192_rx_enable(struct net_device *); -void rtl8192_tx_enable(struct net_device *); +void rtl8192_rtx_disable(struct net_device *dev); +void rtl8192_rx_enable(struct net_device *dev); +void rtl8192_tx_enable(struct net_device *dev); void rtl8192_disassociate(struct net_device *dev); void rtl8185_set_rf_pins_enable(struct net_device *dev, u32 a); -- 2.13.0
[PATCH V2] staging: rtl8192u: style fix
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson V1 had vauge subjet --- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h | 4 ++-- drivers/staging/rtl8192u/r8192U.h| 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 899c77ed2a43..b062cad052b9 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2187,7 +2187,7 @@ int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, struct sk_buff *frag, int hdr_len); int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); -void ieee80211_txb_free(struct ieee80211_txb *); +void ieee80211_txb_free(struct ieee80211_txb *txb); /* ieee80211_rx.c */ diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h index 005bf89aae65..a0aa0f5be63a 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h @@ -82,8 +82,8 @@ struct ieee80211_crypt_data { int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops); int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops); struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name); -void ieee80211_crypt_deinit_entries(struct ieee80211_device *, int); -void ieee80211_crypt_deinit_handler(unsigned long); +void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force); +void ieee80211_crypt_deinit_handler(unsigned long data); void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee, struct ieee80211_crypt_data **crypt); diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4c7a5e3d3e5e..51c150a39fc2 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1147,9 +1147,9 @@ int write_nic_word(struct net_device *dev, int x, u16 y); int write_nic_dword(struct net_device *dev, int x, u32 y); void force_pci_posting(struct net_device *dev); -void rtl8192_rtx_disable(struct net_device *); -void rtl8192_rx_enable(struct net_device *); -void rtl8192_tx_enable(struct net_device *); +void rtl8192_rtx_disable(struct net_device *dev); +void rtl8192_rx_enable(struct net_device *dev); +void rtl8192_tx_enable(struct net_device *dev); void rtl8192_disassociate(struct net_device *dev); void rtl8185_set_rf_pins_enable(struct net_device *dev, u32 a); -- 2.13.0
[PATCH V2] staging: rtl8723bs - remove asm includes
Fixed checkpatch warnings "Use #include instead of " Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> V1 had vauge subject. --- drivers/staging/rtl8723bs/include/osdep_service_linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service_linux.h b/drivers/staging/rtl8723bs/include/osdep_service_linux.h index 486e8184b0b2..0c9b4f622fee 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service_linux.h +++ b/drivers/staging/rtl8723bs/include/osdep_service_linux.h @@ -26,10 +26,10 @@ /* include */ #include #include - #include + #include #include - #include - #include + #include + #include #include #include #include -- 2.13.0
[PATCH V2] staging: rtl8723bs - remove asm includes
Fixed checkpatch warnings "Use #include instead of " Found using checkpatch Signed-off-by: Derek Robson V1 had vauge subject. --- drivers/staging/rtl8723bs/include/osdep_service_linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service_linux.h b/drivers/staging/rtl8723bs/include/osdep_service_linux.h index 486e8184b0b2..0c9b4f622fee 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service_linux.h +++ b/drivers/staging/rtl8723bs/include/osdep_service_linux.h @@ -26,10 +26,10 @@ /* include */ #include #include - #include + #include #include - #include - #include + #include + #include #include #include #include -- 2.13.0
[PATCH V2] staging: unisys: visorhba - style fix
Fixed style of permissions to octal. Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> V1 has vauge subject --- drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 2fd31c9762c6..a6e7a6bbc428 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -1090,7 +1090,7 @@ static int visorhba_probe(struct visor_device *dev) goto err_scsi_remove_host; } devdata->debugfs_info = - debugfs_create_file("info", S_IRUSR | S_IRGRP, + debugfs_create_file("info", 0440, devdata->debugfs_dir, devdata, _debugfs_fops); if (!devdata->debugfs_info) { -- 2.13.0
[PATCH V2] staging: unisys: visorhba - style fix
Fixed style of permissions to octal. Found using checkpatch Signed-off-by: Derek Robson V1 has vauge subject --- drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 2fd31c9762c6..a6e7a6bbc428 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -1090,7 +1090,7 @@ static int visorhba_probe(struct visor_device *dev) goto err_scsi_remove_host; } devdata->debugfs_info = - debugfs_create_file("info", S_IRUSR | S_IRGRP, + debugfs_create_file("info", 0440, devdata->debugfs_dir, devdata, _debugfs_fops); if (!devdata->debugfs_info) { -- 2.13.0
[PATCH V2] staging: sm750fb - style fix
Fixed checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson <robso...@gmail.com> V1 had vague subject --- drivers/staging/sm750fb/sm750.h | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 5b186dafedec..4386122799b2 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -189,14 +189,22 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev); int hw_sm750_deWait(void); int hw_sm750le_deWait(void); -int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*); -int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort); -int hw_sm750_setBLANK(struct lynxfb_output*, int); -int hw_sm750le_setBLANK(struct lynxfb_output*, int); +int hw_sm750_output_setMode(struct lynxfb_output *output, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var); + +int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_setColReg(struct lynxfb_crtc *crtc, ushort index, + ushort red, ushort green, ushort blue); + +int hw_sm750_setBLANK(struct lynxfb_output *output, int blank); +int hw_sm750le_setBLANK(struct lynxfb_output *output, int blank); int hw_sm750_pan_display(struct lynxfb_crtc *crtc, const struct fb_var_screeninfo *var, const struct fb_info *info); -- 2.13.0
[PATCH V2] staging: sm750fb - style fix
Fixed checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson V1 had vague subject --- drivers/staging/sm750fb/sm750.h | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 5b186dafedec..4386122799b2 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -189,14 +189,22 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev); int hw_sm750_deWait(void); int hw_sm750le_deWait(void); -int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*); -int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort); -int hw_sm750_setBLANK(struct lynxfb_output*, int); -int hw_sm750le_setBLANK(struct lynxfb_output*, int); +int hw_sm750_output_setMode(struct lynxfb_output *output, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var); + +int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_setColReg(struct lynxfb_crtc *crtc, ushort index, + ushort red, ushort green, ushort blue); + +int hw_sm750_setBLANK(struct lynxfb_output *output, int blank); +int hw_sm750le_setBLANK(struct lynxfb_output *output, int blank); int hw_sm750_pan_display(struct lynxfb_crtc *crtc, const struct fb_var_screeninfo *var, const struct fb_info *info); -- 2.13.0
[PATCH V3] staging: vt6655 - style fix
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson <robso...@gmail.com> V1 and V2 had vague subject line --- drivers/staging/vt6655/card.h| 30 ++--- drivers/staging/vt6655/channel.h | 4 +-- drivers/staging/vt6655/mac.h | 58 drivers/staging/vt6655/power.h | 16 +++ drivers/staging/vt6655/rf.h | 16 +-- 5 files changed, 57 insertions(+), 67 deletions(-) diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 03369ffaa4d6..1a04dbb57d42 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -64,25 +64,25 @@ typedef enum _CARD_STATUS_TYPE { struct vnt_private; void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type); -void CARDvUpdateBasicTopRate(struct vnt_private *); -bool CARDbIsOFDMinBasicRate(struct vnt_private *); -void CARDvSetLoopbackMode(struct vnt_private *, unsigned short wLoopbackMode); -bool CARDbSoftwareReset(struct vnt_private *); -void CARDvSetFirstNextTBTT(struct vnt_private *, +void CARDvUpdateBasicTopRate(struct vnt_private *priv); +bool CARDbIsOFDMinBasicRate(struct vnt_private *priv); +void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode); +bool CARDbSoftwareReset(struct vnt_private *priv); +void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval); -void CARDvUpdateNextTBTT(struct vnt_private *, u64 qwTSF, +void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, unsigned short wBeaconInterval); -bool CARDbGetCurrentTSF(struct vnt_private *, u64 *pqwCurrTSF); +bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); -unsigned char CARDbyGetPktType(struct vnt_private *); -void CARDvSafeResetTx(struct vnt_private *); -void CARDvSafeResetRx(struct vnt_private *); -bool CARDbRadioPowerOff(struct vnt_private *); -bool CARDbRadioPowerOn(struct vnt_private *); -bool CARDbSetPhyParameter(struct vnt_private *, u8); -bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate, +unsigned char CARDbyGetPktType(struct vnt_private *priv); +void CARDvSafeResetTx(struct vnt_private *priv); +void CARDvSafeResetRx(struct vnt_private *priv); +bool CARDbRadioPowerOff(struct vnt_private *priv); +bool CARDbRadioPowerOn(struct vnt_private *priv); +bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type); +bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, u64 qwBSSTimestamp); -bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval); +bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval); #endif /* __CARD_H__ */ diff --git a/drivers/staging/vt6655/channel.h b/drivers/staging/vt6655/channel.h index 2621dfabff06..8fe70760e548 100644 --- a/drivers/staging/vt6655/channel.h +++ b/drivers/staging/vt6655/channel.h @@ -21,8 +21,8 @@ #include "card.h" -void vnt_init_bands(struct vnt_private *); +void vnt_init_bands(struct vnt_private *priv); -bool set_channel(struct vnt_private *, struct ieee80211_channel *); +bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 33b758cb79d4..db401e32ae23 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -885,57 +885,57 @@ do { \ #define MACvSetRFLE_LatchBase(iobase) \ MACvWordRegBitsOn(iobase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_RFLEOPT) -bool MACbIsRegBitsOn(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOn(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsRegBitsOff(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsIntDisable(struct vnt_private *); +bool MACbIsIntDisable(struct vnt_private *priv); -void MACvSetShortRetryLimit(struct vnt_private *, unsigned char byRetryLimit); +void MACvSetShortRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); -void MACvSetLongRetryLimit(struct vnt_private *, unsigned char byRetryLimit); -void MACvGetLongRetryLimit(struct vnt_private *, +void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); +void MACvGetLongRetryLimit(struct vnt_private *priv, unsigned char *pbyRetryLimit); -void MACvSetLoopbackMode(struct vnt_private *, unsigned char byLoopbackMode); +void
[PATCH V3] staging: vt6655 - style fix
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson V1 and V2 had vague subject line --- drivers/staging/vt6655/card.h| 30 ++--- drivers/staging/vt6655/channel.h | 4 +-- drivers/staging/vt6655/mac.h | 58 drivers/staging/vt6655/power.h | 16 +++ drivers/staging/vt6655/rf.h | 16 +-- 5 files changed, 57 insertions(+), 67 deletions(-) diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 03369ffaa4d6..1a04dbb57d42 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -64,25 +64,25 @@ typedef enum _CARD_STATUS_TYPE { struct vnt_private; void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type); -void CARDvUpdateBasicTopRate(struct vnt_private *); -bool CARDbIsOFDMinBasicRate(struct vnt_private *); -void CARDvSetLoopbackMode(struct vnt_private *, unsigned short wLoopbackMode); -bool CARDbSoftwareReset(struct vnt_private *); -void CARDvSetFirstNextTBTT(struct vnt_private *, +void CARDvUpdateBasicTopRate(struct vnt_private *priv); +bool CARDbIsOFDMinBasicRate(struct vnt_private *priv); +void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode); +bool CARDbSoftwareReset(struct vnt_private *priv); +void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval); -void CARDvUpdateNextTBTT(struct vnt_private *, u64 qwTSF, +void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, unsigned short wBeaconInterval); -bool CARDbGetCurrentTSF(struct vnt_private *, u64 *pqwCurrTSF); +bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); -unsigned char CARDbyGetPktType(struct vnt_private *); -void CARDvSafeResetTx(struct vnt_private *); -void CARDvSafeResetRx(struct vnt_private *); -bool CARDbRadioPowerOff(struct vnt_private *); -bool CARDbRadioPowerOn(struct vnt_private *); -bool CARDbSetPhyParameter(struct vnt_private *, u8); -bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate, +unsigned char CARDbyGetPktType(struct vnt_private *priv); +void CARDvSafeResetTx(struct vnt_private *priv); +void CARDvSafeResetRx(struct vnt_private *priv); +bool CARDbRadioPowerOff(struct vnt_private *priv); +bool CARDbRadioPowerOn(struct vnt_private *priv); +bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type); +bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, u64 qwBSSTimestamp); -bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval); +bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval); #endif /* __CARD_H__ */ diff --git a/drivers/staging/vt6655/channel.h b/drivers/staging/vt6655/channel.h index 2621dfabff06..8fe70760e548 100644 --- a/drivers/staging/vt6655/channel.h +++ b/drivers/staging/vt6655/channel.h @@ -21,8 +21,8 @@ #include "card.h" -void vnt_init_bands(struct vnt_private *); +void vnt_init_bands(struct vnt_private *priv); -bool set_channel(struct vnt_private *, struct ieee80211_channel *); +bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 33b758cb79d4..db401e32ae23 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -885,57 +885,57 @@ do { \ #define MACvSetRFLE_LatchBase(iobase) \ MACvWordRegBitsOn(iobase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_RFLEOPT) -bool MACbIsRegBitsOn(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOn(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsRegBitsOff(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsIntDisable(struct vnt_private *); +bool MACbIsIntDisable(struct vnt_private *priv); -void MACvSetShortRetryLimit(struct vnt_private *, unsigned char byRetryLimit); +void MACvSetShortRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); -void MACvSetLongRetryLimit(struct vnt_private *, unsigned char byRetryLimit); -void MACvGetLongRetryLimit(struct vnt_private *, +void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); +void MACvGetLongRetryLimit(struct vnt_private *priv, unsigned char *pbyRetryLimit); -void MACvSetLoopbackMode(struct vnt_private *, unsigned char byLoopbackMode); +void MACvSetLoopbackMode(stru
[PATCH V2] staging: ccree: - style fix, spaces and tabs
Changed code indent to be tabs across whole driver Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> V1 had vague subject. --- drivers/staging/ccree/ssi_cipher.c | 45 +- drivers/staging/ccree/ssi_driver.c | 6 ++--- drivers/staging/ccree/ssi_driver.h | 6 ++--- drivers/staging/ccree/ssi_fips.h | 8 +++--- drivers/staging/ccree/ssi_fips_ext.c | 4 +-- drivers/staging/ccree/ssi_fips_ll.c| 40 +++--- drivers/staging/ccree/ssi_fips_local.c | 28 ++--- drivers/staging/ccree/ssi_fips_local.h | 12 - 8 files changed, 75 insertions(+), 74 deletions(-) diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index 2dfc6a3bd4c1..34450a5e6573 100644 --- a/drivers/staging/ccree/ssi_cipher.c +++ b/drivers/staging/ccree/ssi_cipher.c @@ -258,45 +258,45 @@ static void ssi_blkcipher_exit(struct crypto_tfm *tfm) typedef struct tdes_keys{ -u8 key1[DES_KEY_SIZE]; -u8 key2[DES_KEY_SIZE]; -u8 key3[DES_KEY_SIZE]; + u8 key1[DES_KEY_SIZE]; + u8 key2[DES_KEY_SIZE]; + u8 key3[DES_KEY_SIZE]; }tdes_keys_t; -static const u8 zero_buff[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; +static const u8 zero_buff[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; /* The function verifies that tdes keys are not weak.*/ static int ssi_fips_verify_3des_keys(const u8 *key, unsigned int keylen) { #ifdef CCREE_FIPS_SUPPORT -tdes_keys_t *tdes_key = (tdes_keys_t*)key; + tdes_keys_t *tdes_key = (tdes_keys_t*)key; /* verify key1 != key2 and key3 != key2*/ -if (unlikely( (memcmp((u8*)tdes_key->key1, (u8*)tdes_key->key2, sizeof(tdes_key->key1)) == 0) || + if (unlikely( (memcmp((u8*)tdes_key->key1, (u8*)tdes_key->key2, sizeof(tdes_key->key1)) == 0) || (memcmp((u8*)tdes_key->key3, (u8*)tdes_key->key2, sizeof(tdes_key->key3)) == 0) )) { -return -ENOEXEC; -} + return -ENOEXEC; + } #endif /* CCREE_FIPS_SUPPORT */ -return 0; + return 0; } /* The function verifies that xts keys are not weak.*/ static int ssi_fips_verify_xts_keys(const u8 *key, unsigned int keylen) { #ifdef CCREE_FIPS_SUPPORT -/* Weak key is define as key that its first half (128/256 lsb) equals its second half (128/256 msb) */ -int singleKeySize = keylen >> 1; + /* Weak key is define as key that its first half (128/256 lsb) equals its second half (128/256 msb) */ + int singleKeySize = keylen >> 1; if (unlikely(memcmp(key, [singleKeySize], singleKeySize) == 0)) { return -ENOEXEC; } #endif /* CCREE_FIPS_SUPPORT */ -return 0; + return 0; } static enum cc_hw_crypto_key hw_key_to_cc_hw_key(int slot_num) @@ -720,12 +720,13 @@ ssi_blkcipher_create_data_desc( } static int ssi_blkcipher_complete(struct device *dev, - struct ssi_ablkcipher_ctx *ctx_p, - struct blkcipher_req_ctx *req_ctx, - struct scatterlist *dst, struct scatterlist *src, - unsigned int ivsize, - void *areq, - void __iomem *cc_base) + struct ssi_ablkcipher_ctx *ctx_p, + struct blkcipher_req_ctx *req_ctx, + struct scatterlist *dst, + struct scatterlist *src, + unsigned int ivsize, + void *areq, + void __iomem *cc_base) { int completion_error = 0; u32 inflight_counter; @@ -779,7 +780,7 @@ static int ssi_blkcipher_process( /* No data to process is valid */ return 0; } -/*For CTS in case of data size aligned to 16 use CBC mode*/ + /*For CTS in case of data size aligned to 16 use CBC mode*/ if (((nbytes % AES_BLOCK_SIZE) == 0) && (ctx_p->cipher_mode == DRV_CIPHER_CBC_CTS)){ ctx_p->cipher_mode = DRV_CIPHER_CBC; diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 190922970bf0..b9d0dd27e853 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers
[PATCH V2] staging: ccree: - style fix, spaces and tabs
Changed code indent to be tabs across whole driver Found using checkpatch Signed-off-by: Derek Robson V1 had vague subject. --- drivers/staging/ccree/ssi_cipher.c | 45 +- drivers/staging/ccree/ssi_driver.c | 6 ++--- drivers/staging/ccree/ssi_driver.h | 6 ++--- drivers/staging/ccree/ssi_fips.h | 8 +++--- drivers/staging/ccree/ssi_fips_ext.c | 4 +-- drivers/staging/ccree/ssi_fips_ll.c| 40 +++--- drivers/staging/ccree/ssi_fips_local.c | 28 ++--- drivers/staging/ccree/ssi_fips_local.h | 12 - 8 files changed, 75 insertions(+), 74 deletions(-) diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index 2dfc6a3bd4c1..34450a5e6573 100644 --- a/drivers/staging/ccree/ssi_cipher.c +++ b/drivers/staging/ccree/ssi_cipher.c @@ -258,45 +258,45 @@ static void ssi_blkcipher_exit(struct crypto_tfm *tfm) typedef struct tdes_keys{ -u8 key1[DES_KEY_SIZE]; -u8 key2[DES_KEY_SIZE]; -u8 key3[DES_KEY_SIZE]; + u8 key1[DES_KEY_SIZE]; + u8 key2[DES_KEY_SIZE]; + u8 key3[DES_KEY_SIZE]; }tdes_keys_t; -static const u8 zero_buff[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; +static const u8 zero_buff[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; /* The function verifies that tdes keys are not weak.*/ static int ssi_fips_verify_3des_keys(const u8 *key, unsigned int keylen) { #ifdef CCREE_FIPS_SUPPORT -tdes_keys_t *tdes_key = (tdes_keys_t*)key; + tdes_keys_t *tdes_key = (tdes_keys_t*)key; /* verify key1 != key2 and key3 != key2*/ -if (unlikely( (memcmp((u8*)tdes_key->key1, (u8*)tdes_key->key2, sizeof(tdes_key->key1)) == 0) || + if (unlikely( (memcmp((u8*)tdes_key->key1, (u8*)tdes_key->key2, sizeof(tdes_key->key1)) == 0) || (memcmp((u8*)tdes_key->key3, (u8*)tdes_key->key2, sizeof(tdes_key->key3)) == 0) )) { -return -ENOEXEC; -} + return -ENOEXEC; + } #endif /* CCREE_FIPS_SUPPORT */ -return 0; + return 0; } /* The function verifies that xts keys are not weak.*/ static int ssi_fips_verify_xts_keys(const u8 *key, unsigned int keylen) { #ifdef CCREE_FIPS_SUPPORT -/* Weak key is define as key that its first half (128/256 lsb) equals its second half (128/256 msb) */ -int singleKeySize = keylen >> 1; + /* Weak key is define as key that its first half (128/256 lsb) equals its second half (128/256 msb) */ + int singleKeySize = keylen >> 1; if (unlikely(memcmp(key, [singleKeySize], singleKeySize) == 0)) { return -ENOEXEC; } #endif /* CCREE_FIPS_SUPPORT */ -return 0; + return 0; } static enum cc_hw_crypto_key hw_key_to_cc_hw_key(int slot_num) @@ -720,12 +720,13 @@ ssi_blkcipher_create_data_desc( } static int ssi_blkcipher_complete(struct device *dev, - struct ssi_ablkcipher_ctx *ctx_p, - struct blkcipher_req_ctx *req_ctx, - struct scatterlist *dst, struct scatterlist *src, - unsigned int ivsize, - void *areq, - void __iomem *cc_base) + struct ssi_ablkcipher_ctx *ctx_p, + struct blkcipher_req_ctx *req_ctx, + struct scatterlist *dst, + struct scatterlist *src, + unsigned int ivsize, + void *areq, + void __iomem *cc_base) { int completion_error = 0; u32 inflight_counter; @@ -779,7 +780,7 @@ static int ssi_blkcipher_process( /* No data to process is valid */ return 0; } -/*For CTS in case of data size aligned to 16 use CBC mode*/ + /*For CTS in case of data size aligned to 16 use CBC mode*/ if (((nbytes % AES_BLOCK_SIZE) == 0) && (ctx_p->cipher_mode == DRV_CIPHER_CBC_CTS)){ ctx_p->cipher_mode = DRV_CIPHER_CBC; diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 190922970bf0..b9d0dd27e853 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -43
[PATCH] audit: style fix
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Signed-off-by: Derek Robson <robso...@gmail.com> --- kernel/audit.h | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/kernel/audit.h b/kernel/audit.h index ddfce2ea4891..90b891eea204 100644 --- a/kernel/audit.h +++ b/kernel/audit.h @@ -247,13 +247,13 @@ struct audit_netlink_list { struct sk_buff_head q; }; -int audit_send_list(void *); +int audit_send_list(void *_dest); extern int selinux_audit_rule_update(void); extern struct mutex audit_filter_mutex; -extern int audit_del_rule(struct audit_entry *); -extern void audit_free_rule_rcu(struct rcu_head *); +extern int audit_del_rule(struct audit_entry *entry); +extern void audit_free_rule_rcu(struct rcu_head *head); extern struct list_head audit_filter_list[]; extern struct audit_entry *audit_dupe_rule(struct audit_krule *old); @@ -301,17 +301,17 @@ extern int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark #endif /* CONFIG_AUDIT_WATCH */ #ifdef CONFIG_AUDIT_TREE -extern struct audit_chunk *audit_tree_lookup(const struct inode *); -extern void audit_put_chunk(struct audit_chunk *); -extern bool audit_tree_match(struct audit_chunk *, struct audit_tree *); -extern int audit_make_tree(struct audit_krule *, char *, u32); -extern int audit_add_tree_rule(struct audit_krule *); -extern int audit_remove_tree_rule(struct audit_krule *); +extern struct audit_chunk *audit_tree_lookup(const struct inode *inode); +extern void audit_put_chunk(struct audit_chunk *chunk); +extern bool audit_tree_match(struct audit_chunk *chunk, struct audit_tree *tree); +extern int audit_make_tree(struct audit_krule *rule, char *pathname, u32 op); +extern int audit_add_tree_rule(struct audit_krule *rule); +extern int audit_remove_tree_rule(struct audit_krule *rule); extern void audit_trim_trees(void); extern int audit_tag_tree(char *old, char *new); -extern const char *audit_tree_path(struct audit_tree *); -extern void audit_put_tree(struct audit_tree *); -extern void audit_kill_trees(struct list_head *); +extern const char *audit_tree_path(struct audit_tree *tree); +extern void audit_put_tree(struct audit_tree *tree); +extern void audit_kill_trees(struct list_head *list); #else #define audit_remove_tree_rule(rule) BUG() #define audit_add_tree_rule(rule) -EINVAL @@ -323,7 +323,7 @@ extern void audit_kill_trees(struct list_head *); #define audit_kill_trees(list) BUG() #endif -extern char *audit_unpack_string(void **, size_t *, size_t); +extern char *audit_unpack_string(void **bufp, size_t *remain, size_t len); extern pid_t audit_sig_pid; extern kuid_t audit_sig_uid; @@ -333,7 +333,7 @@ extern int audit_filter(int msgtype, unsigned int listtype); #ifdef CONFIG_AUDITSYSCALL extern int audit_signal_info(int sig, struct task_struct *t); -extern void audit_filter_inodes(struct task_struct *, struct audit_context *); +extern void audit_filter_inodes(struct task_struct *tsk, struct audit_context *ctx); extern struct list_head *audit_killed_trees(void); #else #define audit_signal_info(s,t) AUDIT_DISABLED -- 2.13.0
[PATCH] audit: style fix
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Signed-off-by: Derek Robson --- kernel/audit.h | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/kernel/audit.h b/kernel/audit.h index ddfce2ea4891..90b891eea204 100644 --- a/kernel/audit.h +++ b/kernel/audit.h @@ -247,13 +247,13 @@ struct audit_netlink_list { struct sk_buff_head q; }; -int audit_send_list(void *); +int audit_send_list(void *_dest); extern int selinux_audit_rule_update(void); extern struct mutex audit_filter_mutex; -extern int audit_del_rule(struct audit_entry *); -extern void audit_free_rule_rcu(struct rcu_head *); +extern int audit_del_rule(struct audit_entry *entry); +extern void audit_free_rule_rcu(struct rcu_head *head); extern struct list_head audit_filter_list[]; extern struct audit_entry *audit_dupe_rule(struct audit_krule *old); @@ -301,17 +301,17 @@ extern int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark #endif /* CONFIG_AUDIT_WATCH */ #ifdef CONFIG_AUDIT_TREE -extern struct audit_chunk *audit_tree_lookup(const struct inode *); -extern void audit_put_chunk(struct audit_chunk *); -extern bool audit_tree_match(struct audit_chunk *, struct audit_tree *); -extern int audit_make_tree(struct audit_krule *, char *, u32); -extern int audit_add_tree_rule(struct audit_krule *); -extern int audit_remove_tree_rule(struct audit_krule *); +extern struct audit_chunk *audit_tree_lookup(const struct inode *inode); +extern void audit_put_chunk(struct audit_chunk *chunk); +extern bool audit_tree_match(struct audit_chunk *chunk, struct audit_tree *tree); +extern int audit_make_tree(struct audit_krule *rule, char *pathname, u32 op); +extern int audit_add_tree_rule(struct audit_krule *rule); +extern int audit_remove_tree_rule(struct audit_krule *rule); extern void audit_trim_trees(void); extern int audit_tag_tree(char *old, char *new); -extern const char *audit_tree_path(struct audit_tree *); -extern void audit_put_tree(struct audit_tree *); -extern void audit_kill_trees(struct list_head *); +extern const char *audit_tree_path(struct audit_tree *tree); +extern void audit_put_tree(struct audit_tree *tree); +extern void audit_kill_trees(struct list_head *list); #else #define audit_remove_tree_rule(rule) BUG() #define audit_add_tree_rule(rule) -EINVAL @@ -323,7 +323,7 @@ extern void audit_kill_trees(struct list_head *); #define audit_kill_trees(list) BUG() #endif -extern char *audit_unpack_string(void **, size_t *, size_t); +extern char *audit_unpack_string(void **bufp, size_t *remain, size_t len); extern pid_t audit_sig_pid; extern kuid_t audit_sig_uid; @@ -333,7 +333,7 @@ extern int audit_filter(int msgtype, unsigned int listtype); #ifdef CONFIG_AUDITSYSCALL extern int audit_signal_info(int sig, struct task_struct *t); -extern void audit_filter_inodes(struct task_struct *, struct audit_context *); +extern void audit_filter_inodes(struct task_struct *tsk, struct audit_context *ctx); extern struct list_head *audit_killed_trees(void); #else #define audit_signal_info(s,t) AUDIT_DISABLED -- 2.13.0
[PATCH] Drivers: rtl8192u: style fix
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h | 4 ++-- drivers/staging/rtl8192u/r8192U.h| 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 899c77ed2a43..b062cad052b9 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2187,7 +2187,7 @@ int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, struct sk_buff *frag, int hdr_len); int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); -void ieee80211_txb_free(struct ieee80211_txb *); +void ieee80211_txb_free(struct ieee80211_txb *txb); /* ieee80211_rx.c */ diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h index 005bf89aae65..a0aa0f5be63a 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h @@ -82,8 +82,8 @@ struct ieee80211_crypt_data { int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops); int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops); struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name); -void ieee80211_crypt_deinit_entries(struct ieee80211_device *, int); -void ieee80211_crypt_deinit_handler(unsigned long); +void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force); +void ieee80211_crypt_deinit_handler(unsigned long data); void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee, struct ieee80211_crypt_data **crypt); diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4c7a5e3d3e5e..51c150a39fc2 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1147,9 +1147,9 @@ int write_nic_word(struct net_device *dev, int x, u16 y); int write_nic_dword(struct net_device *dev, int x, u32 y); void force_pci_posting(struct net_device *dev); -void rtl8192_rtx_disable(struct net_device *); -void rtl8192_rx_enable(struct net_device *); -void rtl8192_tx_enable(struct net_device *); +void rtl8192_rtx_disable(struct net_device *dev); +void rtl8192_rx_enable(struct net_device *dev); +void rtl8192_tx_enable(struct net_device *dev); void rtl8192_disassociate(struct net_device *dev); void rtl8185_set_rf_pins_enable(struct net_device *dev, u32 a); -- 2.13.0
[PATCH] Drivers: rtl8192u: style fix
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h | 4 ++-- drivers/staging/rtl8192u/r8192U.h| 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 899c77ed2a43..b062cad052b9 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2187,7 +2187,7 @@ int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, struct sk_buff *frag, int hdr_len); int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); -void ieee80211_txb_free(struct ieee80211_txb *); +void ieee80211_txb_free(struct ieee80211_txb *txb); /* ieee80211_rx.c */ diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h index 005bf89aae65..a0aa0f5be63a 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h @@ -82,8 +82,8 @@ struct ieee80211_crypt_data { int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops); int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops); struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name); -void ieee80211_crypt_deinit_entries(struct ieee80211_device *, int); -void ieee80211_crypt_deinit_handler(unsigned long); +void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force); +void ieee80211_crypt_deinit_handler(unsigned long data); void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee, struct ieee80211_crypt_data **crypt); diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4c7a5e3d3e5e..51c150a39fc2 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1147,9 +1147,9 @@ int write_nic_word(struct net_device *dev, int x, u16 y); int write_nic_dword(struct net_device *dev, int x, u32 y); void force_pci_posting(struct net_device *dev); -void rtl8192_rtx_disable(struct net_device *); -void rtl8192_rx_enable(struct net_device *); -void rtl8192_tx_enable(struct net_device *); +void rtl8192_rtx_disable(struct net_device *dev); +void rtl8192_rx_enable(struct net_device *dev); +void rtl8192_tx_enable(struct net_device *dev); void rtl8192_disassociate(struct net_device *dev); void rtl8185_set_rf_pins_enable(struct net_device *dev, u32 a); -- 2.13.0
[PATCH] Drivers: rtl8723bs - remove asm includes
Fixed checkpatch warnings "Use #include instead of " Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/rtl8723bs/include/osdep_service_linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service_linux.h b/drivers/staging/rtl8723bs/include/osdep_service_linux.h index 486e8184b0b2..0c9b4f622fee 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service_linux.h +++ b/drivers/staging/rtl8723bs/include/osdep_service_linux.h @@ -26,10 +26,10 @@ /* include */ #include #include - #include + #include #include - #include - #include + #include + #include #include #include #include -- 2.13.0
[PATCH] Drivers: rtl8723bs - remove asm includes
Fixed checkpatch warnings "Use #include instead of " Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/rtl8723bs/include/osdep_service_linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service_linux.h b/drivers/staging/rtl8723bs/include/osdep_service_linux.h index 486e8184b0b2..0c9b4f622fee 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service_linux.h +++ b/drivers/staging/rtl8723bs/include/osdep_service_linux.h @@ -26,10 +26,10 @@ /* include */ #include #include - #include + #include #include - #include - #include + #include + #include #include #include #include -- 2.13.0
[PATCH] security: smack: smack.h - style fix
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- security/smack/smack.h | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/security/smack/smack.h b/security/smack/smack.h index 612b810fbbc6..f6563c2205b0 100644 --- a/security/smack/smack.h +++ b/security/smack/smack.h @@ -308,18 +308,21 @@ struct smk_audit_info { /* * These functions are in smack_access.c */ -int smk_access_entry(char *, char *, struct list_head *); -int smk_access(struct smack_known *, struct smack_known *, - int, struct smk_audit_info *); -int smk_tskacc(struct task_smack *, struct smack_known *, - u32, struct smk_audit_info *); -int smk_curacc(struct smack_known *, u32, struct smk_audit_info *); -struct smack_known *smack_from_secid(const u32); +int smk_access_entry(char *subject_label, char *object_label, +struct list_head *rule_list); +int smk_access(struct smack_known *subject, struct smack_known *object, + int request, struct smk_audit_info *a); +int smk_tskacc(struct task_smack *tsp, struct smack_known *obj_known, + u32 mode, struct smk_audit_info *a); +int smk_curacc(struct smack_known *obj_known, + u32 mode, struct smk_audit_info *a); +struct smack_known *smack_from_secid(const u32 secid); char *smk_parse_smack(const char *string, int len); -int smk_netlbl_mls(int, char *, struct netlbl_lsm_secattr *, int); -struct smack_known *smk_import_entry(const char *, int); +int smk_netlbl_mls(int level, char *catset, + struct netlbl_lsm_secattr *sap, int len); +struct smack_known *smk_import_entry(const char *string, int len); void smk_insert_entry(struct smack_known *skp); -struct smack_known *smk_find_entry(const char *); +struct smack_known *smk_find_entry(const char *string); int smack_privileged(int cap); void smk_destroy_label_list(struct list_head *list); -- 2.13.0
[PATCH] security: smack: smack.h - style fix
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson --- security/smack/smack.h | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/security/smack/smack.h b/security/smack/smack.h index 612b810fbbc6..f6563c2205b0 100644 --- a/security/smack/smack.h +++ b/security/smack/smack.h @@ -308,18 +308,21 @@ struct smk_audit_info { /* * These functions are in smack_access.c */ -int smk_access_entry(char *, char *, struct list_head *); -int smk_access(struct smack_known *, struct smack_known *, - int, struct smk_audit_info *); -int smk_tskacc(struct task_smack *, struct smack_known *, - u32, struct smk_audit_info *); -int smk_curacc(struct smack_known *, u32, struct smk_audit_info *); -struct smack_known *smack_from_secid(const u32); +int smk_access_entry(char *subject_label, char *object_label, +struct list_head *rule_list); +int smk_access(struct smack_known *subject, struct smack_known *object, + int request, struct smk_audit_info *a); +int smk_tskacc(struct task_smack *tsp, struct smack_known *obj_known, + u32 mode, struct smk_audit_info *a); +int smk_curacc(struct smack_known *obj_known, + u32 mode, struct smk_audit_info *a); +struct smack_known *smack_from_secid(const u32 secid); char *smk_parse_smack(const char *string, int len); -int smk_netlbl_mls(int, char *, struct netlbl_lsm_secattr *, int); -struct smack_known *smk_import_entry(const char *, int); +int smk_netlbl_mls(int level, char *catset, + struct netlbl_lsm_secattr *sap, int len); +struct smack_known *smk_import_entry(const char *string, int len); void smk_insert_entry(struct smack_known *skp); -struct smack_known *smk_find_entry(const char *); +struct smack_known *smk_find_entry(const char *string); int smack_privileged(int cap); void smk_destroy_label_list(struct list_head *list); -- 2.13.0
[PATCH] Drivers: rtl8192u - style fix
Fixed checkpatch error of "no spaces at the start of a line" Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/rtl8192u/r8192U.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4c7a5e3d3e5e..2959ea087148 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -917,9 +917,9 @@ typedef struct r8192_priv { int rx_inx; #endif - struct sk_buff_head rx_queue; - struct sk_buff_head skb_queue; - struct work_struct qos_activate; + struct sk_buff_head rx_queue; + struct sk_buff_head skb_queue; + struct work_struct qos_activate; short tx_urb_index; atomic_t tx_pending[0x10]; /* UART_PRIORITY + 1 */ -- 2.13.0
[PATCH] Drivers: rtl8192u - style fix
Fixed checkpatch error of "no spaces at the start of a line" Signed-off-by: Derek Robson --- drivers/staging/rtl8192u/r8192U.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4c7a5e3d3e5e..2959ea087148 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -917,9 +917,9 @@ typedef struct r8192_priv { int rx_inx; #endif - struct sk_buff_head rx_queue; - struct sk_buff_head skb_queue; - struct work_struct qos_activate; + struct sk_buff_head rx_queue; + struct sk_buff_head skb_queue; + struct work_struct qos_activate; short tx_urb_index; atomic_t tx_pending[0x10]; /* UART_PRIORITY + 1 */ -- 2.13.0
[PATCH] Drivers: ccree - style fix
Align block comments Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/cc_hw_queue_defs.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree/cc_hw_queue_defs.h b/drivers/staging/ccree/cc_hw_queue_defs.h index aaa56c85bda2..0e6416ed9a58 100644 --- a/drivers/staging/ccree/cc_hw_queue_defs.h +++ b/drivers/staging/ccree/cc_hw_queue_defs.h @@ -23,8 +23,8 @@ #include /** -* DEFINITIONS -**/ + * DEFINITIONS + **/ #define HW_DESC_SIZE_WORDS 6 #define HW_QUEUE_SLOTS_MAX 15 /* Max. available slots in HW queue */ @@ -70,8 +70,8 @@ #define WORD5_DOUT_ADDR_HIGH CC_GENMASK(5, DOUT_ADDR_HIGH) /** -* TYPE DEFINITIONS -**/ + * TYPE DEFINITIONS + **/ struct cc_hw_desc { union { -- 2.13.0
[PATCH] Drivers: ccree - style fix
Align block comments Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/cc_hw_queue_defs.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree/cc_hw_queue_defs.h b/drivers/staging/ccree/cc_hw_queue_defs.h index aaa56c85bda2..0e6416ed9a58 100644 --- a/drivers/staging/ccree/cc_hw_queue_defs.h +++ b/drivers/staging/ccree/cc_hw_queue_defs.h @@ -23,8 +23,8 @@ #include /** -* DEFINITIONS -**/ + * DEFINITIONS + **/ #define HW_DESC_SIZE_WORDS 6 #define HW_QUEUE_SLOTS_MAX 15 /* Max. available slots in HW queue */ @@ -70,8 +70,8 @@ #define WORD5_DOUT_ADDR_HIGH CC_GENMASK(5, DOUT_ADDR_HIGH) /** -* TYPE DEFINITIONS -**/ + * TYPE DEFINITIONS + **/ struct cc_hw_desc { union { -- 2.13.0
[PATCH] Drivers: unisys: visorhba - style fix
Fixed style of permissions to octal. Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 2fd31c9762c6..a6e7a6bbc428 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -1090,7 +1090,7 @@ static int visorhba_probe(struct visor_device *dev) goto err_scsi_remove_host; } devdata->debugfs_info = - debugfs_create_file("info", S_IRUSR | S_IRGRP, + debugfs_create_file("info", 0440, devdata->debugfs_dir, devdata, _debugfs_fops); if (!devdata->debugfs_info) { -- 2.13.0
[PATCH] Drivers: unisys: visorhba - style fix
Fixed style of permissions to octal. Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 2fd31c9762c6..a6e7a6bbc428 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -1090,7 +1090,7 @@ static int visorhba_probe(struct visor_device *dev) goto err_scsi_remove_host; } devdata->debugfs_info = - debugfs_create_file("info", S_IRUSR | S_IRGRP, + debugfs_create_file("info", 0440, devdata->debugfs_dir, devdata, _debugfs_fops); if (!devdata->debugfs_info) { -- 2.13.0
[PATCH] Drivers: sm750fb - style fix
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/sm750fb/sm750.h | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 5b186dafedec..4386122799b2 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -189,14 +189,22 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev); int hw_sm750_deWait(void); int hw_sm750le_deWait(void); -int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*); -int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort); -int hw_sm750_setBLANK(struct lynxfb_output*, int); -int hw_sm750le_setBLANK(struct lynxfb_output*, int); +int hw_sm750_output_setMode(struct lynxfb_output *output, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var); + +int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_setColReg(struct lynxfb_crtc *crtc, ushort index, + ushort red, ushort green, ushort blue); + +int hw_sm750_setBLANK(struct lynxfb_output *output, int blank); +int hw_sm750le_setBLANK(struct lynxfb_output *output, int blank); int hw_sm750_pan_display(struct lynxfb_crtc *crtc, const struct fb_var_screeninfo *var, const struct fb_info *info); -- 2.13.0
[PATCH] Drivers: sm750fb - style fix
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson --- drivers/staging/sm750fb/sm750.h | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 5b186dafedec..4386122799b2 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -189,14 +189,22 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev); int hw_sm750_deWait(void); int hw_sm750le_deWait(void); -int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*); -int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort); -int hw_sm750_setBLANK(struct lynxfb_output*, int); -int hw_sm750le_setBLANK(struct lynxfb_output*, int); +int hw_sm750_output_setMode(struct lynxfb_output *output, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var); + +int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_setColReg(struct lynxfb_crtc *crtc, ushort index, + ushort red, ushort green, ushort blue); + +int hw_sm750_setBLANK(struct lynxfb_output *output, int blank); +int hw_sm750le_setBLANK(struct lynxfb_output *output, int blank); int hw_sm750_pan_display(struct lynxfb_crtc *crtc, const struct fb_var_screeninfo *var, const struct fb_info *info); -- 2.13.0
[PATCH V2] Drivers: vt6655 - style fix
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson <robso...@gmail.com> --- Changes in v2: - Make the commit message more clear. drivers/staging/vt6655/card.h| 30 ++--- drivers/staging/vt6655/channel.h | 4 +-- drivers/staging/vt6655/mac.h | 58 drivers/staging/vt6655/power.h | 16 +++ drivers/staging/vt6655/rf.h | 16 +-- 5 files changed, 57 insertions(+), 67 deletions(-) diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 03369ffaa4d6..1a04dbb57d42 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -64,25 +64,25 @@ typedef enum _CARD_STATUS_TYPE { struct vnt_private; void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type); -void CARDvUpdateBasicTopRate(struct vnt_private *); -bool CARDbIsOFDMinBasicRate(struct vnt_private *); -void CARDvSetLoopbackMode(struct vnt_private *, unsigned short wLoopbackMode); -bool CARDbSoftwareReset(struct vnt_private *); -void CARDvSetFirstNextTBTT(struct vnt_private *, +void CARDvUpdateBasicTopRate(struct vnt_private *priv); +bool CARDbIsOFDMinBasicRate(struct vnt_private *priv); +void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode); +bool CARDbSoftwareReset(struct vnt_private *priv); +void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval); -void CARDvUpdateNextTBTT(struct vnt_private *, u64 qwTSF, +void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, unsigned short wBeaconInterval); -bool CARDbGetCurrentTSF(struct vnt_private *, u64 *pqwCurrTSF); +bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); -unsigned char CARDbyGetPktType(struct vnt_private *); -void CARDvSafeResetTx(struct vnt_private *); -void CARDvSafeResetRx(struct vnt_private *); -bool CARDbRadioPowerOff(struct vnt_private *); -bool CARDbRadioPowerOn(struct vnt_private *); -bool CARDbSetPhyParameter(struct vnt_private *, u8); -bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate, +unsigned char CARDbyGetPktType(struct vnt_private *priv); +void CARDvSafeResetTx(struct vnt_private *priv); +void CARDvSafeResetRx(struct vnt_private *priv); +bool CARDbRadioPowerOff(struct vnt_private *priv); +bool CARDbRadioPowerOn(struct vnt_private *priv); +bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type); +bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, u64 qwBSSTimestamp); -bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval); +bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval); #endif /* __CARD_H__ */ diff --git a/drivers/staging/vt6655/channel.h b/drivers/staging/vt6655/channel.h index 2621dfabff06..8fe70760e548 100644 --- a/drivers/staging/vt6655/channel.h +++ b/drivers/staging/vt6655/channel.h @@ -21,8 +21,8 @@ #include "card.h" -void vnt_init_bands(struct vnt_private *); +void vnt_init_bands(struct vnt_private *priv); -bool set_channel(struct vnt_private *, struct ieee80211_channel *); +bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 33b758cb79d4..db401e32ae23 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -885,57 +885,57 @@ do { \ #define MACvSetRFLE_LatchBase(iobase) \ MACvWordRegBitsOn(iobase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_RFLEOPT) -bool MACbIsRegBitsOn(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOn(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsRegBitsOff(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsIntDisable(struct vnt_private *); +bool MACbIsIntDisable(struct vnt_private *priv); -void MACvSetShortRetryLimit(struct vnt_private *, unsigned char byRetryLimit); +void MACvSetShortRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); -void MACvSetLongRetryLimit(struct vnt_private *, unsigned char byRetryLimit); -void MACvGetLongRetryLimit(struct vnt_private *, +void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); +void MACvGetLongRetryLimit(struct vnt_private *priv, unsigned char *pbyRetryLimit); -void MACvSetLoopbackMode(struct vnt_private *, unsigned c
[PATCH V2] Drivers: vt6655 - style fix
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson --- Changes in v2: - Make the commit message more clear. drivers/staging/vt6655/card.h| 30 ++--- drivers/staging/vt6655/channel.h | 4 +-- drivers/staging/vt6655/mac.h | 58 drivers/staging/vt6655/power.h | 16 +++ drivers/staging/vt6655/rf.h | 16 +-- 5 files changed, 57 insertions(+), 67 deletions(-) diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 03369ffaa4d6..1a04dbb57d42 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -64,25 +64,25 @@ typedef enum _CARD_STATUS_TYPE { struct vnt_private; void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type); -void CARDvUpdateBasicTopRate(struct vnt_private *); -bool CARDbIsOFDMinBasicRate(struct vnt_private *); -void CARDvSetLoopbackMode(struct vnt_private *, unsigned short wLoopbackMode); -bool CARDbSoftwareReset(struct vnt_private *); -void CARDvSetFirstNextTBTT(struct vnt_private *, +void CARDvUpdateBasicTopRate(struct vnt_private *priv); +bool CARDbIsOFDMinBasicRate(struct vnt_private *priv); +void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode); +bool CARDbSoftwareReset(struct vnt_private *priv); +void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval); -void CARDvUpdateNextTBTT(struct vnt_private *, u64 qwTSF, +void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, unsigned short wBeaconInterval); -bool CARDbGetCurrentTSF(struct vnt_private *, u64 *pqwCurrTSF); +bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); -unsigned char CARDbyGetPktType(struct vnt_private *); -void CARDvSafeResetTx(struct vnt_private *); -void CARDvSafeResetRx(struct vnt_private *); -bool CARDbRadioPowerOff(struct vnt_private *); -bool CARDbRadioPowerOn(struct vnt_private *); -bool CARDbSetPhyParameter(struct vnt_private *, u8); -bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate, +unsigned char CARDbyGetPktType(struct vnt_private *priv); +void CARDvSafeResetTx(struct vnt_private *priv); +void CARDvSafeResetRx(struct vnt_private *priv); +bool CARDbRadioPowerOff(struct vnt_private *priv); +bool CARDbRadioPowerOn(struct vnt_private *priv); +bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type); +bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, u64 qwBSSTimestamp); -bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval); +bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval); #endif /* __CARD_H__ */ diff --git a/drivers/staging/vt6655/channel.h b/drivers/staging/vt6655/channel.h index 2621dfabff06..8fe70760e548 100644 --- a/drivers/staging/vt6655/channel.h +++ b/drivers/staging/vt6655/channel.h @@ -21,8 +21,8 @@ #include "card.h" -void vnt_init_bands(struct vnt_private *); +void vnt_init_bands(struct vnt_private *priv); -bool set_channel(struct vnt_private *, struct ieee80211_channel *); +bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 33b758cb79d4..db401e32ae23 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -885,57 +885,57 @@ do { \ #define MACvSetRFLE_LatchBase(iobase) \ MACvWordRegBitsOn(iobase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_RFLEOPT) -bool MACbIsRegBitsOn(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOn(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsRegBitsOff(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsIntDisable(struct vnt_private *); +bool MACbIsIntDisable(struct vnt_private *priv); -void MACvSetShortRetryLimit(struct vnt_private *, unsigned char byRetryLimit); +void MACvSetShortRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); -void MACvSetLongRetryLimit(struct vnt_private *, unsigned char byRetryLimit); -void MACvGetLongRetryLimit(struct vnt_private *, +void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); +void MACvGetLongRetryLimit(struct vnt_private *priv, unsigned char *pbyRetryLimit); -void MACvSetLoopbackMode(struct vnt_private *, unsigned char byLoopbackMode); +void MACvSe
[PATCH] Drivers: vt6655 - style fix
Fixed "function definition" issues Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/vt6655/card.h| 30 ++--- drivers/staging/vt6655/channel.h | 4 +-- drivers/staging/vt6655/mac.h | 58 drivers/staging/vt6655/power.h | 16 +++ drivers/staging/vt6655/rf.h | 16 +-- 5 files changed, 57 insertions(+), 67 deletions(-) diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 03369ffaa4d6..1a04dbb57d42 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -64,25 +64,25 @@ typedef enum _CARD_STATUS_TYPE { struct vnt_private; void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type); -void CARDvUpdateBasicTopRate(struct vnt_private *); -bool CARDbIsOFDMinBasicRate(struct vnt_private *); -void CARDvSetLoopbackMode(struct vnt_private *, unsigned short wLoopbackMode); -bool CARDbSoftwareReset(struct vnt_private *); -void CARDvSetFirstNextTBTT(struct vnt_private *, +void CARDvUpdateBasicTopRate(struct vnt_private *priv); +bool CARDbIsOFDMinBasicRate(struct vnt_private *priv); +void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode); +bool CARDbSoftwareReset(struct vnt_private *priv); +void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval); -void CARDvUpdateNextTBTT(struct vnt_private *, u64 qwTSF, +void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, unsigned short wBeaconInterval); -bool CARDbGetCurrentTSF(struct vnt_private *, u64 *pqwCurrTSF); +bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); -unsigned char CARDbyGetPktType(struct vnt_private *); -void CARDvSafeResetTx(struct vnt_private *); -void CARDvSafeResetRx(struct vnt_private *); -bool CARDbRadioPowerOff(struct vnt_private *); -bool CARDbRadioPowerOn(struct vnt_private *); -bool CARDbSetPhyParameter(struct vnt_private *, u8); -bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate, +unsigned char CARDbyGetPktType(struct vnt_private *priv); +void CARDvSafeResetTx(struct vnt_private *priv); +void CARDvSafeResetRx(struct vnt_private *priv); +bool CARDbRadioPowerOff(struct vnt_private *priv); +bool CARDbRadioPowerOn(struct vnt_private *priv); +bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type); +bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, u64 qwBSSTimestamp); -bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval); +bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval); #endif /* __CARD_H__ */ diff --git a/drivers/staging/vt6655/channel.h b/drivers/staging/vt6655/channel.h index 2621dfabff06..8fe70760e548 100644 --- a/drivers/staging/vt6655/channel.h +++ b/drivers/staging/vt6655/channel.h @@ -21,8 +21,8 @@ #include "card.h" -void vnt_init_bands(struct vnt_private *); +void vnt_init_bands(struct vnt_private *priv); -bool set_channel(struct vnt_private *, struct ieee80211_channel *); +bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 33b758cb79d4..db401e32ae23 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -885,57 +885,57 @@ do { \ #define MACvSetRFLE_LatchBase(iobase) \ MACvWordRegBitsOn(iobase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_RFLEOPT) -bool MACbIsRegBitsOn(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOn(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsRegBitsOff(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsIntDisable(struct vnt_private *); +bool MACbIsIntDisable(struct vnt_private *priv); -void MACvSetShortRetryLimit(struct vnt_private *, unsigned char byRetryLimit); +void MACvSetShortRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); -void MACvSetLongRetryLimit(struct vnt_private *, unsigned char byRetryLimit); -void MACvGetLongRetryLimit(struct vnt_private *, +void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); +void MACvGetLongRetryLimit(struct vnt_private *priv, unsigned char *pbyRetryLimit); -void MACvSetLoopbackMode(struct vnt_private *, unsigned char byLoopbackMode); +void MACvSetLoopbackMode(struct vnt_private *priv, unsigned char byLoopbackMode); -void MACvSaveContext(struct vn
[PATCH] Drivers: vt6655 - style fix
Fixed "function definition" issues Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/vt6655/card.h| 30 ++--- drivers/staging/vt6655/channel.h | 4 +-- drivers/staging/vt6655/mac.h | 58 drivers/staging/vt6655/power.h | 16 +++ drivers/staging/vt6655/rf.h | 16 +-- 5 files changed, 57 insertions(+), 67 deletions(-) diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 03369ffaa4d6..1a04dbb57d42 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -64,25 +64,25 @@ typedef enum _CARD_STATUS_TYPE { struct vnt_private; void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type); -void CARDvUpdateBasicTopRate(struct vnt_private *); -bool CARDbIsOFDMinBasicRate(struct vnt_private *); -void CARDvSetLoopbackMode(struct vnt_private *, unsigned short wLoopbackMode); -bool CARDbSoftwareReset(struct vnt_private *); -void CARDvSetFirstNextTBTT(struct vnt_private *, +void CARDvUpdateBasicTopRate(struct vnt_private *priv); +bool CARDbIsOFDMinBasicRate(struct vnt_private *priv); +void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode); +bool CARDbSoftwareReset(struct vnt_private *priv); +void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval); -void CARDvUpdateNextTBTT(struct vnt_private *, u64 qwTSF, +void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, unsigned short wBeaconInterval); -bool CARDbGetCurrentTSF(struct vnt_private *, u64 *pqwCurrTSF); +bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); -unsigned char CARDbyGetPktType(struct vnt_private *); -void CARDvSafeResetTx(struct vnt_private *); -void CARDvSafeResetRx(struct vnt_private *); -bool CARDbRadioPowerOff(struct vnt_private *); -bool CARDbRadioPowerOn(struct vnt_private *); -bool CARDbSetPhyParameter(struct vnt_private *, u8); -bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate, +unsigned char CARDbyGetPktType(struct vnt_private *priv); +void CARDvSafeResetTx(struct vnt_private *priv); +void CARDvSafeResetRx(struct vnt_private *priv); +bool CARDbRadioPowerOff(struct vnt_private *priv); +bool CARDbRadioPowerOn(struct vnt_private *priv); +bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type); +bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, u64 qwBSSTimestamp); -bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval); +bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval); #endif /* __CARD_H__ */ diff --git a/drivers/staging/vt6655/channel.h b/drivers/staging/vt6655/channel.h index 2621dfabff06..8fe70760e548 100644 --- a/drivers/staging/vt6655/channel.h +++ b/drivers/staging/vt6655/channel.h @@ -21,8 +21,8 @@ #include "card.h" -void vnt_init_bands(struct vnt_private *); +void vnt_init_bands(struct vnt_private *priv); -bool set_channel(struct vnt_private *, struct ieee80211_channel *); +bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 33b758cb79d4..db401e32ae23 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -885,57 +885,57 @@ do { \ #define MACvSetRFLE_LatchBase(iobase) \ MACvWordRegBitsOn(iobase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_RFLEOPT) -bool MACbIsRegBitsOn(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOn(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsRegBitsOff(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsIntDisable(struct vnt_private *); +bool MACbIsIntDisable(struct vnt_private *priv); -void MACvSetShortRetryLimit(struct vnt_private *, unsigned char byRetryLimit); +void MACvSetShortRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); -void MACvSetLongRetryLimit(struct vnt_private *, unsigned char byRetryLimit); -void MACvGetLongRetryLimit(struct vnt_private *, +void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); +void MACvGetLongRetryLimit(struct vnt_private *priv, unsigned char *pbyRetryLimit); -void MACvSetLoopbackMode(struct vnt_private *, unsigned char byLoopbackMode); +void MACvSetLoopbackMode(struct vnt_private *priv, unsigned char byLoopbackMode); -void MACvSaveContext(struct vnt_private *, unsigned cha
[PATCH] Drivers: ccree - style fix, spaces and tabs
Changed code indent to be tabs across whole driver Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_cipher.c | 45 +- drivers/staging/ccree/ssi_driver.c | 6 ++--- drivers/staging/ccree/ssi_driver.h | 6 ++--- drivers/staging/ccree/ssi_fips.h | 8 +++--- drivers/staging/ccree/ssi_fips_ext.c | 4 +-- drivers/staging/ccree/ssi_fips_ll.c| 40 +++--- drivers/staging/ccree/ssi_fips_local.c | 28 ++--- drivers/staging/ccree/ssi_fips_local.h | 12 - 8 files changed, 75 insertions(+), 74 deletions(-) diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index 2dfc6a3bd4c1..34450a5e6573 100644 --- a/drivers/staging/ccree/ssi_cipher.c +++ b/drivers/staging/ccree/ssi_cipher.c @@ -258,45 +258,45 @@ static void ssi_blkcipher_exit(struct crypto_tfm *tfm) typedef struct tdes_keys{ -u8 key1[DES_KEY_SIZE]; -u8 key2[DES_KEY_SIZE]; -u8 key3[DES_KEY_SIZE]; + u8 key1[DES_KEY_SIZE]; + u8 key2[DES_KEY_SIZE]; + u8 key3[DES_KEY_SIZE]; }tdes_keys_t; -static const u8 zero_buff[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; +static const u8 zero_buff[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; /* The function verifies that tdes keys are not weak.*/ static int ssi_fips_verify_3des_keys(const u8 *key, unsigned int keylen) { #ifdef CCREE_FIPS_SUPPORT -tdes_keys_t *tdes_key = (tdes_keys_t*)key; + tdes_keys_t *tdes_key = (tdes_keys_t*)key; /* verify key1 != key2 and key3 != key2*/ -if (unlikely( (memcmp((u8*)tdes_key->key1, (u8*)tdes_key->key2, sizeof(tdes_key->key1)) == 0) || + if (unlikely( (memcmp((u8*)tdes_key->key1, (u8*)tdes_key->key2, sizeof(tdes_key->key1)) == 0) || (memcmp((u8*)tdes_key->key3, (u8*)tdes_key->key2, sizeof(tdes_key->key3)) == 0) )) { -return -ENOEXEC; -} + return -ENOEXEC; + } #endif /* CCREE_FIPS_SUPPORT */ -return 0; + return 0; } /* The function verifies that xts keys are not weak.*/ static int ssi_fips_verify_xts_keys(const u8 *key, unsigned int keylen) { #ifdef CCREE_FIPS_SUPPORT -/* Weak key is define as key that its first half (128/256 lsb) equals its second half (128/256 msb) */ -int singleKeySize = keylen >> 1; + /* Weak key is define as key that its first half (128/256 lsb) equals its second half (128/256 msb) */ + int singleKeySize = keylen >> 1; if (unlikely(memcmp(key, [singleKeySize], singleKeySize) == 0)) { return -ENOEXEC; } #endif /* CCREE_FIPS_SUPPORT */ -return 0; + return 0; } static enum cc_hw_crypto_key hw_key_to_cc_hw_key(int slot_num) @@ -720,12 +720,13 @@ ssi_blkcipher_create_data_desc( } static int ssi_blkcipher_complete(struct device *dev, - struct ssi_ablkcipher_ctx *ctx_p, - struct blkcipher_req_ctx *req_ctx, - struct scatterlist *dst, struct scatterlist *src, - unsigned int ivsize, - void *areq, - void __iomem *cc_base) + struct ssi_ablkcipher_ctx *ctx_p, + struct blkcipher_req_ctx *req_ctx, + struct scatterlist *dst, + struct scatterlist *src, + unsigned int ivsize, + void *areq, + void __iomem *cc_base) { int completion_error = 0; u32 inflight_counter; @@ -779,7 +780,7 @@ static int ssi_blkcipher_process( /* No data to process is valid */ return 0; } -/*For CTS in case of data size aligned to 16 use CBC mode*/ + /*For CTS in case of data size aligned to 16 use CBC mode*/ if (((nbytes % AES_BLOCK_SIZE) == 0) && (ctx_p->cipher_mode == DRV_CIPHER_CBC_CTS)){ ctx_p->cipher_mode = DRV_CIPHER_CBC; diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 190922970bf0..b9d0dd27e853 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c
[PATCH] Drivers: ccree - style fix, spaces and tabs
Changed code indent to be tabs across whole driver Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_cipher.c | 45 +- drivers/staging/ccree/ssi_driver.c | 6 ++--- drivers/staging/ccree/ssi_driver.h | 6 ++--- drivers/staging/ccree/ssi_fips.h | 8 +++--- drivers/staging/ccree/ssi_fips_ext.c | 4 +-- drivers/staging/ccree/ssi_fips_ll.c| 40 +++--- drivers/staging/ccree/ssi_fips_local.c | 28 ++--- drivers/staging/ccree/ssi_fips_local.h | 12 - 8 files changed, 75 insertions(+), 74 deletions(-) diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index 2dfc6a3bd4c1..34450a5e6573 100644 --- a/drivers/staging/ccree/ssi_cipher.c +++ b/drivers/staging/ccree/ssi_cipher.c @@ -258,45 +258,45 @@ static void ssi_blkcipher_exit(struct crypto_tfm *tfm) typedef struct tdes_keys{ -u8 key1[DES_KEY_SIZE]; -u8 key2[DES_KEY_SIZE]; -u8 key3[DES_KEY_SIZE]; + u8 key1[DES_KEY_SIZE]; + u8 key2[DES_KEY_SIZE]; + u8 key3[DES_KEY_SIZE]; }tdes_keys_t; -static const u8 zero_buff[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; +static const u8 zero_buff[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; /* The function verifies that tdes keys are not weak.*/ static int ssi_fips_verify_3des_keys(const u8 *key, unsigned int keylen) { #ifdef CCREE_FIPS_SUPPORT -tdes_keys_t *tdes_key = (tdes_keys_t*)key; + tdes_keys_t *tdes_key = (tdes_keys_t*)key; /* verify key1 != key2 and key3 != key2*/ -if (unlikely( (memcmp((u8*)tdes_key->key1, (u8*)tdes_key->key2, sizeof(tdes_key->key1)) == 0) || + if (unlikely( (memcmp((u8*)tdes_key->key1, (u8*)tdes_key->key2, sizeof(tdes_key->key1)) == 0) || (memcmp((u8*)tdes_key->key3, (u8*)tdes_key->key2, sizeof(tdes_key->key3)) == 0) )) { -return -ENOEXEC; -} + return -ENOEXEC; + } #endif /* CCREE_FIPS_SUPPORT */ -return 0; + return 0; } /* The function verifies that xts keys are not weak.*/ static int ssi_fips_verify_xts_keys(const u8 *key, unsigned int keylen) { #ifdef CCREE_FIPS_SUPPORT -/* Weak key is define as key that its first half (128/256 lsb) equals its second half (128/256 msb) */ -int singleKeySize = keylen >> 1; + /* Weak key is define as key that its first half (128/256 lsb) equals its second half (128/256 msb) */ + int singleKeySize = keylen >> 1; if (unlikely(memcmp(key, [singleKeySize], singleKeySize) == 0)) { return -ENOEXEC; } #endif /* CCREE_FIPS_SUPPORT */ -return 0; + return 0; } static enum cc_hw_crypto_key hw_key_to_cc_hw_key(int slot_num) @@ -720,12 +720,13 @@ ssi_blkcipher_create_data_desc( } static int ssi_blkcipher_complete(struct device *dev, - struct ssi_ablkcipher_ctx *ctx_p, - struct blkcipher_req_ctx *req_ctx, - struct scatterlist *dst, struct scatterlist *src, - unsigned int ivsize, - void *areq, - void __iomem *cc_base) + struct ssi_ablkcipher_ctx *ctx_p, + struct blkcipher_req_ctx *req_ctx, + struct scatterlist *dst, + struct scatterlist *src, + unsigned int ivsize, + void *areq, + void __iomem *cc_base) { int completion_error = 0; u32 inflight_counter; @@ -779,7 +780,7 @@ static int ssi_blkcipher_process( /* No data to process is valid */ return 0; } -/*For CTS in case of data size aligned to 16 use CBC mode*/ + /*For CTS in case of data size aligned to 16 use CBC mode*/ if (((nbytes % AES_BLOCK_SIZE) == 0) && (ctx_p->cipher_mode == DRV_CIPHER_CBC_CTS)){ ctx_p->cipher_mode = DRV_CIPHER_CBC; diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 190922970bf0..b9d0dd27e853 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -437,9 +437,9 @@ static void c
[PATCH V2 27/27] Drivers: ccree: cc_crypto_ctx.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/cc_crypto_ctx.h | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ccree/cc_crypto_ctx.h b/drivers/staging/ccree/cc_crypto_ctx.h index ac39d349060d..191f92f0ef22 100644 --- a/drivers/staging/ccree/cc_crypto_ctx.h +++ b/drivers/staging/ccree/cc_crypto_ctx.h @@ -219,7 +219,8 @@ struct drv_ctx_hash { }; /* drv_ctx_hmac should have the same structure as drv_ctx_hash except - k0, k0_size fields */ + * k0, k0_size fields + */ struct drv_ctx_hmac { enum drv_crypto_alg alg; /* DRV_CRYPTO_ALG_HMAC */ enum drv_hash_mode mode; @@ -240,9 +241,10 @@ struct drv_ctx_cipher { u32 key_size; /* numeric value in bytes */ u32 data_unit_size; /* required for XTS */ /* block_state is the AES engine block state. - * It is used by the host to pass IV or counter at initialization. - * It is used by SeP for intermediate block chaining state and for - * returning MAC algorithms results. */ +* It is used by the host to pass IV or counter at initialization. +* It is used by SeP for intermediate block chaining state and for +* returning MAC algorithms results. + */ u8 block_state[CC_AES_BLOCK_SIZE]; u8 key[CC_AES_KEY_SIZE_MAX]; u8 xex_key[CC_AES_KEY_SIZE_MAX]; @@ -279,9 +281,10 @@ struct drv_ctx_aead { /* Get the address of a @member within a given @ctx address - @ctx: The context address - @type: Type of context structure - @member: Associated context field */ + * @ctx: The context address + * @type: Type of context structure + * @member: Associated context field + */ #define GET_CTX_FIELD_ADDR(ctx, type, member) (ctx + offsetof(type, member)) #endif /* _CC_CRYPTO_CTX_H_ */ -- 2.13.0
[PATCH V2 27/27] Drivers: ccree: cc_crypto_ctx.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/cc_crypto_ctx.h | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ccree/cc_crypto_ctx.h b/drivers/staging/ccree/cc_crypto_ctx.h index ac39d349060d..191f92f0ef22 100644 --- a/drivers/staging/ccree/cc_crypto_ctx.h +++ b/drivers/staging/ccree/cc_crypto_ctx.h @@ -219,7 +219,8 @@ struct drv_ctx_hash { }; /* drv_ctx_hmac should have the same structure as drv_ctx_hash except - k0, k0_size fields */ + * k0, k0_size fields + */ struct drv_ctx_hmac { enum drv_crypto_alg alg; /* DRV_CRYPTO_ALG_HMAC */ enum drv_hash_mode mode; @@ -240,9 +241,10 @@ struct drv_ctx_cipher { u32 key_size; /* numeric value in bytes */ u32 data_unit_size; /* required for XTS */ /* block_state is the AES engine block state. - * It is used by the host to pass IV or counter at initialization. - * It is used by SeP for intermediate block chaining state and for - * returning MAC algorithms results. */ +* It is used by the host to pass IV or counter at initialization. +* It is used by SeP for intermediate block chaining state and for +* returning MAC algorithms results. + */ u8 block_state[CC_AES_BLOCK_SIZE]; u8 key[CC_AES_KEY_SIZE_MAX]; u8 xex_key[CC_AES_KEY_SIZE_MAX]; @@ -279,9 +281,10 @@ struct drv_ctx_aead { /* Get the address of a @member within a given @ctx address - @ctx: The context address - @type: Type of context structure - @member: Associated context field */ + * @ctx: The context address + * @type: Type of context structure + * @member: Associated context field + */ #define GET_CTX_FIELD_ADDR(ctx, type, member) (ctx + offsetof(type, member)) #endif /* _CC_CRYPTO_CTX_H_ */ -- 2.13.0
[PATCH V2 25/27] Drivers: ccree: cc_regs.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/cc_regs.h | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ccree/cc_regs.h b/drivers/staging/ccree/cc_regs.h index 8b89f0603f16..51b01609838e 100644 --- a/drivers/staging/ccree/cc_regs.h +++ b/drivers/staging/ccree/cc_regs.h @@ -55,8 +55,9 @@ do { \ BITFIELD_GET(reg_val, CC_ ## reg_name ## _ ## fld_name ## _BIT_SHIFT, \ CC_ ## reg_name ## _ ## fld_name ## _BIT_SIZE)) -/* yael TBD !!! -* -* all HW includes should start with CC_ and not DX_ !! */ +/* yael TBD !!! + * all HW includes should start with CC_ and not DX_ !! + */ /*! Bit fields set */ @@ -86,10 +87,10 @@ do { \ } while (0) /* Usage example: - u32 reg_shadow = READ_REGISTER(CC_REG_ADDR(CRY_KERNEL,AES_CONTROL)); - CC_REG_FLD_SET(CRY_KERNEL,AES_CONTROL,NK_KEY0,reg_shadow, 3); - CC_REG_FLD_SET(CRY_KERNEL,AES_CONTROL,NK_KEY1,reg_shadow, 1); - WRITE_REGISTER(CC_REG_ADDR(CRY_KERNEL,AES_CONTROL), reg_shadow); + * u32 reg_shadow = READ_REGISTER(CC_REG_ADDR(CRY_KERNEL,AES_CONTROL)); + * CC_REG_FLD_SET(CRY_KERNEL,AES_CONTROL,NK_KEY0,reg_shadow, 3); + * CC_REG_FLD_SET(CRY_KERNEL,AES_CONTROL,NK_KEY1,reg_shadow, 1); + * WRITE_REGISTER(CC_REG_ADDR(CRY_KERNEL,AES_CONTROL), reg_shadow); */ #endif /*_CC_REGS_H_*/ -- 2.13.0
[PATCH V2 26/27] Drivers: ccree: cc_hw_queue_defs.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/cc_hw_queue_defs.h | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/ccree/cc_hw_queue_defs.h b/drivers/staging/ccree/cc_hw_queue_defs.h index 71381760566d..bb64fddc371d 100644 --- a/drivers/staging/ccree/cc_hw_queue_defs.h +++ b/drivers/staging/ccree/cc_hw_queue_defs.h @@ -23,8 +23,8 @@ #include "dx_crys_kernel.h" /** -* DEFINITIONS -**/ + * DEFINITIONS + **/ /* Dma AXI Secure bit */ #defineAXI_SECURE 0 @@ -36,8 +36,8 @@ #define _HW_DESC_MONITOR_KICK 0x7FFFC00 /** -* TYPE DEFINITIONS -**/ + * TYPE DEFINITIONS + **/ struct cc_hw_desc { u32 word[HW_DESC_SIZE_WORDS]; @@ -400,7 +400,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param numRounds number of rounds for Multi2 -*/ + */ #define HW_DESC_SET_MULTI2_NUM_ROUNDS(pDesc, numRounds) \ do { \ CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD2, VALUE, (pDesc)->word[2], (u32)(numRounds)); \ @@ -411,7 +411,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param flowMode Any one of the modes defined in [CC7x-DESC] -*/ + */ #define HW_DESC_SET_FLOW_MODE(pDesc, flowMode) \ do { \ @@ -423,7 +423,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param cipherMode Any one of the modes defined in [CC7x-DESC] -*/ + */ #define HW_DESC_SET_CIPHER_MODE(pDesc, cipherMode) \ do { \ CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_MODE, (pDesc)->word[4], (cipherMode)); \ @@ -434,7 +434,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param cipherConfig Any one of the modes defined in [CC7x-DESC] -*/ + */ #define HW_DESC_SET_CIPHER_CONFIG0(pDesc, cipherConfig) \ do { \ CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_CONF0, (pDesc)->word[4], (cipherConfig));\ @@ -445,7 +445,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param cipherConfig Any one of the modes defined in [CC7x-DESC] -*/ + */ #define HW_DESC_SET_CIPHER_CONFIG1(pDesc, cipherConfig) \ do { \ CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_CONF1, (pDesc)->word[4], (cipherConfig));\ @@ -456,7 +456,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param hwKey The hw key number as in enun HwCryptoKey -*/ + */ #define HW_DESC_SET_HW_CRYPTO_KEY(pDesc, hwKey) \ do { \ CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_DO, (pDesc)->word[4], (hwKey) & HW_KEY_MASK_CIPHER_DO); \ @@ -468,7 +468,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param swapConfig Any one of the modes defined in [CC7x-DESC] -*/ + */ #define HW_DESC_SET_BYTES_SWAP(pDesc, swapConfig) \ do { \
[PATCH V2 26/27] Drivers: ccree: cc_hw_queue_defs.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/cc_hw_queue_defs.h | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/ccree/cc_hw_queue_defs.h b/drivers/staging/ccree/cc_hw_queue_defs.h index 71381760566d..bb64fddc371d 100644 --- a/drivers/staging/ccree/cc_hw_queue_defs.h +++ b/drivers/staging/ccree/cc_hw_queue_defs.h @@ -23,8 +23,8 @@ #include "dx_crys_kernel.h" /** -* DEFINITIONS -**/ + * DEFINITIONS + **/ /* Dma AXI Secure bit */ #defineAXI_SECURE 0 @@ -36,8 +36,8 @@ #define _HW_DESC_MONITOR_KICK 0x7FFFC00 /** -* TYPE DEFINITIONS -**/ + * TYPE DEFINITIONS + **/ struct cc_hw_desc { u32 word[HW_DESC_SIZE_WORDS]; @@ -400,7 +400,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param numRounds number of rounds for Multi2 -*/ + */ #define HW_DESC_SET_MULTI2_NUM_ROUNDS(pDesc, numRounds) \ do { \ CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD2, VALUE, (pDesc)->word[2], (u32)(numRounds)); \ @@ -411,7 +411,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param flowMode Any one of the modes defined in [CC7x-DESC] -*/ + */ #define HW_DESC_SET_FLOW_MODE(pDesc, flowMode) \ do { \ @@ -423,7 +423,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param cipherMode Any one of the modes defined in [CC7x-DESC] -*/ + */ #define HW_DESC_SET_CIPHER_MODE(pDesc, cipherMode) \ do { \ CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_MODE, (pDesc)->word[4], (cipherMode)); \ @@ -434,7 +434,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param cipherConfig Any one of the modes defined in [CC7x-DESC] -*/ + */ #define HW_DESC_SET_CIPHER_CONFIG0(pDesc, cipherConfig) \ do { \ CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_CONF0, (pDesc)->word[4], (cipherConfig));\ @@ -445,7 +445,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param cipherConfig Any one of the modes defined in [CC7x-DESC] -*/ + */ #define HW_DESC_SET_CIPHER_CONFIG1(pDesc, cipherConfig) \ do { \ CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_CONF1, (pDesc)->word[4], (cipherConfig));\ @@ -456,7 +456,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param hwKey The hw key number as in enun HwCryptoKey -*/ + */ #define HW_DESC_SET_HW_CRYPTO_KEY(pDesc, hwKey) \ do { \ CC_REG_FLD_SET(CRY_KERNEL, DSCRPTR_QUEUE_WORD4, CIPHER_DO, (pDesc)->word[4], (hwKey) & HW_KEY_MASK_CIPHER_DO); \ @@ -468,7 +468,7 @@ enum cc_hw_des_key_size { * * \param pDesc pointer HW descriptor struct * \param swapConfig Any one of the modes defined in [CC7x-DESC] -*/ + */ #define HW_DESC_SET_BYTES_SWAP(pDesc, swapConfig) \ do { \ CC_REG_FLD_SET(CR
[PATCH V2 25/27] Drivers: ccree: cc_regs.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/cc_regs.h | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ccree/cc_regs.h b/drivers/staging/ccree/cc_regs.h index 8b89f0603f16..51b01609838e 100644 --- a/drivers/staging/ccree/cc_regs.h +++ b/drivers/staging/ccree/cc_regs.h @@ -55,8 +55,9 @@ do { \ BITFIELD_GET(reg_val, CC_ ## reg_name ## _ ## fld_name ## _BIT_SHIFT, \ CC_ ## reg_name ## _ ## fld_name ## _BIT_SIZE)) -/* yael TBD !!! -* -* all HW includes should start with CC_ and not DX_ !! */ +/* yael TBD !!! + * all HW includes should start with CC_ and not DX_ !! + */ /*! Bit fields set */ @@ -86,10 +87,10 @@ do { \ } while (0) /* Usage example: - u32 reg_shadow = READ_REGISTER(CC_REG_ADDR(CRY_KERNEL,AES_CONTROL)); - CC_REG_FLD_SET(CRY_KERNEL,AES_CONTROL,NK_KEY0,reg_shadow, 3); - CC_REG_FLD_SET(CRY_KERNEL,AES_CONTROL,NK_KEY1,reg_shadow, 1); - WRITE_REGISTER(CC_REG_ADDR(CRY_KERNEL,AES_CONTROL), reg_shadow); + * u32 reg_shadow = READ_REGISTER(CC_REG_ADDR(CRY_KERNEL,AES_CONTROL)); + * CC_REG_FLD_SET(CRY_KERNEL,AES_CONTROL,NK_KEY0,reg_shadow, 3); + * CC_REG_FLD_SET(CRY_KERNEL,AES_CONTROL,NK_KEY1,reg_shadow, 1); + * WRITE_REGISTER(CC_REG_ADDR(CRY_KERNEL,AES_CONTROL), reg_shadow); */ #endif /*_CC_REGS_H_*/ -- 2.13.0
[PATCH V2 24/27] Drivers: ccree: hash_defs.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/hash_defs.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ccree/hash_defs.h b/drivers/staging/ccree/hash_defs.h index 613897038f6d..3f2b2d1521c2 100644 --- a/drivers/staging/ccree/hash_defs.h +++ b/drivers/staging/ccree/hash_defs.h @@ -59,13 +59,14 @@ enum HashCipherDoPadding { typedef struct SepHashPrivateContext { /* The current length is placed at the end of the context buffer because the hash - context is used for all HMAC operations as well. HMAC context includes a 64 bytes - K0 field. The size of struct drv_ctx_hash reserved field is 88/184 bytes depend if t - he SHA512 is supported ( in this case teh context size is 256 bytes). - The size of struct drv_ctx_hash reseved field is 20 or 52 depend if the SHA512 is supported. - This means that this structure size (without the reserved field can be up to 20 bytes , - in case sha512 is not suppported it is 20 bytes (SEP_HASH_LENGTH_WORDS define to 2 ) and in the other - case it is 28 (SEP_HASH_LENGTH_WORDS define to 4) */ +* context is used for all HMAC operations as well. HMAC context includes a 64 bytes +* K0 field. The size of struct drv_ctx_hash reserved field is 88/184 bytes depend if t +* he SHA512 is supported ( in this case teh context size is 256 bytes). +* The size of struct drv_ctx_hash reseved field is 20 or 52 depend if the SHA512 is supported. +* This means that this structure size (without the reserved field can be up to 20 bytes , +* in case sha512 is not suppported it is 20 bytes (SEP_HASH_LENGTH_WORDS define to 2 ) and in the other +* case it is 28 (SEP_HASH_LENGTH_WORDS define to 4) +*/ u32 reserved[(sizeof(struct drv_ctx_hash)/sizeof(u32)) - SEP_HASH_LENGTH_WORDS - 3]; u32 CurrentDigestedLength[SEP_HASH_LENGTH_WORDS]; u32 KeyType; -- 2.13.0
[PATCH V2 23/27] Drivers: ccree: ssi_aead.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_aead.c | 45 ++-- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c index 26afa8794668..ecf9ff2ae336 100644 --- a/drivers/staging/ccree/ssi_aead.c +++ b/drivers/staging/ccree/ssi_aead.c @@ -250,7 +250,8 @@ static void ssi_aead_complete(struct device *dev, void *ssi_req, void __iomem *c "(auth-size=%d, cipher=%d).\n", ctx->authsize, ctx->cipher_mode); /* In case of payload authentication failure, MUST NOT - revealed the decrypted message --> zero its memory. */ +* revealed the decrypted message --> zero its memory. +*/ ssi_buffer_mgr_zero_sgl(areq->dst, areq_ctx->cryptlen); err = -EBADMSG; } @@ -279,7 +280,8 @@ static int xcbc_setkey(struct cc_hw_desc *desc, struct ssi_aead_ctx *ctx) /* Load the AES key */ HW_DESC_INIT([0]); /* We are using for the source/user key the same buffer as for the output keys, - because after this key loading it is not needed anymore */ +* because after this key loading it is not needed anymore +*/ HW_DESC_SET_DIN_TYPE([0], DMA_DLLI, ctx->auth_state.xcbc.xcbc_keys_dma_addr, ctx->auth_keylen, NS_BIT); HW_DESC_SET_CIPHER_MODE([0], DRV_CIPHER_ECB); HW_DESC_SET_CIPHER_CONFIG0([0], DRV_CRYPTO_DIRECTION_ENCRYPT); @@ -420,8 +422,9 @@ static int validate_keys_sizes(struct ssi_aead_ctx *ctx) return 0; /* All tests of keys sizes passed */ } -/*This function prepers the user key so it can pass to the hmac processing - (copy to intenral buffer or hash in case of key longer than block */ +/* This function prepers the user key so it can pass to the hmac processing + * (copy to intenral buffer or hash in case of key longer than block + */ static int ssi_get_plain_hmac_key(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) { @@ -600,7 +603,8 @@ ssi_aead_setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) (AES_MIN_KEY_SIZE + CTR_RFC3686_NONCE_SIZE)) goto badkey; /* Copy nonce from last 4 bytes in CTR key to - * first 4 bytes in CTR IV */ +* first 4 bytes in CTR IV +*/ memcpy(ctx->ctr_nonce, key + ctx->auth_keylen + ctx->enc_keylen - CTR_RFC3686_NONCE_SIZE, CTR_RFC3686_NONCE_SIZE); /* Set CTR key size */ @@ -829,7 +833,8 @@ ssi_aead_process_authenc_data_desc( { /* DOUBLE-PASS flow (as default) * assoc. + iv + data -compact in one table -* if assoclen is ZERO only IV perform */ +* if assoclen is ZERO only IV perform +*/ ssi_sram_addr_t mlli_addr = areq_ctx->assoc.sram_addr; u32 mlli_nents = areq_ctx->assoc.mlli_nents; @@ -1287,7 +1292,8 @@ static inline void ssi_aead_hmac_authenc( /** * Double-pass flow * Fallback for unsupported single-pass modes, -* i.e. using assoc. data of non-word-multiple */ +* i.e. using assoc. data of non-word-multiple +*/ if (direct == DRV_CRYPTO_DIRECTION_ENCRYPT) { /* encrypt first.. */ ssi_aead_process_cipher(req, desc, seq_size, data_flow_mode); @@ -1305,7 +1311,8 @@ static inline void ssi_aead_hmac_authenc( /* decrypt after.. */ ssi_aead_process_cipher(req, desc, seq_size, data_flow_mode); /* read the digest result with setting the completion bit - must be after the cipher operation */ +* must be after the cipher operation +*/ ssi_aead_process_digest_result_desc(req, desc, seq_size); } } @@ -1338,7 +1345,8 @@ ssi_aead_xcbc_authenc( /** * Double-pass flow * Fallback for unsupported single-pass modes, -* i.e. using assoc. data of non-word-multiple */ +* i.e. using assoc. data of non-word-multiple +*/ if (direct == DRV_CRYPTO_DIRECTION_ENCRYPT) { /* encrypt first.. */ ssi_aead_process_cipher(req, desc, seq_size, data_flow_mode); @@ -1353,7 +1361,8 @@ ssi_aead_xcbc_authenc( /* decrypt after..*/ ssi_aead_process_cipher(req, desc, seq_size, data_flow_mode); /* read the digest result with setting the completion bi
[PATCH V2 24/27] Drivers: ccree: hash_defs.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/hash_defs.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ccree/hash_defs.h b/drivers/staging/ccree/hash_defs.h index 613897038f6d..3f2b2d1521c2 100644 --- a/drivers/staging/ccree/hash_defs.h +++ b/drivers/staging/ccree/hash_defs.h @@ -59,13 +59,14 @@ enum HashCipherDoPadding { typedef struct SepHashPrivateContext { /* The current length is placed at the end of the context buffer because the hash - context is used for all HMAC operations as well. HMAC context includes a 64 bytes - K0 field. The size of struct drv_ctx_hash reserved field is 88/184 bytes depend if t - he SHA512 is supported ( in this case teh context size is 256 bytes). - The size of struct drv_ctx_hash reseved field is 20 or 52 depend if the SHA512 is supported. - This means that this structure size (without the reserved field can be up to 20 bytes , - in case sha512 is not suppported it is 20 bytes (SEP_HASH_LENGTH_WORDS define to 2 ) and in the other - case it is 28 (SEP_HASH_LENGTH_WORDS define to 4) */ +* context is used for all HMAC operations as well. HMAC context includes a 64 bytes +* K0 field. The size of struct drv_ctx_hash reserved field is 88/184 bytes depend if t +* he SHA512 is supported ( in this case teh context size is 256 bytes). +* The size of struct drv_ctx_hash reseved field is 20 or 52 depend if the SHA512 is supported. +* This means that this structure size (without the reserved field can be up to 20 bytes , +* in case sha512 is not suppported it is 20 bytes (SEP_HASH_LENGTH_WORDS define to 2 ) and in the other +* case it is 28 (SEP_HASH_LENGTH_WORDS define to 4) +*/ u32 reserved[(sizeof(struct drv_ctx_hash)/sizeof(u32)) - SEP_HASH_LENGTH_WORDS - 3]; u32 CurrentDigestedLength[SEP_HASH_LENGTH_WORDS]; u32 KeyType; -- 2.13.0
[PATCH V2 23/27] Drivers: ccree: ssi_aead.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_aead.c | 45 ++-- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c index 26afa8794668..ecf9ff2ae336 100644 --- a/drivers/staging/ccree/ssi_aead.c +++ b/drivers/staging/ccree/ssi_aead.c @@ -250,7 +250,8 @@ static void ssi_aead_complete(struct device *dev, void *ssi_req, void __iomem *c "(auth-size=%d, cipher=%d).\n", ctx->authsize, ctx->cipher_mode); /* In case of payload authentication failure, MUST NOT - revealed the decrypted message --> zero its memory. */ +* revealed the decrypted message --> zero its memory. +*/ ssi_buffer_mgr_zero_sgl(areq->dst, areq_ctx->cryptlen); err = -EBADMSG; } @@ -279,7 +280,8 @@ static int xcbc_setkey(struct cc_hw_desc *desc, struct ssi_aead_ctx *ctx) /* Load the AES key */ HW_DESC_INIT([0]); /* We are using for the source/user key the same buffer as for the output keys, - because after this key loading it is not needed anymore */ +* because after this key loading it is not needed anymore +*/ HW_DESC_SET_DIN_TYPE([0], DMA_DLLI, ctx->auth_state.xcbc.xcbc_keys_dma_addr, ctx->auth_keylen, NS_BIT); HW_DESC_SET_CIPHER_MODE([0], DRV_CIPHER_ECB); HW_DESC_SET_CIPHER_CONFIG0([0], DRV_CRYPTO_DIRECTION_ENCRYPT); @@ -420,8 +422,9 @@ static int validate_keys_sizes(struct ssi_aead_ctx *ctx) return 0; /* All tests of keys sizes passed */ } -/*This function prepers the user key so it can pass to the hmac processing - (copy to intenral buffer or hash in case of key longer than block */ +/* This function prepers the user key so it can pass to the hmac processing + * (copy to intenral buffer or hash in case of key longer than block + */ static int ssi_get_plain_hmac_key(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) { @@ -600,7 +603,8 @@ ssi_aead_setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) (AES_MIN_KEY_SIZE + CTR_RFC3686_NONCE_SIZE)) goto badkey; /* Copy nonce from last 4 bytes in CTR key to - * first 4 bytes in CTR IV */ +* first 4 bytes in CTR IV +*/ memcpy(ctx->ctr_nonce, key + ctx->auth_keylen + ctx->enc_keylen - CTR_RFC3686_NONCE_SIZE, CTR_RFC3686_NONCE_SIZE); /* Set CTR key size */ @@ -829,7 +833,8 @@ ssi_aead_process_authenc_data_desc( { /* DOUBLE-PASS flow (as default) * assoc. + iv + data -compact in one table -* if assoclen is ZERO only IV perform */ +* if assoclen is ZERO only IV perform +*/ ssi_sram_addr_t mlli_addr = areq_ctx->assoc.sram_addr; u32 mlli_nents = areq_ctx->assoc.mlli_nents; @@ -1287,7 +1292,8 @@ static inline void ssi_aead_hmac_authenc( /** * Double-pass flow * Fallback for unsupported single-pass modes, -* i.e. using assoc. data of non-word-multiple */ +* i.e. using assoc. data of non-word-multiple +*/ if (direct == DRV_CRYPTO_DIRECTION_ENCRYPT) { /* encrypt first.. */ ssi_aead_process_cipher(req, desc, seq_size, data_flow_mode); @@ -1305,7 +1311,8 @@ static inline void ssi_aead_hmac_authenc( /* decrypt after.. */ ssi_aead_process_cipher(req, desc, seq_size, data_flow_mode); /* read the digest result with setting the completion bit - must be after the cipher operation */ +* must be after the cipher operation +*/ ssi_aead_process_digest_result_desc(req, desc, seq_size); } } @@ -1338,7 +1345,8 @@ ssi_aead_xcbc_authenc( /** * Double-pass flow * Fallback for unsupported single-pass modes, -* i.e. using assoc. data of non-word-multiple */ +* i.e. using assoc. data of non-word-multiple +*/ if (direct == DRV_CRYPTO_DIRECTION_ENCRYPT) { /* encrypt first.. */ ssi_aead_process_cipher(req, desc, seq_size, data_flow_mode); @@ -1353,7 +1361,8 @@ ssi_aead_xcbc_authenc( /* decrypt after..*/ ssi_aead_process_cipher(req, desc, seq_size, data_flow_mode); /* read the digest result with setting the completion bit - must be afte
[PATCH V2 22/27] Drivers: ccree: ssi_aead.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_aead.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.h b/drivers/staging/ccree/ssi_aead.h index 654a181729d7..00a3680cb8ab 100644 --- a/drivers/staging/ccree/ssi_aead.h +++ b/drivers/staging/ccree/ssi_aead.h @@ -15,7 +15,7 @@ */ /* \file ssi_aead.h - ARM CryptoCell AEAD Crypto API + * ARM CryptoCell AEAD Crypto API */ #ifndef __SSI_AEAD_H__ @@ -62,8 +62,9 @@ enum aead_ccm_header_size { struct aead_req_ctx { /* Allocate cache line although only 4 bytes are needed to - * assure next field falls @ cache line - * Used for both: digest HW compare and CCM/GCM MAC value */ +* assure next field falls @ cache line +* Used for both: digest HW compare and CCM/GCM MAC value +*/ u8 mac_buf[MAX_MAC_SIZE] cacheline_aligned; u8 ctr_iv[AES_BLOCK_SIZE] cacheline_aligned; -- 2.13.0
[PATCH V2 22/27] Drivers: ccree: ssi_aead.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_aead.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.h b/drivers/staging/ccree/ssi_aead.h index 654a181729d7..00a3680cb8ab 100644 --- a/drivers/staging/ccree/ssi_aead.h +++ b/drivers/staging/ccree/ssi_aead.h @@ -15,7 +15,7 @@ */ /* \file ssi_aead.h - ARM CryptoCell AEAD Crypto API + * ARM CryptoCell AEAD Crypto API */ #ifndef __SSI_AEAD_H__ @@ -62,8 +62,9 @@ enum aead_ccm_header_size { struct aead_req_ctx { /* Allocate cache line although only 4 bytes are needed to - * assure next field falls @ cache line - * Used for both: digest HW compare and CCM/GCM MAC value */ +* assure next field falls @ cache line +* Used for both: digest HW compare and CCM/GCM MAC value +*/ u8 mac_buf[MAX_MAC_SIZE] cacheline_aligned; u8 ctr_iv[AES_BLOCK_SIZE] cacheline_aligned; -- 2.13.0
[PATCH V2 21/27] Drivers: ccree: ssi_buffer_mgr.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_buffer_mgr.c | 87 +++--- 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c index 04515e70d2d3..edb88441e90d 100644 --- a/drivers/staging/ccree/ssi_buffer_mgr.c +++ b/drivers/staging/ccree/ssi_buffer_mgr.c @@ -330,7 +330,8 @@ static int ssi_buffer_mgr_generate_mlli( /* set last bit in the current table */ if (sg_data->mlli_nents[i] != NULL) { /*Calculate the current MLLI table length for the - length field in the descriptor*/ +*length field in the descriptor +*/ *(sg_data->mlli_nents[i]) += (total_nents - prev_total_nents); prev_total_nents = total_nents; @@ -463,7 +464,8 @@ static int ssi_buffer_mgr_map_scatterlist( } if (!is_chained) { /* In case of mmu the number of mapped nents might - be changed from the original sgl nents */ +* be changed from the original sgl nents +*/ *mapped_nents = dma_map_sg(dev, sg, *nents, direction); if (unlikely(*mapped_nents == 0)){ *nents = 0; @@ -472,7 +474,8 @@ static int ssi_buffer_mgr_map_scatterlist( } } else { /*In this case the driver maps entry by entry so it - must have the same nents before and after map */ +* must have the same nents before and after map +*/ *mapped_nents = ssi_buffer_mgr_dma_map_sg(dev, sg, *nents, @@ -764,7 +767,8 @@ void ssi_buffer_mgr_unmap_aead_request( } /*In case a pool was set, a table was - allocated and should be released */ +*allocated and should be released +*/ if (areq_ctx->mlli_params.curr_pool != NULL) { SSI_LOG_DEBUG("free MLLI buffer: dma=0x%08llX virt=%pK\n", (unsigned long long)areq_ctx->mlli_params.mlli_dma_addr, @@ -801,7 +805,8 @@ void ssi_buffer_mgr_unmap_aead_request( size_to_skip += crypto_aead_ivsize(tfm); } /* copy mac to a temporary location to deal with possible - data memory overriding that caused by cache coherence problem. */ +* data memory overriding that caused by cache coherence problem. +*/ ssi_buffer_mgr_copy_scatterlist_portion( areq_ctx->backup_mac, req->src, size_to_skip+ req->cryptlen - areq_ctx->req_authsize, @@ -965,7 +970,8 @@ static inline int ssi_buffer_mgr_aead_chain_assoc( areq_ctx->assoc.nents = mapped_nents; /* in CCM case we have additional entry for - * ccm header configurations */ +* ccm header configurations +*/ if (areq_ctx->ccm_hdr_size != ccm_header_size_null) { if (unlikely((mapped_nents + 1) > LLI_MAX_NUM_OF_ASSOC_DATA_ENTRIES)) { @@ -1068,13 +1074,15 @@ static inline int ssi_buffer_mgr_prepare_aead_data_mlli( if (unlikely(areq_ctx->is_icv_fragmented == true)) { /* Backup happens only when ICV is fragmented, ICV - verification is made by CPU compare in order to simplify - MAC verification upon request completion */ +* verification is made by CPU compare in order to simplify +* MAC verification upon request completion +*/ if (direct == DRV_CRYPTO_DIRECTION_DECRYPT) { #if !DX_HAS_ACP /* In ACP platform we already copying ICV - for any INPLACE-DECRYPT operation, hence - we must neglect this code. */ +* for any INPLACE-DECRYPT operation, hence +* we must neglect this code. +*/ u32 size_to_skip = req->assoclen; if (areq_ctx->is_gcm4543) { size_to_skip += crypto_aead_ivsize(tfm); @@ -1120,8 +1128,9 @@ static inline int ssi_buffer_mgr_prepare_aead_data_mlli(
[PATCH V2 21/27] Drivers: ccree: ssi_buffer_mgr.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_buffer_mgr.c | 87 +++--- 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c index 04515e70d2d3..edb88441e90d 100644 --- a/drivers/staging/ccree/ssi_buffer_mgr.c +++ b/drivers/staging/ccree/ssi_buffer_mgr.c @@ -330,7 +330,8 @@ static int ssi_buffer_mgr_generate_mlli( /* set last bit in the current table */ if (sg_data->mlli_nents[i] != NULL) { /*Calculate the current MLLI table length for the - length field in the descriptor*/ +*length field in the descriptor +*/ *(sg_data->mlli_nents[i]) += (total_nents - prev_total_nents); prev_total_nents = total_nents; @@ -463,7 +464,8 @@ static int ssi_buffer_mgr_map_scatterlist( } if (!is_chained) { /* In case of mmu the number of mapped nents might - be changed from the original sgl nents */ +* be changed from the original sgl nents +*/ *mapped_nents = dma_map_sg(dev, sg, *nents, direction); if (unlikely(*mapped_nents == 0)){ *nents = 0; @@ -472,7 +474,8 @@ static int ssi_buffer_mgr_map_scatterlist( } } else { /*In this case the driver maps entry by entry so it - must have the same nents before and after map */ +* must have the same nents before and after map +*/ *mapped_nents = ssi_buffer_mgr_dma_map_sg(dev, sg, *nents, @@ -764,7 +767,8 @@ void ssi_buffer_mgr_unmap_aead_request( } /*In case a pool was set, a table was - allocated and should be released */ +*allocated and should be released +*/ if (areq_ctx->mlli_params.curr_pool != NULL) { SSI_LOG_DEBUG("free MLLI buffer: dma=0x%08llX virt=%pK\n", (unsigned long long)areq_ctx->mlli_params.mlli_dma_addr, @@ -801,7 +805,8 @@ void ssi_buffer_mgr_unmap_aead_request( size_to_skip += crypto_aead_ivsize(tfm); } /* copy mac to a temporary location to deal with possible - data memory overriding that caused by cache coherence problem. */ +* data memory overriding that caused by cache coherence problem. +*/ ssi_buffer_mgr_copy_scatterlist_portion( areq_ctx->backup_mac, req->src, size_to_skip+ req->cryptlen - areq_ctx->req_authsize, @@ -965,7 +970,8 @@ static inline int ssi_buffer_mgr_aead_chain_assoc( areq_ctx->assoc.nents = mapped_nents; /* in CCM case we have additional entry for - * ccm header configurations */ +* ccm header configurations +*/ if (areq_ctx->ccm_hdr_size != ccm_header_size_null) { if (unlikely((mapped_nents + 1) > LLI_MAX_NUM_OF_ASSOC_DATA_ENTRIES)) { @@ -1068,13 +1074,15 @@ static inline int ssi_buffer_mgr_prepare_aead_data_mlli( if (unlikely(areq_ctx->is_icv_fragmented == true)) { /* Backup happens only when ICV is fragmented, ICV - verification is made by CPU compare in order to simplify - MAC verification upon request completion */ +* verification is made by CPU compare in order to simplify +* MAC verification upon request completion +*/ if (direct == DRV_CRYPTO_DIRECTION_DECRYPT) { #if !DX_HAS_ACP /* In ACP platform we already copying ICV - for any INPLACE-DECRYPT operation, hence - we must neglect this code. */ +* for any INPLACE-DECRYPT operation, hence +* we must neglect this code. +*/ u32 size_to_skip = req->assoclen; if (areq_ctx->is_gcm4543) { size_to_skip += crypto_aead_ivsize(tfm); @@ -1120,8 +1128,9 @@ static inline int ssi_buffer_mgr_prepare_aead_data_mlli(
[PATCH V2 20/27] Drivers: ccree: ssi_buffer_mgr.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_buffer_mgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.h b/drivers/staging/ccree/ssi_buffer_mgr.h index 4acbb4b6afc9..98355dd789e5 100644 --- a/drivers/staging/ccree/ssi_buffer_mgr.h +++ b/drivers/staging/ccree/ssi_buffer_mgr.h @@ -15,7 +15,7 @@ */ /* \file buffer_mgr.h - Buffer Manager + * Buffer Manager */ #ifndef __SSI_BUFFER_MGR_H__ -- 2.13.0
[PATCH V2 19/27] Drivers: ccree: ssi_cipher.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_cipher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_cipher.h b/drivers/staging/ccree/ssi_cipher.h index 7d58b56fc2c7..22d7b431edb9 100644 --- a/drivers/staging/ccree/ssi_cipher.h +++ b/drivers/staging/ccree/ssi_cipher.h @@ -15,7 +15,7 @@ */ /* \file ssi_cipher.h - ARM CryptoCell Cipher Crypto API + * ARM CryptoCell Cipher Crypto API */ #ifndef __SSI_CIPHER_H__ -- 2.13.0
[PATCH V2 20/27] Drivers: ccree: ssi_buffer_mgr.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_buffer_mgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.h b/drivers/staging/ccree/ssi_buffer_mgr.h index 4acbb4b6afc9..98355dd789e5 100644 --- a/drivers/staging/ccree/ssi_buffer_mgr.h +++ b/drivers/staging/ccree/ssi_buffer_mgr.h @@ -15,7 +15,7 @@ */ /* \file buffer_mgr.h - Buffer Manager + * Buffer Manager */ #ifndef __SSI_BUFFER_MGR_H__ -- 2.13.0
[PATCH V2 19/27] Drivers: ccree: ssi_cipher.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_cipher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_cipher.h b/drivers/staging/ccree/ssi_cipher.h index 7d58b56fc2c7..22d7b431edb9 100644 --- a/drivers/staging/ccree/ssi_cipher.h +++ b/drivers/staging/ccree/ssi_cipher.h @@ -15,7 +15,7 @@ */ /* \file ssi_cipher.h - ARM CryptoCell Cipher Crypto API + * ARM CryptoCell Cipher Crypto API */ #ifndef __SSI_CIPHER_H__ -- 2.13.0
[PATCH V2 17/27] Drivers: ccree: ssi_driver.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_driver.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index 45fc23fe169f..e034b0987137 100644 --- a/drivers/staging/ccree/ssi_driver.h +++ b/drivers/staging/ccree/ssi_driver.h @@ -15,7 +15,7 @@ */ /* \file ssi_driver.h - ARM CryptoCell Linux Crypto Driver + * ARM CryptoCell Linux Crypto Driver */ #ifndef __SSI_DRIVER_H__ @@ -86,7 +86,8 @@ #define NS_BIT 1 #define AXI_ID 0 /* AXI_ID is not actually the AXI ID of the transaction but the value of AXI_ID - field in the HW descriptor. The DMA engine +8 that value. */ + * field in the HW descriptor. The DMA engine +8 that value. + */ /* Logging macros */ #define SSI_LOG(level, format, ...) \ @@ -108,9 +109,11 @@ struct ssi_crypto_req { void (*user_cb)(struct device *dev, void *req, void __iomem *cc_base); void *user_arg; - dma_addr_t ivgen_dma_addr[SSI_MAX_IVGEN_DMA_ADDRESSES]; /* For the first 'ivgen_dma_addr_len' addresses of this array, -generated IV would be placed in it by send_request(). -Same generated IV for all addresses! */ + dma_addr_t ivgen_dma_addr[SSI_MAX_IVGEN_DMA_ADDRESSES]; + /* For the first 'ivgen_dma_addr_len' addresses of this array, +* generated IV would be placed in it by send_request(). +* Same generated IV for all addresses! +*/ unsigned int ivgen_dma_addr_len; /* Amount of 'ivgen_dma_addr' elements to be filled. */ unsigned int ivgen_size; /* The generated IV size required, 8/16 B allowed. */ struct completion seq_compl; /* request completion */ @@ -136,7 +139,8 @@ struct ssi_drvdata { u32 irq_mask; u32 fw_ver; /* Calibration time of start/stop - * monitor descriptors */ +* monitor descriptors +*/ u32 monitor_null_cycles; struct platform_device *plat_dev; ssi_sram_addr_t mlli_sram_addr; -- 2.13.0
[PATCH V2 18/27] Drivers: ccree: ssi_config.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_config.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_config.h b/drivers/staging/ccree/ssi_config.h index 431b518d893a..9feb692fff0d 100644 --- a/drivers/staging/ccree/ssi_config.h +++ b/drivers/staging/ccree/ssi_config.h @@ -15,7 +15,7 @@ */ /* \file ssi_config.h - Definitions for ARM CryptoCell Linux Crypto Driver + * Definitions for ARM CryptoCell Linux Crypto Driver */ #ifndef __SSI_CONFIG_H__ @@ -49,7 +49,8 @@ #define SSI_CACHE_PARAMS (0x000) /* CC attached to NONE-ACP such as HPP/ACE/AMBA4. * The customer is responsible to enable/disable this feature -* according to his platform type. */ +* according to his platform type. +*/ #define DX_HAS_ACP 0 #else #define SSI_CACHE_PARAMS (0xEEE) -- 2.13.0
[PATCH V2 17/27] Drivers: ccree: ssi_driver.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_driver.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index 45fc23fe169f..e034b0987137 100644 --- a/drivers/staging/ccree/ssi_driver.h +++ b/drivers/staging/ccree/ssi_driver.h @@ -15,7 +15,7 @@ */ /* \file ssi_driver.h - ARM CryptoCell Linux Crypto Driver + * ARM CryptoCell Linux Crypto Driver */ #ifndef __SSI_DRIVER_H__ @@ -86,7 +86,8 @@ #define NS_BIT 1 #define AXI_ID 0 /* AXI_ID is not actually the AXI ID of the transaction but the value of AXI_ID - field in the HW descriptor. The DMA engine +8 that value. */ + * field in the HW descriptor. The DMA engine +8 that value. + */ /* Logging macros */ #define SSI_LOG(level, format, ...) \ @@ -108,9 +109,11 @@ struct ssi_crypto_req { void (*user_cb)(struct device *dev, void *req, void __iomem *cc_base); void *user_arg; - dma_addr_t ivgen_dma_addr[SSI_MAX_IVGEN_DMA_ADDRESSES]; /* For the first 'ivgen_dma_addr_len' addresses of this array, -generated IV would be placed in it by send_request(). -Same generated IV for all addresses! */ + dma_addr_t ivgen_dma_addr[SSI_MAX_IVGEN_DMA_ADDRESSES]; + /* For the first 'ivgen_dma_addr_len' addresses of this array, +* generated IV would be placed in it by send_request(). +* Same generated IV for all addresses! +*/ unsigned int ivgen_dma_addr_len; /* Amount of 'ivgen_dma_addr' elements to be filled. */ unsigned int ivgen_size; /* The generated IV size required, 8/16 B allowed. */ struct completion seq_compl; /* request completion */ @@ -136,7 +139,8 @@ struct ssi_drvdata { u32 irq_mask; u32 fw_ver; /* Calibration time of start/stop - * monitor descriptors */ +* monitor descriptors +*/ u32 monitor_null_cycles; struct platform_device *plat_dev; ssi_sram_addr_t mlli_sram_addr; -- 2.13.0
[PATCH V2 18/27] Drivers: ccree: ssi_config.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_config.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ccree/ssi_config.h b/drivers/staging/ccree/ssi_config.h index 431b518d893a..9feb692fff0d 100644 --- a/drivers/staging/ccree/ssi_config.h +++ b/drivers/staging/ccree/ssi_config.h @@ -15,7 +15,7 @@ */ /* \file ssi_config.h - Definitions for ARM CryptoCell Linux Crypto Driver + * Definitions for ARM CryptoCell Linux Crypto Driver */ #ifndef __SSI_CONFIG_H__ @@ -49,7 +49,8 @@ #define SSI_CACHE_PARAMS (0x000) /* CC attached to NONE-ACP such as HPP/ACE/AMBA4. * The customer is responsible to enable/disable this feature -* according to his platform type. */ +* according to his platform type. +*/ #define DX_HAS_ACP 0 #else #define SSI_CACHE_PARAMS (0xEEE) -- 2.13.0
[PATCH V2 16/27] Drivers: ccree: ssi_fips.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_fips.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips.c b/drivers/staging/ccree/ssi_fips.c index 25ee23a1cecf..60a2452f7b0b 100644 --- a/drivers/staging/ccree/ssi_fips.c +++ b/drivers/staging/ccree/ssi_fips.c @@ -16,8 +16,8 @@ /** -This file defines the driver FIPS APIs * -***/ + * This file defines the driver FIPS APIs * + **/ #include #include "ssi_fips.h" @@ -27,9 +27,9 @@ extern int ssi_fips_ext_get_state(ssi_fips_state_t *p_state); extern int ssi_fips_ext_get_error(ssi_fips_error_t *p_err); /* -This function returns the REE FIPS state. -It should be called by kernel module. -*/ + * This function returns the REE FIPS state. + * It should be called by kernel module. + */ int ssi_fips_get_state(ssi_fips_state_t *p_state) { int rc = 0; @@ -46,9 +46,9 @@ int ssi_fips_get_state(ssi_fips_state_t *p_state) EXPORT_SYMBOL(ssi_fips_get_state); /* -This function returns the REE FIPS error. -It should be called by kernel module. -*/ + * This function returns the REE FIPS error. + * It should be called by kernel module. + */ int ssi_fips_get_error(ssi_fips_error_t *p_err) { int rc = 0; -- 2.13.0
[PATCH V2 16/27] Drivers: ccree: ssi_fips.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_fips.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips.c b/drivers/staging/ccree/ssi_fips.c index 25ee23a1cecf..60a2452f7b0b 100644 --- a/drivers/staging/ccree/ssi_fips.c +++ b/drivers/staging/ccree/ssi_fips.c @@ -16,8 +16,8 @@ /** -This file defines the driver FIPS APIs * -***/ + * This file defines the driver FIPS APIs * + **/ #include #include "ssi_fips.h" @@ -27,9 +27,9 @@ extern int ssi_fips_ext_get_state(ssi_fips_state_t *p_state); extern int ssi_fips_ext_get_error(ssi_fips_error_t *p_err); /* -This function returns the REE FIPS state. -It should be called by kernel module. -*/ + * This function returns the REE FIPS state. + * It should be called by kernel module. + */ int ssi_fips_get_state(ssi_fips_state_t *p_state) { int rc = 0; @@ -46,9 +46,9 @@ int ssi_fips_get_state(ssi_fips_state_t *p_state) EXPORT_SYMBOL(ssi_fips_get_state); /* -This function returns the REE FIPS error. -It should be called by kernel module. -*/ + * This function returns the REE FIPS error. + * It should be called by kernel module. + */ int ssi_fips_get_error(ssi_fips_error_t *p_err) { int rc = 0; -- 2.13.0
[PATCH V2 14/27] Drivers: ccree: ssi_fips_data.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_fips_data.h | 93 +-- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips_data.h b/drivers/staging/ccree/ssi_fips_data.h index a4b78f1b4d48..fa6bf41c27e5 100644 --- a/drivers/staging/ccree/ssi_fips_data.h +++ b/drivers/staging/ccree/ssi_fips_data.h @@ -15,53 +15,52 @@ */ /* -The test vectors were taken from: - -* AES -NIST Special Publication 800-38A 2001 Edition -Recommendation for Block Cipher Modes of Operation -http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf -Appendix F: Example Vectors for Modes of Operation of the AES - -* AES CTS -Advanced Encryption Standard (AES) Encryption for Kerberos 5 -February 2005 -https://tools.ietf.org/html/rfc3962#appendix-B -B. Sample Test Vectors - -* AES XTS -http://csrc.nist.gov/groups/STM/cavp/#08 -http://csrc.nist.gov/groups/STM/cavp/documents/aes/XTSTestVectors.zip - -* AES CMAC -http://csrc.nist.gov/groups/STM/cavp/index.html#07 -http://csrc.nist.gov/groups/STM/cavp/documents/mac/cmactestvectors.zip - -* AES-CCM -http://csrc.nist.gov/groups/STM/cavp/#07 -http://csrc.nist.gov/groups/STM/cavp/documents/mac/ccmtestvectors.zip - -* AES-GCM -http://csrc.nist.gov/groups/STM/cavp/documents/mac/gcmtestvectors.zip - -* Triple-DES -NIST Special Publication 800-67 January 2012 -Recommendation for the Triple Data Encryption Algorithm (TDEA) Block Cipher -http://csrc.nist.gov/publications/nistpubs/800-67-Rev1/SP-800-67-Rev1.pdf -APPENDIX B: EXAMPLE OF TDEA FORWARD AND INVERSE CIPHER OPERATIONS -and -http://csrc.nist.gov/groups/STM/cavp/#01 -http://csrc.nist.gov/groups/STM/cavp/documents/des/tdesmct_intermediate.zip - -* HASH -http://csrc.nist.gov/groups/STM/cavp/#03 -http://csrc.nist.gov/groups/STM/cavp/documents/shs/shabytetestvectors.zip - -* HMAC -http://csrc.nist.gov/groups/STM/cavp/#07 -http://csrc.nist.gov/groups/STM/cavp/documents/mac/hmactestvectors.zip - -*/ + * The test vectors were taken from: + * + * * AES + * NIST Special Publication 800-38A 2001 Edition + * Recommendation for Block Cipher Modes of Operation + * http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf + * Appendix F: Example Vectors for Modes of Operation of the AES + * + * * AES CTS + * Advanced Encryption Standard (AES) Encryption for Kerberos 5 + * February 2005 + * https://tools.ietf.org/html/rfc3962#appendix-B + * B. Sample Test Vectors + * + * * AES XTS + * http://csrc.nist.gov/groups/STM/cavp/#08 + * http://csrc.nist.gov/groups/STM/cavp/documents/aes/XTSTestVectors.zip + * + * * AES CMAC + * http://csrc.nist.gov/groups/STM/cavp/index.html#07 + * http://csrc.nist.gov/groups/STM/cavp/documents/mac/cmactestvectors.zip + * + * * AES-CCM + * http://csrc.nist.gov/groups/STM/cavp/#07 + * http://csrc.nist.gov/groups/STM/cavp/documents/mac/ccmtestvectors.zip + * + * * AES-GCM + * http://csrc.nist.gov/groups/STM/cavp/documents/mac/gcmtestvectors.zip + * + * * Triple-DES + * NIST Special Publication 800-67 January 2012 + * Recommendation for the Triple Data Encryption Algorithm (TDEA) Block Cipher + * http://csrc.nist.gov/publications/nistpubs/800-67-Rev1/SP-800-67-Rev1.pdf + * APPENDIX B: EXAMPLE OF TDEA FORWARD AND INVERSE CIPHER OPERATIONS + * and + * http://csrc.nist.gov/groups/STM/cavp/#01 + * http://csrc.nist.gov/groups/STM/cavp/documents/des/tdesmct_intermediate.zip + * + * * HASH + * http://csrc.nist.gov/groups/STM/cavp/#03 + * http://csrc.nist.gov/groups/STM/cavp/documents/shs/shabytetestvectors.zip + * + * * HMAC + * http://csrc.nist.gov/groups/STM/cavp/#07 + * http://csrc.nist.gov/groups/STM/cavp/documents/mac/hmactestvectors.zip + */ /* NIST AES */ #define AES_128_BIT_KEY_SIZE16 -- 2.13.0
[PATCH V2 14/27] Drivers: ccree: ssi_fips_data.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_fips_data.h | 93 +-- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips_data.h b/drivers/staging/ccree/ssi_fips_data.h index a4b78f1b4d48..fa6bf41c27e5 100644 --- a/drivers/staging/ccree/ssi_fips_data.h +++ b/drivers/staging/ccree/ssi_fips_data.h @@ -15,53 +15,52 @@ */ /* -The test vectors were taken from: - -* AES -NIST Special Publication 800-38A 2001 Edition -Recommendation for Block Cipher Modes of Operation -http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf -Appendix F: Example Vectors for Modes of Operation of the AES - -* AES CTS -Advanced Encryption Standard (AES) Encryption for Kerberos 5 -February 2005 -https://tools.ietf.org/html/rfc3962#appendix-B -B. Sample Test Vectors - -* AES XTS -http://csrc.nist.gov/groups/STM/cavp/#08 -http://csrc.nist.gov/groups/STM/cavp/documents/aes/XTSTestVectors.zip - -* AES CMAC -http://csrc.nist.gov/groups/STM/cavp/index.html#07 -http://csrc.nist.gov/groups/STM/cavp/documents/mac/cmactestvectors.zip - -* AES-CCM -http://csrc.nist.gov/groups/STM/cavp/#07 -http://csrc.nist.gov/groups/STM/cavp/documents/mac/ccmtestvectors.zip - -* AES-GCM -http://csrc.nist.gov/groups/STM/cavp/documents/mac/gcmtestvectors.zip - -* Triple-DES -NIST Special Publication 800-67 January 2012 -Recommendation for the Triple Data Encryption Algorithm (TDEA) Block Cipher -http://csrc.nist.gov/publications/nistpubs/800-67-Rev1/SP-800-67-Rev1.pdf -APPENDIX B: EXAMPLE OF TDEA FORWARD AND INVERSE CIPHER OPERATIONS -and -http://csrc.nist.gov/groups/STM/cavp/#01 -http://csrc.nist.gov/groups/STM/cavp/documents/des/tdesmct_intermediate.zip - -* HASH -http://csrc.nist.gov/groups/STM/cavp/#03 -http://csrc.nist.gov/groups/STM/cavp/documents/shs/shabytetestvectors.zip - -* HMAC -http://csrc.nist.gov/groups/STM/cavp/#07 -http://csrc.nist.gov/groups/STM/cavp/documents/mac/hmactestvectors.zip - -*/ + * The test vectors were taken from: + * + * * AES + * NIST Special Publication 800-38A 2001 Edition + * Recommendation for Block Cipher Modes of Operation + * http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf + * Appendix F: Example Vectors for Modes of Operation of the AES + * + * * AES CTS + * Advanced Encryption Standard (AES) Encryption for Kerberos 5 + * February 2005 + * https://tools.ietf.org/html/rfc3962#appendix-B + * B. Sample Test Vectors + * + * * AES XTS + * http://csrc.nist.gov/groups/STM/cavp/#08 + * http://csrc.nist.gov/groups/STM/cavp/documents/aes/XTSTestVectors.zip + * + * * AES CMAC + * http://csrc.nist.gov/groups/STM/cavp/index.html#07 + * http://csrc.nist.gov/groups/STM/cavp/documents/mac/cmactestvectors.zip + * + * * AES-CCM + * http://csrc.nist.gov/groups/STM/cavp/#07 + * http://csrc.nist.gov/groups/STM/cavp/documents/mac/ccmtestvectors.zip + * + * * AES-GCM + * http://csrc.nist.gov/groups/STM/cavp/documents/mac/gcmtestvectors.zip + * + * * Triple-DES + * NIST Special Publication 800-67 January 2012 + * Recommendation for the Triple Data Encryption Algorithm (TDEA) Block Cipher + * http://csrc.nist.gov/publications/nistpubs/800-67-Rev1/SP-800-67-Rev1.pdf + * APPENDIX B: EXAMPLE OF TDEA FORWARD AND INVERSE CIPHER OPERATIONS + * and + * http://csrc.nist.gov/groups/STM/cavp/#01 + * http://csrc.nist.gov/groups/STM/cavp/documents/des/tdesmct_intermediate.zip + * + * * HASH + * http://csrc.nist.gov/groups/STM/cavp/#03 + * http://csrc.nist.gov/groups/STM/cavp/documents/shs/shabytetestvectors.zip + * + * * HMAC + * http://csrc.nist.gov/groups/STM/cavp/#07 + * http://csrc.nist.gov/groups/STM/cavp/documents/mac/hmactestvectors.zip + */ /* NIST AES */ #define AES_128_BIT_KEY_SIZE16 -- 2.13.0
[PATCH V2 15/27] Drivers: ccree: ssi_fips.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_fips.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips.h b/drivers/staging/ccree/ssi_fips.h index 607c64b8c458..e108d89ef98c 100644 --- a/drivers/staging/ccree/ssi_fips.h +++ b/drivers/staging/ccree/ssi_fips.h @@ -18,9 +18,9 @@ #define __SSI_FIPS_H__ /*! -@file -@brief This file contains FIPS related defintions and APIs. -*/ + * @file + * @brief This file contains FIPS related defintions and APIs. + */ typedef enum ssi_fips_state { CC_FIPS_STATE_NOT_SUPPORTED = 0, -- 2.13.0
[PATCH V2 15/27] Drivers: ccree: ssi_fips.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_fips.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips.h b/drivers/staging/ccree/ssi_fips.h index 607c64b8c458..e108d89ef98c 100644 --- a/drivers/staging/ccree/ssi_fips.h +++ b/drivers/staging/ccree/ssi_fips.h @@ -18,9 +18,9 @@ #define __SSI_FIPS_H__ /*! -@file -@brief This file contains FIPS related defintions and APIs. -*/ + * @file + * @brief This file contains FIPS related defintions and APIs. + */ typedef enum ssi_fips_state { CC_FIPS_STATE_NOT_SUPPORTED = 0, -- 2.13.0
[PATCH V2 13/27] Drivers: ccree: ssi_fips_ext.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_fips_ext.c | 46 ++-- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips_ext.c b/drivers/staging/ccree/ssi_fips_ext.c index 291a880f567c..0f53a4bc43de 100644 --- a/drivers/staging/ccree/ssi_fips_ext.c +++ b/drivers/staging/ccree/ssi_fips_ext.c @@ -15,9 +15,9 @@ */ /** -This file defines the driver FIPS functions that should be -implemented by the driver user. Current implementation is sample code only. -***/ + * This file defines the driver FIPS functions that should be + * implemented by the driver user. Current implementation is sample code only. + ***/ #include #include "ssi_fips_local.h" @@ -32,11 +32,11 @@ static ssi_fips_state_t fips_state = CC_FIPS_STATE_NOT_SUPPORTED; static ssi_fips_error_t fips_error = CC_REE_FIPS_ERROR_OK; /* -This function returns the FIPS REE state. -The function should be implemented by the driver user, depends on where . -the state value is stored. -The reference code uses global variable. -*/ + * This function returns the FIPS REE state. + * The function should be implemented by the driver user, depends on where + * the state value is stored. + * The reference code uses global variable. + */ int ssi_fips_ext_get_state(ssi_fips_state_t *p_state) { int rc = 0; @@ -51,11 +51,11 @@ int ssi_fips_ext_get_state(ssi_fips_state_t *p_state) } /* -This function returns the FIPS REE error. -The function should be implemented by the driver user, depends on where . -the error value is stored. -The reference code uses global variable. -*/ + * This function returns the FIPS REE error. + * The function should be implemented by the driver user, depends on where + * the error value is stored. + * The reference code uses global variable. + */ int ssi_fips_ext_get_error(ssi_fips_error_t *p_err) { int rc = 0; @@ -70,11 +70,11 @@ int ssi_fips_ext_get_error(ssi_fips_error_t *p_err) } /* -This function sets the FIPS REE state. -The function should be implemented by the driver user, depends on where . -the state value is stored. -The reference code uses global variable. -*/ + * This function sets the FIPS REE state. + * The function should be implemented by the driver user, depends on where + * the state value is stored. + * The reference code uses global variable. + */ int ssi_fips_ext_set_state(ssi_fips_state_t state) { fips_state = state; @@ -82,11 +82,11 @@ int ssi_fips_ext_set_state(ssi_fips_state_t state) } /* -This function sets the FIPS REE error. -The function should be implemented by the driver user, depends on where . -the error value is stored. -The reference code uses global variable. -*/ + * This function sets the FIPS REE error. + * The function should be implemented by the driver user, depends on where + * the error value is stored. + * The reference code uses global variable. + */ int ssi_fips_ext_set_error(ssi_fips_error_t err) { fips_error = err; -- 2.13.0
[PATCH V2 13/27] Drivers: ccree: ssi_fips_ext.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_fips_ext.c | 46 ++-- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips_ext.c b/drivers/staging/ccree/ssi_fips_ext.c index 291a880f567c..0f53a4bc43de 100644 --- a/drivers/staging/ccree/ssi_fips_ext.c +++ b/drivers/staging/ccree/ssi_fips_ext.c @@ -15,9 +15,9 @@ */ /** -This file defines the driver FIPS functions that should be -implemented by the driver user. Current implementation is sample code only. -***/ + * This file defines the driver FIPS functions that should be + * implemented by the driver user. Current implementation is sample code only. + ***/ #include #include "ssi_fips_local.h" @@ -32,11 +32,11 @@ static ssi_fips_state_t fips_state = CC_FIPS_STATE_NOT_SUPPORTED; static ssi_fips_error_t fips_error = CC_REE_FIPS_ERROR_OK; /* -This function returns the FIPS REE state. -The function should be implemented by the driver user, depends on where . -the state value is stored. -The reference code uses global variable. -*/ + * This function returns the FIPS REE state. + * The function should be implemented by the driver user, depends on where + * the state value is stored. + * The reference code uses global variable. + */ int ssi_fips_ext_get_state(ssi_fips_state_t *p_state) { int rc = 0; @@ -51,11 +51,11 @@ int ssi_fips_ext_get_state(ssi_fips_state_t *p_state) } /* -This function returns the FIPS REE error. -The function should be implemented by the driver user, depends on where . -the error value is stored. -The reference code uses global variable. -*/ + * This function returns the FIPS REE error. + * The function should be implemented by the driver user, depends on where + * the error value is stored. + * The reference code uses global variable. + */ int ssi_fips_ext_get_error(ssi_fips_error_t *p_err) { int rc = 0; @@ -70,11 +70,11 @@ int ssi_fips_ext_get_error(ssi_fips_error_t *p_err) } /* -This function sets the FIPS REE state. -The function should be implemented by the driver user, depends on where . -the state value is stored. -The reference code uses global variable. -*/ + * This function sets the FIPS REE state. + * The function should be implemented by the driver user, depends on where + * the state value is stored. + * The reference code uses global variable. + */ int ssi_fips_ext_set_state(ssi_fips_state_t state) { fips_state = state; @@ -82,11 +82,11 @@ int ssi_fips_ext_set_state(ssi_fips_state_t state) } /* -This function sets the FIPS REE error. -The function should be implemented by the driver user, depends on where . -the error value is stored. -The reference code uses global variable. -*/ + * This function sets the FIPS REE error. + * The function should be implemented by the driver user, depends on where + * the error value is stored. + * The reference code uses global variable. + */ int ssi_fips_ext_set_error(ssi_fips_error_t err) { fips_error = err; -- 2.13.0
[PATCH V2 12/27] Drivers: ccree: ssi_fips_ll.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_fips_ll.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips_ll.c b/drivers/staging/ccree/ssi_fips_ll.c index 7c7c922f0788..ef0a9a580560 100644 --- a/drivers/staging/ccree/ssi_fips_ll.c +++ b/drivers/staging/ccree/ssi_fips_ll.c @@ -15,9 +15,9 @@ */ /** -This file defines the driver FIPS Low Level implmentaion functions, -that executes the KAT. -***/ + * This file defines the driver FIPS Low Level implmentaion functions, + * that executes the KAT. + ***/ #include #include "ssi_driver.h" @@ -816,7 +816,8 @@ ssi_hmac_fips_run_test(struct ssi_drvdata *drvdata, dma_addr_t digest_bytes_len_dma_addr) { /* The implemented flow is not the same as the one implemented in ssi_hash.c (setkey + digest flows). - In this flow, there is no need to store and reload some of the intermidiate results. */ +* In this flow, there is no need to store and reload some of the intermidiate results. +*/ /* max number of descriptors used for the flow */ #define FIPS_HMAC_MAX_SEQ_LEN 12 @@ -948,9 +949,9 @@ ssi_hmac_fips_run_test(struct ssi_drvdata *drvdata, idx++; /* at this point: - tmp_digest = H(o_key_pad) - k0 = H(i_key_pad || m) - */ +* tmp_digest = H(o_key_pad) +* k0 = H(i_key_pad || m) +*/ /* Loading hash opad xor key state */ HW_DESC_INIT([idx]); @@ -1413,8 +1414,10 @@ ssi_gcm_fips_run_test(struct ssi_drvdata *drvdata, idx++; /* Configure Hash Engine to work with GHASH. - Since it was not possible to extend HASH submodes to add GHASH, - The following command is necessary in order to select GHASH (according to HW designers)*/ +* Since it was not possible to extend HASH submodes to add GHASH, +* The following command is necessary in order to +* select GHASH (according to HW designers) +*/ HW_DESC_INIT([idx]); HW_DESC_SET_DIN_NO_DMA([idx], 0, 0xf0); HW_DESC_SET_DOUT_NO_DMA([idx], 0, 0, 1); -- 2.13.0
[PATCH V2 11/27] Drivers: ccree: ssi_fips_local.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_fips_local.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips_local.c b/drivers/staging/ccree/ssi_fips_local.c index 316507d88b4e..8076c771f750 100644 --- a/drivers/staging/ccree/ssi_fips_local.c +++ b/drivers/staging/ccree/ssi_fips_local.c @@ -15,8 +15,8 @@ */ /** -This file defines the driver FIPS internal function, used by the driver itself. -***/ + * This file defines the driver FIPS internal function, used by the driver itself. + ***/ #include #include #include @@ -80,10 +80,10 @@ static enum ssi_fips_error ssi_fips_get_tee_error(struct ssi_drvdata *drvdata) /* - This function should push the FIPS REE library status towards the TEE library. - By writing the error state to HOST_GPR0 register. The function is called from . - driver entry point so no need to protect by mutex. -*/ + * This function should push the FIPS REE library status towards the TEE library. + * By writing the error state to HOST_GPR0 register. The function is called from + * driver entry point so no need to protect by mutex. + */ static void ssi_fips_update_tee_upon_ree_status(struct ssi_drvdata *drvdata, ssi_fips_error_t err) { void __iomem *cc_base = drvdata->cc_base; @@ -232,7 +232,8 @@ ssi_fips_error_t cc_fips_run_power_up_tests(struct ssi_drvdata *drvdata) /* The function checks if FIPS supported and FIPS error exists.* -* It should be used in every driver API.*/ + * It should be used in every driver API. + */ int ssi_fips_check_fips_error(void) { ssi_fips_state_t fips_state; @@ -250,14 +251,16 @@ int ssi_fips_check_fips_error(void) /* The function sets the REE FIPS state.* -* It should be used while driver is being loaded .*/ + * It should be used while driver is being loaded. + */ int ssi_fips_set_state(ssi_fips_state_t state) { return ssi_fips_ext_set_state(state); } /* The function sets the REE FIPS error, and pushes the error to TEE library. * -* It should be used when any of the KAT tests fails .*/ + * It should be used when any of the KAT tests fails. + */ int ssi_fips_set_error(struct ssi_drvdata *p_drvdata, ssi_fips_error_t err) { int rc = 0; -- 2.13.0
[PATCH V2 12/27] Drivers: ccree: ssi_fips_ll.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_fips_ll.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips_ll.c b/drivers/staging/ccree/ssi_fips_ll.c index 7c7c922f0788..ef0a9a580560 100644 --- a/drivers/staging/ccree/ssi_fips_ll.c +++ b/drivers/staging/ccree/ssi_fips_ll.c @@ -15,9 +15,9 @@ */ /** -This file defines the driver FIPS Low Level implmentaion functions, -that executes the KAT. -***/ + * This file defines the driver FIPS Low Level implmentaion functions, + * that executes the KAT. + ***/ #include #include "ssi_driver.h" @@ -816,7 +816,8 @@ ssi_hmac_fips_run_test(struct ssi_drvdata *drvdata, dma_addr_t digest_bytes_len_dma_addr) { /* The implemented flow is not the same as the one implemented in ssi_hash.c (setkey + digest flows). - In this flow, there is no need to store and reload some of the intermidiate results. */ +* In this flow, there is no need to store and reload some of the intermidiate results. +*/ /* max number of descriptors used for the flow */ #define FIPS_HMAC_MAX_SEQ_LEN 12 @@ -948,9 +949,9 @@ ssi_hmac_fips_run_test(struct ssi_drvdata *drvdata, idx++; /* at this point: - tmp_digest = H(o_key_pad) - k0 = H(i_key_pad || m) - */ +* tmp_digest = H(o_key_pad) +* k0 = H(i_key_pad || m) +*/ /* Loading hash opad xor key state */ HW_DESC_INIT([idx]); @@ -1413,8 +1414,10 @@ ssi_gcm_fips_run_test(struct ssi_drvdata *drvdata, idx++; /* Configure Hash Engine to work with GHASH. - Since it was not possible to extend HASH submodes to add GHASH, - The following command is necessary in order to select GHASH (according to HW designers)*/ +* Since it was not possible to extend HASH submodes to add GHASH, +* The following command is necessary in order to +* select GHASH (according to HW designers) +*/ HW_DESC_INIT([idx]); HW_DESC_SET_DIN_NO_DMA([idx], 0, 0xf0); HW_DESC_SET_DOUT_NO_DMA([idx], 0, 0, 1); -- 2.13.0
[PATCH V2 11/27] Drivers: ccree: ssi_fips_local.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_fips_local.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ccree/ssi_fips_local.c b/drivers/staging/ccree/ssi_fips_local.c index 316507d88b4e..8076c771f750 100644 --- a/drivers/staging/ccree/ssi_fips_local.c +++ b/drivers/staging/ccree/ssi_fips_local.c @@ -15,8 +15,8 @@ */ /** -This file defines the driver FIPS internal function, used by the driver itself. -***/ + * This file defines the driver FIPS internal function, used by the driver itself. + ***/ #include #include #include @@ -80,10 +80,10 @@ static enum ssi_fips_error ssi_fips_get_tee_error(struct ssi_drvdata *drvdata) /* - This function should push the FIPS REE library status towards the TEE library. - By writing the error state to HOST_GPR0 register. The function is called from . - driver entry point so no need to protect by mutex. -*/ + * This function should push the FIPS REE library status towards the TEE library. + * By writing the error state to HOST_GPR0 register. The function is called from + * driver entry point so no need to protect by mutex. + */ static void ssi_fips_update_tee_upon_ree_status(struct ssi_drvdata *drvdata, ssi_fips_error_t err) { void __iomem *cc_base = drvdata->cc_base; @@ -232,7 +232,8 @@ ssi_fips_error_t cc_fips_run_power_up_tests(struct ssi_drvdata *drvdata) /* The function checks if FIPS supported and FIPS error exists.* -* It should be used in every driver API.*/ + * It should be used in every driver API. + */ int ssi_fips_check_fips_error(void) { ssi_fips_state_t fips_state; @@ -250,14 +251,16 @@ int ssi_fips_check_fips_error(void) /* The function sets the REE FIPS state.* -* It should be used while driver is being loaded .*/ + * It should be used while driver is being loaded. + */ int ssi_fips_set_state(ssi_fips_state_t state) { return ssi_fips_ext_set_state(state); } /* The function sets the REE FIPS error, and pushes the error to TEE library. * -* It should be used when any of the KAT tests fails .*/ + * It should be used when any of the KAT tests fails. + */ int ssi_fips_set_error(struct ssi_drvdata *p_drvdata, ssi_fips_error_t err) { int rc = 0; -- 2.13.0
[PATCH V2 10/27] Drivers: ccree: ssi_hash.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_hash.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index 8585f73161b3..da5915e4ce48 100644 --- a/drivers/staging/ccree/ssi_hash.c +++ b/drivers/staging/ccree/ssi_hash.c @@ -97,7 +97,8 @@ struct hash_key_req_ctx { struct ssi_hash_ctx { struct ssi_drvdata *drvdata; /* holds the origin digest; the digest after "setkey" if HMAC,* - the initial digest if HASH. */ +* the initial digest if HASH. +*/ u8 digest_buff[SSI_MAX_HASH_DIGEST_SIZE] cacheline_aligned; u8 opad_tmp_keys_buff[SSI_MAX_HASH_OPAD_TMP_KEYS_SIZE] cacheline_aligned; dma_addr_t opad_tmp_keys_dma_addr cacheline_aligned; @@ -250,7 +251,8 @@ static int ssi_hash_map_request(struct device *dev, } } else { /*hash*/ /* Copy the initial digests if hash flow. The SRAM contains the - initial digests in the expected order for all SHA* */ +* initial digests in the expected order for all SHA* +*/ HW_DESC_INIT(); HW_DESC_SET_DIN_SRAM(, larval_digest_addr, ctx->inter_digestsize); HW_DESC_SET_DOUT_DLLI(, state->digest_buff_dma_addr, ctx->inter_digestsize, NS_BIT, 0); @@ -1027,7 +1029,8 @@ static int ssi_hash_setkey(void *hash, ctx->drvdata, ctx->hash_mode); /* The keylen value distinguishes HASH in case keylen is ZERO bytes, - any NON-ZERO value utilizes HMAC flow */ +* any NON-ZERO value utilizes HMAC flow +*/ ctx->key_params.keylen = keylen; ctx->key_params.key_dma_addr = 0; ctx->is_hmac = true; -- 2.13.0
[PATCH V2 10/27] Drivers: ccree: ssi_hash.c - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson --- drivers/staging/ccree/ssi_hash.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index 8585f73161b3..da5915e4ce48 100644 --- a/drivers/staging/ccree/ssi_hash.c +++ b/drivers/staging/ccree/ssi_hash.c @@ -97,7 +97,8 @@ struct hash_key_req_ctx { struct ssi_hash_ctx { struct ssi_drvdata *drvdata; /* holds the origin digest; the digest after "setkey" if HMAC,* - the initial digest if HASH. */ +* the initial digest if HASH. +*/ u8 digest_buff[SSI_MAX_HASH_DIGEST_SIZE] cacheline_aligned; u8 opad_tmp_keys_buff[SSI_MAX_HASH_OPAD_TMP_KEYS_SIZE] cacheline_aligned; dma_addr_t opad_tmp_keys_dma_addr cacheline_aligned; @@ -250,7 +251,8 @@ static int ssi_hash_map_request(struct device *dev, } } else { /*hash*/ /* Copy the initial digests if hash flow. The SRAM contains the - initial digests in the expected order for all SHA* */ +* initial digests in the expected order for all SHA* +*/ HW_DESC_INIT(); HW_DESC_SET_DIN_SRAM(, larval_digest_addr, ctx->inter_digestsize); HW_DESC_SET_DOUT_DLLI(, state->digest_buff_dma_addr, ctx->inter_digestsize, NS_BIT, 0); @@ -1027,7 +1029,8 @@ static int ssi_hash_setkey(void *hash, ctx->drvdata, ctx->hash_mode); /* The keylen value distinguishes HASH in case keylen is ZERO bytes, - any NON-ZERO value utilizes HMAC flow */ +* any NON-ZERO value utilizes HMAC flow +*/ ctx->key_params.keylen = keylen; ctx->key_params.key_dma_addr = 0; ctx->is_hmac = true; -- 2.13.0
[PATCH V2 07/27] Drivers: ccree: ssi_pm.h - align block comments
Fixed block comment alignment, Style fix only Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> --- drivers/staging/ccree/ssi_pm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_pm.h b/drivers/staging/ccree/ssi_pm.h index f1fe1777c04a..8b0d8be95199 100644 --- a/drivers/staging/ccree/ssi_pm.h +++ b/drivers/staging/ccree/ssi_pm.h @@ -15,7 +15,7 @@ */ /* \file ssi_pm.h -*/ + */ #ifndef __SSI_POWER_MGR_H__ #define __SSI_POWER_MGR_H__ -- 2.13.0