Staging: lustre: lnet: klnds: o2iblnd: Remove intialization of static to 0
PATCH 1/2 Staging: lustre: lnet: klnds: o2iblnd: Remove intialization of static to 0
ERROR: do not initialise statics to 0 or NULL
checkpatch.pl error in o2iblnd_modparams.c
Signed-off-by Melike Yurtoglu <[email protected]>
--- .../lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c +8 -8
@@ -44,7 +44,7 @@ static int service = 987;module_param (service, int,0444 );MODULE_PARM_DESC (service,"service number (within RDMA_PS_TCP)" ); -static int cksum =0 ; +static int cksum;module_param (cksum, int,0644 );MODULE_PARM_DESC (cksum,"set non-zero to enable message (not RDMA) checksums" );
@@ -72,11 +72,11 @@ static int peer_credits = 8;module_param (peer_credits, int,0444 );MODULE_PARM_DESC (peer_credits,"# concurrent sends to 1 peer" ); -static int peer_credits_hiw =0 ; +static int peer_credits_hiw;module_param (peer_credits_hiw, int,0444 );MODULE_PARM_DESC (peer_credits_hiw,"when eagerly to return credits" ); -static int peer_buffer_credits =0 ; +static int peer_buffer_credits;module_param (peer_buffer_credits, int,0444 );MODULE_PARM_DESC (peer_buffer_credits,"# per-peer router buffer credits" );
@@ -100,15 +100,15 @@ static int keepalive = 100;module_param (keepalive, int,0644 );MODULE_PARM_DESC (keepalive,"Idle time in seconds before sending a keepalive" ); -static int ib_mtu =0 ; +static int ib_mtu;module_param (ib_mtu, int,0444 );MODULE_PARM_DESC (ib_mtu,"IB MTU 256/512/1024/2048/4096" ); -static int concurrent_sends =0 ; +static int concurrent_sends;module_param (concurrent_sends, int,0444 );MODULE_PARM_DESC (concurrent_sends,"send work-queue sizing" ); -static int map_on_demand =0 ; +static int map_on_demand;module_param (map_on_demand, int,0444 );MODULE_PARM_DESC (map_on_demand,"map on demand" );
@@ -136,12 +136,12 @@ MODULE_PARM_DESC(pmr_pool_size, "size of MR cache pmr pool on each CPT");* 1: enable failover if necessary * 2: force to failover (for debug) */ -static int dev_failover =0 ; +static int dev_failover;module_param (dev_failover, int,0444 );MODULE_PARM_DESC (dev_failover,"HCA failover for bonding (0 off, 1 on, other values reserved)" ); -static int require_privileged_port =0 ; +static int require_privileged_port;module_param (require_privileged_port, int,0644 );MODULE_PARM_DESC (require_privileged_port,"require privileged port when accepting connection" );
Signature · 1 line
1.8.3.2
Quoted 2 lines · Melike Yurtoglu
ERROR: do not initialise statics to 0 or NULL
checkpatch.pl error ino2iblnd_modparams.c
It would be better to say what you do, and why. Why is it unnecessary to initialize a static variable to 0?
julia
Quoted 77 lines
Signed-off-by Melike Yurtoglu <[email protected]>--- .../lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c +8
-8@@ -44,7 +44,7 @@ static int service = 987;module_param (service, int,0444 );MODULE_PARM_DESC (service,"service number (within RDMA_PS_TCP)" ); -static int cksum =0 ; +static int cksum;module_param (cksum, int,0644 );MODULE_PARM_DESC (cksum,"set non-zero to enable message (not RDMA) checksums" );@@ -72,11 +72,11 @@ static int peer_credits = 8;module_param (peer_credits, int,0444 );MODULE_PARM_DESC (peer_credits,"# concurrent sends to 1 peer" ); -static int peer_credits_hiw =0 ; +static int peer_credits_hiw;module_param (peer_credits_hiw, int,0444 );MODULE_PARM_DESC (peer_credits_hiw,"when eagerly to return credits" ); -static int peer_buffer_credits =0 ; +static int peer_buffer_credits;module_param (peer_buffer_credits, int,0444 );MODULE_PARM_DESC (peer_buffer_credits,"# per-peer router buffer credits" );@@ -100,15 +100,15 @@ static int keepalive = 100;module_param (keepalive, int,0644 );MODULE_PARM_DESC (keepalive,"Idle time in seconds before sending a keepalive" ); -static int ib_mtu =0 ; +static int ib_mtu;module_param (ib_mtu, int,0444 );MODULE_PARM_DESC (ib_mtu,"IB MTU 256/512/1024/2048/4096" ); -static int concurrent_sends =0 ; +static int concurrent_sends;module_param (concurrent_sends, int,0444 );MODULE_PARM_DESC (concurrent_sends,"send work-queue sizing" ); -static int map_on_demand =0 ; +static int map_on_demand;module_param (map_on_demand, int,0444 );MODULE_PARM_DESC (map_on_demand,"map on demand" );@@ -136,12 +136,12 @@ MODULE_PARM_DESC(pmr_pool_size, "size of MR cache pmr pool on each CPT");* 1: enable failover if necessary * 2: force to failover (for debug) */ -static int dev_failover =0 ; +static int dev_failover;module_param (dev_failover, int,0444 );MODULE_PARM_DESC (dev_failover,"HCA failover for bonding (0 off, 1 on, other values reserved)" ); -static int require_privileged_port =0 ; +static int require_privileged_port;module_param (require_privileged_port, int,0644 );MODULE_PARM_DESC (require_privileged_port,"require privileged port when accepting connection" );Signature · 8 lines
1.8.3.2 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1424383611-27755-1-git-send-email-aysemelikeyurtoglu%40gmail.com. For more options, visit https://groups.google.com/d/optout.