Skip to content

Commit 62acadd

Browse files
Atul Kumar Pantpcmoore
authored andcommitted
audit: add space before parenthesis and around '=', "==", and '<'
Fixes following checkpatch.pl issue: ERROR: space required before the open parenthesis '(' ERROR: spaces required around that '=' ERROR: spaces required around that '<' ERROR: spaces required around that '==' Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com> [PM: subject line tweaks] Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent b59bc6e commit 62acadd

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

kernel/acct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ static void fill_ac(acct_t *ac)
470470
do_div(elapsed, AHZ);
471471
btime = ktime_get_real_seconds() - elapsed;
472472
ac->ac_btime = clamp_t(time64_t, btime, 0, U32_MAX);
473-
#if ACCT_VERSION==2
473+
#if ACCT_VERSION == 2
474474
ac->ac_ahz = AHZ;
475475
#endif
476476

kernel/auditfilter.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static int audit_match_signal(struct audit_entry *entry)
221221
entry->rule.mask));
222222
}
223223

224-
switch(audit_classify_arch(arch->val)) {
224+
switch (audit_classify_arch(arch->val)) {
225225
case 0: /* native */
226226
return (audit_match_class_bits(AUDIT_CLASS_SIGNAL,
227227
entry->rule.mask));
@@ -243,7 +243,7 @@ static inline struct audit_entry *audit_to_entry_common(struct audit_rule_data *
243243

244244
err = -EINVAL;
245245
listnr = rule->flags & ~AUDIT_FILTER_PREPEND;
246-
switch(listnr) {
246+
switch (listnr) {
247247
default:
248248
goto exit_err;
249249
#ifdef CONFIG_AUDITSYSCALL
@@ -344,7 +344,7 @@ static int audit_field_valid(struct audit_entry *entry, struct audit_field *f)
344344

345345
switch (entry->rule.listnr) {
346346
case AUDIT_FILTER_FS:
347-
switch(f->type) {
347+
switch (f->type) {
348348
case AUDIT_FSTYPE:
349349
case AUDIT_FILTERKEY:
350350
break;
@@ -651,7 +651,7 @@ static struct audit_rule_data *audit_krule_to_data(struct audit_krule *krule)
651651

652652
data->fields[i] = f->type;
653653
data->fieldflags[i] = audit_ops[f->op];
654-
switch(f->type) {
654+
switch (f->type) {
655655
case AUDIT_SUBJ_USER:
656656
case AUDIT_SUBJ_ROLE:
657657
case AUDIT_SUBJ_TYPE:
@@ -717,7 +717,7 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b)
717717
a->fields[i].op != b->fields[i].op)
718718
return 1;
719719

720-
switch(a->fields[i].type) {
720+
switch (a->fields[i].type) {
721721
case AUDIT_SUBJ_USER:
722722
case AUDIT_SUBJ_ROLE:
723723
case AUDIT_SUBJ_TYPE:
@@ -946,7 +946,7 @@ static inline int audit_add_rule(struct audit_entry *entry)
946946
int dont_count = 0;
947947

948948
/* If any of these, don't count towards total */
949-
switch(entry->rule.listnr) {
949+
switch (entry->rule.listnr) {
950950
case AUDIT_FILTER_USER:
951951
case AUDIT_FILTER_EXCLUDE:
952952
case AUDIT_FILTER_FS:
@@ -1029,7 +1029,7 @@ int audit_del_rule(struct audit_entry *entry)
10291029
int dont_count = 0;
10301030

10311031
/* If any of these, don't count towards total */
1032-
switch(entry->rule.listnr) {
1032+
switch (entry->rule.listnr) {
10331033
case AUDIT_FILTER_USER:
10341034
case AUDIT_FILTER_EXCLUDE:
10351035
case AUDIT_FILTER_FS:
@@ -1083,7 +1083,7 @@ static void audit_list_rules(int seq, struct sk_buff_head *q)
10831083

10841084
/* This is a blocking read, so use audit_filter_mutex instead of rcu
10851085
* iterator to sync with list writers. */
1086-
for (i=0; i<AUDIT_NR_FILTERS; i++) {
1086+
for (i = 0; i < AUDIT_NR_FILTERS; i++) {
10871087
list_for_each_entry(r, &audit_rules_list[i], list) {
10881088
struct audit_rule_data *data;
10891089

kernel/auditsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2124,7 +2124,7 @@ static void handle_path(const struct dentry *dentry)
21242124
d = dentry;
21252125
rcu_read_lock();
21262126
seq = read_seqbegin(&rename_lock);
2127-
for(;;) {
2127+
for (;;) {
21282128
struct inode *inode = d_backing_inode(d);
21292129

21302130
if (inode && unlikely(inode->i_fsnotify_marks)) {

0 commit comments

Comments
 (0)