Skip to content

Commit 75c49d4

Browse files
gdonaldgregkh
authored andcommitted
drivers: staging: lustre: Fix "open brace '{' following struct go on the same line" errors
Fix checkpatch.pl "open brace '{' following struct go on the same line" errors Signed-off-by: Greg Donald <gdonald@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2b06b70 commit 75c49d4

3 files changed

Lines changed: 31 additions & 62 deletions

File tree

‎drivers/staging/lustre/include/linux/libcfs/libcfs_private.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,7 @@ int cfs_match_nid(lnet_nid_t nid, struct list_head *list);
453453
* Support for temporary event tracing with minimal Heisenberg effect.
454454
* -------------------------------------------------------------------- */
455455

456-
struct libcfs_device_userstate
457-
{
456+
struct libcfs_device_userstate {
458457
int ldu_memhog_pages;
459458
struct page *ldu_memhog_root_page;
460459
};

‎drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h‎

Lines changed: 22 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@
7979
#define IBLND_N_SCHED 2
8080
#define IBLND_N_SCHED_HIGH 4
8181

82-
typedef struct
83-
{
82+
typedef struct {
8483
int *kib_dev_failover; /* HCA failover */
8584
unsigned int *kib_service; /* IB service number */
8685
int *kib_min_reconnect_interval; /* first failed connection retry... */
@@ -186,8 +185,7 @@ struct kib_hca_dev;
186185
#define KIB_IFNAME_SIZE 256
187186
#endif
188187

189-
typedef struct
190-
{
188+
typedef struct {
191189
struct list_head ibd_list; /* chain on kib_devs */
192190
struct list_head ibd_fail_list; /* chain on kib_failed_devs */
193191
__u32 ibd_ifip; /* IPoIB interface IP */
@@ -203,8 +201,7 @@ typedef struct
203201
struct kib_hca_dev *ibd_hdev;
204202
} kib_dev_t;
205203

206-
typedef struct kib_hca_dev
207-
{
204+
typedef struct kib_hca_dev {
208205
struct rdma_cm_id *ibh_cmid; /* listener cmid */
209206
struct ib_device *ibh_ibdev; /* IB device */
210207
int ibh_page_shift; /* page shift of current HCA */
@@ -224,8 +221,7 @@ typedef struct kib_hca_dev
224221
/** # of seconds to retry if allocation failed */
225222
#define IBLND_POOL_RETRY 1
226223

227-
typedef struct
228-
{
224+
typedef struct {
229225
int ibp_npages; /* # pages */
230226
struct page *ibp_pages[0]; /* page array */
231227
} kib_pages_t;
@@ -254,8 +250,7 @@ struct kib_net;
254250

255251
#define IBLND_POOL_NAME_LEN 32
256252

257-
typedef struct kib_poolset
258-
{
253+
typedef struct kib_poolset {
259254
spinlock_t ps_lock; /* serialize */
260255
struct kib_net *ps_net; /* network it belongs to */
261256
char ps_name[IBLND_POOL_NAME_LEN]; /* pool set name */
@@ -272,8 +267,7 @@ typedef struct kib_poolset
272267
kib_ps_node_fini_t ps_node_fini; /* finalize node */
273268
} kib_poolset_t;
274269

275-
typedef struct kib_pool
276-
{
270+
typedef struct kib_pool {
277271
struct list_head po_list; /* chain on pool list */
278272
struct list_head po_free_list; /* pre-allocated node */
279273
kib_poolset_t *po_owner; /* pool_set of this pool */
@@ -304,8 +298,7 @@ typedef struct kib_pmr_pool {
304298
kib_pool_t ppo_pool; /* pool */
305299
} kib_pmr_pool_t;
306300

307-
typedef struct
308-
{
301+
typedef struct {
309302
spinlock_t fps_lock; /* serialize */
310303
struct kib_net *fps_net; /* IB network */
311304
struct list_head fps_pool_list; /* FMR pool list */
@@ -320,8 +313,7 @@ typedef struct
320313
unsigned long fps_next_retry;
321314
} kib_fmr_poolset_t;
322315

323-
typedef struct
324-
{
316+
typedef struct {
325317
struct list_head fpo_list; /* chain on pool list */
326318
struct kib_hca_dev *fpo_hdev; /* device for this pool */
327319
kib_fmr_poolset_t *fpo_owner; /* owner of this pool */
@@ -336,8 +328,7 @@ typedef struct {
336328
kib_fmr_pool_t *fmr_pool; /* pool of FMR */
337329
} kib_fmr_t;
338330

339-
typedef struct kib_net
340-
{
331+
typedef struct kib_net {
341332
struct list_head ibn_list; /* chain on kib_dev_t::ibd_nets */
342333
__u64 ibn_incarnation; /* my epoch */
343334
int ibn_init; /* initialisation state */
@@ -372,8 +363,7 @@ struct kib_sched_info {
372363
int ibs_cpt; /* CPT id */
373364
};
374365

375-
typedef struct
376-
{
366+
typedef struct {
377367
int kib_init; /* initialisation state */
378368
int kib_shutdown; /* shut down? */
379369
struct list_head kib_devs; /* IB devices extant */
@@ -411,60 +401,51 @@ typedef struct
411401
* These are sent in sender's byte order (i.e. receiver flips).
412402
*/
413403

414-
typedef struct kib_connparams
415-
{
404+
typedef struct kib_connparams {
416405
__u16 ibcp_queue_depth;
417406
__u16 ibcp_max_frags;
418407
__u32 ibcp_max_msg_size;
419408
} WIRE_ATTR kib_connparams_t;
420409

421-
typedef struct
422-
{
410+
typedef struct {
423411
lnet_hdr_t ibim_hdr; /* portals header */
424412
char ibim_payload[0]; /* piggy-backed payload */
425413
} WIRE_ATTR kib_immediate_msg_t;
426414

427-
typedef struct
428-
{
415+
typedef struct {
429416
__u32 rf_nob; /* # bytes this frag */
430417
__u64 rf_addr; /* CAVEAT EMPTOR: misaligned!! */
431418
} WIRE_ATTR kib_rdma_frag_t;
432419

433-
typedef struct
434-
{
420+
typedef struct {
435421
__u32 rd_key; /* local/remote key */
436422
__u32 rd_nfrags; /* # fragments */
437423
kib_rdma_frag_t rd_frags[0]; /* buffer frags */
438424
} WIRE_ATTR kib_rdma_desc_t;
439425

440-
typedef struct
441-
{
426+
typedef struct {
442427
lnet_hdr_t ibprm_hdr; /* portals header */
443428
__u64 ibprm_cookie; /* opaque completion cookie */
444429
} WIRE_ATTR kib_putreq_msg_t;
445430

446-
typedef struct
447-
{
431+
typedef struct {
448432
__u64 ibpam_src_cookie; /* reflected completion cookie */
449433
__u64 ibpam_dst_cookie; /* opaque completion cookie */
450434
kib_rdma_desc_t ibpam_rd; /* sender's sink buffer */
451435
} WIRE_ATTR kib_putack_msg_t;
452436

453-
typedef struct
454-
{
437+
typedef struct {
455438
lnet_hdr_t ibgm_hdr; /* portals header */
456439
__u64 ibgm_cookie; /* opaque completion cookie */
457440
kib_rdma_desc_t ibgm_rd; /* rdma descriptor */
458441
} WIRE_ATTR kib_get_msg_t;
459442

460-
typedef struct
461-
{
443+
typedef struct {
462444
__u64 ibcm_cookie; /* opaque completion cookie */
463445
__s32 ibcm_status; /* < 0 failure: >= 0 length */
464446
} WIRE_ATTR kib_completion_msg_t;
465447

466-
typedef struct
467-
{
448+
typedef struct {
468449
/* First 2 fields fixed FOR ALL TIME */
469450
__u32 ibm_magic; /* I'm an ibnal message */
470451
__u16 ibm_version; /* this is my version number */
@@ -574,14 +555,12 @@ typedef struct kib_tx /* transmit message */
574555
int tx_dmadir; /* dma direction */
575556
} kib_tx_t;
576557

577-
typedef struct kib_connvars
578-
{
558+
typedef struct kib_connvars {
579559
/* connection-in-progress variables */
580560
kib_msg_t cv_msg;
581561
} kib_connvars_t;
582562

583-
typedef struct kib_conn
584-
{
563+
typedef struct kib_conn {
585564
struct kib_sched_info *ibc_sched; /* scheduler information */
586565
struct kib_peer *ibc_peer; /* owning peer */
587566
kib_hca_dev_t *ibc_hdev; /* HCA bound on */
@@ -629,8 +608,7 @@ typedef struct kib_conn
629608
#define IBLND_CONN_CLOSING 4 /* being closed */
630609
#define IBLND_CONN_DISCONNECTED 5 /* disconnected */
631610

632-
typedef struct kib_peer
633-
{
611+
typedef struct kib_peer {
634612
struct list_head ibp_list; /* stash on global peer list */
635613
lnet_nid_t ibp_nid; /* who's on the other end(s) */
636614
lnet_ni_t *ibp_ni; /* LNet interface */

‎drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h‎

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ typedef struct /* in-use interface */
9393
char ksni_name[IFNAMSIZ]; /* interface name */
9494
} ksock_interface_t;
9595

96-
typedef struct
97-
{
96+
typedef struct {
9897
/* "stuck" socket timeout (seconds) */
9998
int *ksnd_timeout;
10099
/* # scheduler threads in each pool while starting */
@@ -126,8 +125,7 @@ typedef struct
126125
int *ksnd_zc_recv_min_nfrags; /* minimum # of fragments to enable ZC receive */
127126
} ksock_tunables_t;
128127

129-
typedef struct
130-
{
128+
typedef struct {
131129
__u64 ksnn_incarnation; /* my epoch */
132130
spinlock_t ksnn_lock; /* serialise */
133131
struct list_head ksnn_list; /* chain on global list */
@@ -142,8 +140,7 @@ typedef struct
142140
/** reserved thread for accepting & creating new connd */
143141
#define SOCKNAL_CONND_RESV 1
144142

145-
typedef struct
146-
{
143+
typedef struct {
147144
int ksnd_init; /* initialisation state */
148145
int ksnd_nnets; /* # networks set up */
149146
struct list_head ksnd_nets; /* list of nets */
@@ -257,8 +254,7 @@ typedef union {
257254
#define SOCKNAL_RX_LNET_PAYLOAD 5 /* reading lnet payload (to deliver here) */
258255
#define SOCKNAL_RX_SLOP 6 /* skipping body */
259256

260-
typedef struct ksock_conn
261-
{
257+
typedef struct ksock_conn {
262258
struct ksock_peer *ksnc_peer; /* owning peer */
263259
struct ksock_route *ksnc_route; /* owning route */
264260
struct list_head ksnc_list; /* stash on peer's conn list */
@@ -313,8 +309,7 @@ typedef struct ksock_conn
313309
unsigned long ksnc_tx_last_post; /* time stamp of the last posted TX */
314310
} ksock_conn_t;
315311

316-
typedef struct ksock_route
317-
{
312+
typedef struct ksock_route {
318313
struct list_head ksnr_list; /* chain on peer route list */
319314
struct list_head ksnr_connd_list; /* chain on ksnr_connd_routes */
320315
struct ksock_peer *ksnr_peer; /* owning peer */
@@ -334,8 +329,7 @@ typedef struct ksock_route
334329

335330
#define SOCKNAL_KEEPALIVE_PING 1 /* cookie for keepalive ping */
336331

337-
typedef struct ksock_peer
338-
{
332+
typedef struct ksock_peer {
339333
struct list_head ksnp_list; /* stash on global peer list */
340334
unsigned long ksnp_last_alive; /* when (in jiffies) I was last alive */
341335
lnet_process_id_t ksnp_id; /* who's on the other end(s) */
@@ -358,8 +352,7 @@ typedef struct ksock_peer
358352
__u32 ksnp_passive_ips[LNET_MAX_INTERFACES]; /* preferred local interfaces */
359353
} ksock_peer_t;
360354

361-
typedef struct ksock_connreq
362-
{
355+
typedef struct ksock_connreq {
363356
struct list_head ksncr_list; /* stash on ksnd_connd_connreqs */
364357
lnet_ni_t *ksncr_ni; /* chosen NI */
365358
struct socket *ksncr_sock; /* accepted socket */
@@ -372,8 +365,7 @@ extern ksock_tunables_t ksocknal_tunables;
372365
#define SOCKNAL_MATCH_YES 1 /* TX matches type of connection */
373366
#define SOCKNAL_MATCH_MAY 2 /* TX can be sent on the connection, but not preferred */
374367

375-
typedef struct ksock_proto
376-
{
368+
typedef struct ksock_proto {
377369
int pro_version; /* version number of protocol */
378370
int (*pro_send_hello)(ksock_conn_t *, ksock_hello_msg_t *); /* handshake function */
379371
int (*pro_recv_hello)(ksock_conn_t *, ksock_hello_msg_t *, int);/* handshake function */

0 commit comments

Comments
 (0)