net: netfilter: Replace explicit NULL comparisons
Subsystems (3)
PATCH 1/1 net: netfilter: Replace explicit NULL comparisons
Replace explicit NULL comparison with ! operator to simplify code.
--- net/netfilter/nf_conntrack_broadcast.c | 2 +- net/netfilter/nf_conntrack_core.c | 2 +- net/netfilter/nf_conntrack_ecache.c | 4 +-- net/netfilter/nf_conntrack_helper.c | 4 +-- net/netfilter/nf_conntrack_proto.c | 4 +-- net/netfilter/nf_log.c | 2 +- net/netfilter/nf_nat_redirect.c | 2 +- net/netfilter/nf_tables_api.c | 62 +++++++++++++++++----------------- net/netfilter/nfnetlink_log.c | 6 ++-- net/netfilter/nfnetlink_queue.c | 8 ++--- net/netfilter/nft_compat.c | 4 +-- net/netfilter/nft_ct.c | 10 +++--- net/netfilter/nft_dynset.c | 14 ++++---- net/netfilter/nft_log.c | 14 ++++---- net/netfilter/nft_lookup.c | 2 +- net/netfilter/nft_payload.c | 4 +-- net/netfilter/nft_set_hash.c | 4 +-- net/netfilter/x_tables.c | 8 ++--- net/netfilter/xt_TCPMSS.c | 4 +-- net/netfilter/xt_addrtype.c | 2 +- net/netfilter/xt_connlimit.c | 2 +- net/netfilter/xt_conntrack.c | 2 +- net/netfilter/xt_hashlimit.c | 4 +-- net/netfilter/xt_recent.c | 6 ++-- 24 files changed, 88 insertions(+), 88 deletions(-)
net/netfilter/nf_conntrack_broadcast.c +1 -1
@@ -42,7 +42,7 @@ int nf_conntrack_broadcast_help(struct sk_buff *skb,rcu_read_lock (); in_dev =__in_dev_get_rcu (rt->dst.dev); -if (in_dev !=NULL ) { +if (in_dev) {for_primary_ifa (in_dev) {if (ifa->ifa_broadcast == iph->daddr) { mask = ifa->ifa_mask;
net/netfilter/nf_conntrack_core.c +1 -1
@@ -1345,7 +1345,7 @@ nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum,/* It may be an special packet, error, unclean... * inverse of the return code tells to the netfilter * core what to do with the packet. */ -if (l4proto->error !=NULL ) { +if (l4proto->error) { ret = l4proto->error (net, tmpl, skb, dataoff, pf, hooknum);if (ret <=0 ) {NF_CT_STAT_INC_ATOMIC (net, error);
net/netfilter/nf_conntrack_ecache.c +2 -2
@@ -266,7 +266,7 @@ int nf_conntrack_register_notifier(struct net *net,mutex_lock (&nf_ct_ecache_mutex); notify =rcu_dereference_protected (net->ct.nf_conntrack_event_cb,lockdep_is_held (&nf_ct_ecache_mutex)); -if (notify !=NULL ) { +if (notify) { ret = -EBUSY ; goto out_unlock; }
@@ -302,7 +302,7 @@ int nf_ct_expect_register_notifier(struct net *net,mutex_lock (&nf_ct_ecache_mutex); notify =rcu_dereference_protected (net->ct.nf_expect_event_cb,lockdep_is_held (&nf_ct_ecache_mutex)); -if (notify !=NULL ) { +if (notify) { ret = -EBUSY ; goto out_unlock; }
net/netfilter/nf_conntrack_helper.c +2 -2
@@ -224,9 +224,9 @@ int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl,if (test_bit (IPS_HELPER_BIT , &ct->status))return 0 ; -if (tmpl !=NULL ) { +if (tmpl) { help =nfct_help (tmpl); -if (help !=NULL ) { +if (help) { helper = help->helper;set_bit (IPS_HELPER_BIT , &ct->status); }
net/netfilter/nf_conntrack_proto.c +2 -2
@@ -307,7 +307,7 @@ int nf_ct_l4proto_register_sysctl(struct net *net,int err =0 ;#ifdef CONFIG_SYSCTL -if (pn->ctl_table !=NULL ) { +if (pn->ctl_table) { err = nf_ct_register_sysctl(net, &pn->ctl_table_header, "net/netfilter",
@@ -329,7 +329,7 @@ void nf_ct_l4proto_unregister_sysctl(struct net *net, struct nf_conntrack_l4proto *l4proto) {#ifdef CONFIG_SYSCTL -if (pn->ctl_table_header !=NULL ) +if (pn->ctl_table_header)nf_ct_unregister_sysctl (&pn->ctl_table_header, &pn->ctl_table, pn->users);
net/netfilter/nf_log.c +1 -1
@@ -226,7 +226,7 @@ void nf_log_packet(struct net *net,const struct nf_logger *logger;rcu_read_lock (); -if (loginfo !=NULL ) +if (loginfo) logger =rcu_dereference (loggers[pf][loginfo->type]);else logger =rcu_dereference (net->nf.nf_loggers[pf]);
net/netfilter/nf_nat_redirect.c +1 -1
@@ -100,7 +100,7 @@ nf_nat_redirect_ipv6(struct sk_buff *skb, const struct nf_nat_range *range,rcu_read_lock (); idev =__in6_dev_get (skb->dev); -if (idev !=NULL ) { +if (idev) {list_for_each_entry (ifa, &idev->addr_list, if_list) { newdst = ifa->addr; addr = true;
net/netfilter/nf_tables_api.c +31 -31
242 lines not on this page · raw message
net/netfilter/nfnetlink_log.c +3 -3
@@ -683,9 +683,9 @@ nfulnl_log_packet(struct net *net, size +=nla_total_size (sizeof (u_int32_t));if (inst->flags &NFULNL_CFG_F_CONNTRACK ) { nfnl_ct =rcu_dereference (nfnl_ct_hook); -if (nfnl_ct !=NULL ) { +if (nfnl_ct) { ct = nfnl_ct->get_ct (skb, &ctinfo); -if (ct !=NULL ) +if (ct) size += nfnl_ct->build_size (ct); } }
@@ -868,7 +868,7 @@ static int nfulnl_recv_config(struct net *net, struct sock *ctnl, } } -if (cmd !=NULL ) { +if (cmd) {switch (cmd->command) {case NFULNL_CFG_CMD_BIND :if (inst) {
net/netfilter/nfnetlink_queue.c +4 -4
@@ -422,9 +422,9 @@ nfqnl_build_packet_message(struct net *net, struct nfqnl_instance *queue, nfnl_ct =rcu_dereference (nfnl_ct_hook);if (queue->flags &NFQA_CFG_F_CONNTRACK ) { -if (nfnl_ct !=NULL ) { +if (nfnl_ct) { ct = nfnl_ct->get_ct (entskb, &ctinfo); -if (ct !=NULL ) +if (ct) size += nfnl_ct->build_size (ct); } }
@@ -1166,7 +1166,7 @@ static int nfqnl_recv_verdict(struct net *net, struct sock *ctnl, nfnl_ct =rcu_dereference (nfnl_ct_hook);if (nfqa[NFQA_CT ]) { -if (nfnl_ct !=NULL ) +if (nfnl_ct) ct =nfqnl_ct_parse (nfnl_ct, nlh, nfqa, entry, &ctinfo); }
@@ -1275,7 +1275,7 @@ static int nfqnl_recv_config(struct net *net, struct sock *ctnl, goto err_out_unlock; } -if (cmd !=NULL ) { +if (cmd) {switch (cmd->command) {case NFQNL_CFG_CMD_BIND :if (queue) {
net/netfilter/nft_compat.c +2 -2
@@ -271,7 +271,7 @@ nft_target_destroy(const struct nft_ctx *ctx, const struct nft_expr *expr) par.target = target; par.targinfo = info; par.family = ctx->afi->family; -if (par.target->destroy !=NULL ) +if (par.target->destroy) par.target->destroy (&par); nft_xt_put(container_of(expr->ops, struct nft_xt, ops));
@@ -454,7 +454,7 @@ nft_match_destroy(const struct nft_ctx *ctx, const struct nft_expr *expr) par.match = match; par.matchinfo = info; par.family = ctx->afi->family; -if (par.match->destroy !=NULL ) +if (par.match->destroy) par.match->destroy (&par); nft_xt_put(container_of(expr->ops, struct nft_xt, ops));
net/netfilter/nft_ct.c +5 -5
@@ -374,7 +374,7 @@ static int nft_ct_get_init(const struct nft_ctx *ctx, priv->dir =IP_CT_DIR_MAX ;switch (priv->key) {case NFT_CT_DIRECTION : -if (tb[NFTA_CT_DIRECTION ] !=NULL ) +if (tb[NFTA_CT_DIRECTION ])return -EINVAL ; len =sizeof (u8);break ;
@@ -387,19 +387,19 @@ static int nft_ct_get_init(const struct nft_ctx *ctx,case NFT_CT_SECMARK :#endif case NFT_CT_EXPIRATION : -if (tb[NFTA_CT_DIRECTION ] !=NULL ) +if (tb[NFTA_CT_DIRECTION ])return -EINVAL ; len =sizeof (u32);break ;#ifdef CONFIG_NF_CONNTRACK_LABELS case NFT_CT_LABELS : -if (tb[NFTA_CT_DIRECTION ] !=NULL ) +if (tb[NFTA_CT_DIRECTION ])return -EINVAL ; len =NF_CT_LABELS_MAX_SIZE ;break ;#endif case NFT_CT_HELPER : -if (tb[NFTA_CT_DIRECTION ] !=NULL ) +if (tb[NFTA_CT_DIRECTION ])return -EINVAL ; len =NF_CT_HELPER_NAME_LEN ;break ;
@@ -450,7 +450,7 @@ static int nft_ct_get_init(const struct nft_ctx *ctx,return -EOPNOTSUPP ; } -if (tb[NFTA_CT_DIRECTION ] !=NULL ) { +if (tb[NFTA_CT_DIRECTION ]) { priv->dir =nla_get_u8 (tb[NFTA_CT_DIRECTION ]);switch (priv->dir) {case IP_CT_DIR_ORIGINAL :
net/netfilter/nft_dynset.c +7 -7
@@ -85,7 +85,7 @@ static void nft_dynset_eval(const struct nft_expr *expr, }else if (sexpr ==NULL ) goto out; -if (sexpr !=NULL ) +if (sexpr) sexpr->ops->eval (sexpr, regs, pkt);if (priv->invert)
@@ -163,7 +163,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx, } timeout =0 ; -if (tb[NFTA_DYNSET_TIMEOUT ] !=NULL ) { +if (tb[NFTA_DYNSET_TIMEOUT ]) {if (!(set->flags &NFT_SET_TIMEOUT ))return -EINVAL ; timeout = msecs_to_jiffies(be64_to_cpu(nla_get_be64(
@@ -175,7 +175,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx,if (err <0 )return err; -if (tb[NFTA_DYNSET_SREG_DATA ] !=NULL ) { +if (tb[NFTA_DYNSET_SREG_DATA ]) {if (!(set->flags &NFT_SET_MAP ))return -EINVAL ;if (set->dtype ==NFT_DATA_VERDICT )
@@ -188,7 +188,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx, }else if (set->flags &NFT_SET_MAP )return -EINVAL ; -if (tb[NFTA_DYNSET_EXPR ] !=NULL ) { +if (tb[NFTA_DYNSET_EXPR ]) {if (!(set->flags &NFT_SET_EVAL ))return -EINVAL ;if (!(set->flags &NFT_SET_ANONYMOUS ))
@@ -208,7 +208,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx,nft_set_ext_add_length (&priv->tmpl,NFT_SET_EXT_KEY , set->klen);if (set->flags &NFT_SET_MAP )nft_set_ext_add_length (&priv->tmpl,NFT_SET_EXT_DATA , set->dlen); -if (priv->expr !=NULL ) +if (priv->expr)nft_set_ext_add_length (&priv->tmpl,NFT_SET_EXT_EXPR , priv->expr->ops->size);if (set->flags &NFT_SET_TIMEOUT ) {
@@ -226,7 +226,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx,return 0 ; err1: -if (priv->expr !=NULL ) +if (priv->expr)nft_expr_destroy (ctx, priv->expr);return err; }
@@ -237,7 +237,7 @@ static void nft_dynset_destroy(const struct nft_ctx *ctx,struct nft_dynset *priv =nft_expr_priv (expr);nf_tables_unbind_set (ctx, priv->set, &priv->binding); -if (priv->expr !=NULL ) +if (priv->expr)nft_expr_destroy (ctx, priv->expr); }
net/netfilter/nft_log.c +7 -7
@@ -60,14 +60,14 @@ static int nft_log_init(const struct nft_ctx *ctx,if (tb[NFTA_LOG_LEVEL ] !=NULL && tb[NFTA_LOG_GROUP ] !=NULL )return -EINVAL ; -if (tb[NFTA_LOG_GROUP ] !=NULL ) { +if (tb[NFTA_LOG_GROUP ]) { li->type =NF_LOG_TYPE_ULOG ; -if (tb[NFTA_LOG_FLAGS ] !=NULL ) +if (tb[NFTA_LOG_FLAGS ])return -EINVAL ; } nla = tb[NFTA_LOG_PREFIX ]; -if (nla !=NULL ) { +if (nla) { priv->prefix =kmalloc (nla_len (nla) +1 ,GFP_KERNEL );if (priv->prefix ==NULL )return -ENOMEM ;
@@ -78,7 +78,7 @@ static int nft_log_init(const struct nft_ctx *ctx,switch (li->type) {case NF_LOG_TYPE_LOG : -if (tb[NFTA_LOG_LEVEL ] !=NULL ) { +if (tb[NFTA_LOG_LEVEL ]) { li->u.log.level =ntohl (nla_get_be32 (tb[NFTA_LOG_LEVEL ])); }else {
@@ -89,7 +89,7 @@ static int nft_log_init(const struct nft_ctx *ctx, goto err1; } -if (tb[NFTA_LOG_FLAGS ] !=NULL ) { +if (tb[NFTA_LOG_FLAGS ]) { li->u.log.logflags =ntohl (nla_get_be32 (tb[NFTA_LOG_FLAGS ]));if (li->u.log.logflags & ~NF_LOG_MASK ) {
@@ -100,12 +100,12 @@ static int nft_log_init(const struct nft_ctx *ctx,break ;case NF_LOG_TYPE_ULOG : li->u.ulog.group =ntohs (nla_get_be16 (tb[NFTA_LOG_GROUP ])); -if (tb[NFTA_LOG_SNAPLEN ] !=NULL ) { +if (tb[NFTA_LOG_SNAPLEN ]) { li->u.ulog.flags |=NF_LOG_F_COPY_LEN ; li->u.ulog.copy_len =ntohl (nla_get_be32 (tb[NFTA_LOG_SNAPLEN ])); } -if (tb[NFTA_LOG_QTHRESHOLD ] !=NULL ) { +if (tb[NFTA_LOG_QTHRESHOLD ]) { li->u.ulog.qthreshold =ntohs (nla_get_be16 (tb[NFTA_LOG_QTHRESHOLD ])); }
net/netfilter/nft_lookup.c +1 -1
@@ -103,7 +103,7 @@ static int nft_lookup_init(const struct nft_ctx *ctx, } } -if (tb[NFTA_LOOKUP_DREG ] !=NULL ) { +if (tb[NFTA_LOOKUP_DREG ]) {if (priv->invert)return -EINVAL ;if (!(set->flags &NFT_SET_MAP ))
net/netfilter/nft_payload.c +2 -2
@@ -408,8 +408,8 @@ nft_payload_select_ops(const struct nft_ctx *ctx,return ERR_PTR (-EOPNOTSUPP ); } -if (tb[NFTA_PAYLOAD_SREG ] !=NULL ) { -if (tb[NFTA_PAYLOAD_DREG ] !=NULL ) +if (tb[NFTA_PAYLOAD_SREG ]) { +if (tb[NFTA_PAYLOAD_DREG ])return ERR_PTR (-EINVAL );return &nft_payload_set_ops; }
net/netfilter/nft_set_hash.c +2 -2
@@ -83,7 +83,7 @@ static bool nft_hash_lookup(const struct net *net, const struct nft_set *set, }; he =rhashtable_lookup_fast (&priv->ht, &arg, nft_hash_params); -if (he !=NULL ) +if (he) *ext = &he->ext;return !!he;
@@ -106,7 +106,7 @@ static bool nft_hash_update(struct nft_set *set, const u32 *key, }; he =rhashtable_lookup_fast (&priv->ht, &arg, nft_hash_params); -if (he !=NULL ) +if (he) goto out; he =new (set, expr, regs);
net/netfilter/x_tables.c +4 -4
@@ -459,7 +459,7 @@ int xt_check_match(struct xt_mtchk_param *par, par->match->proto);return -EINVAL ; } -if (par->match->checkentry !=NULL ) { +if (par->match->checkentry) { ret = par->match->checkentry (par);if (ret <0 )return ret;
@@ -842,7 +842,7 @@ int xt_check_target(struct xt_tgchk_param *par, par->target->proto);return -EINVAL ; } -if (par->target->checkentry !=NULL ) { +if (par->target->checkentry) { ret = par->target->checkentry (par);if (ret <0 )return ret;
@@ -1023,7 +1023,7 @@ void xt_free_table_info(struct xt_table_info *info) {int cpu; -if (info->jumpstack !=NULL ) { +if (info->jumpstack) {for_each_possible_cpu (cpu)kvfree (info->jumpstack[cpu]);kvfree (info->jumpstack);
@@ -1401,7 +1401,7 @@ static void *xt_mttg_seq_next(struct seq_file *seq, void *v, loff_t *ppos,return NULL ; } -if (ppos !=NULL ) +if (ppos) ++*ppos;return trav; }
net/netfilter/xt_TCPMSS.c +2 -2
@@ -64,11 +64,11 @@ static u_int32_t tcpmss_reverse_mtu(struct net *net, }rcu_read_lock (); ai =nf_get_afinfo (family); -if (ai !=NULL ) +if (ai) ai->route (net, (struct dst_entry **)&rt, &fl, false);rcu_read_unlock (); -if (rt !=NULL ) { +if (rt) { mtu =dst_mtu (&rt->dst);dst_release (&rt->dst); }
net/netfilter/xt_addrtype.c +1 -1
@@ -50,7 +50,7 @@ static u32 match_lookup_rt6(struct net *net, const struct net_device *dev,rcu_read_lock (); afinfo =nf_get_afinfo (NFPROTO_IPV6 ); -if (afinfo !=NULL ) { +if (afinfo) {const struct nf_ipv6_ops *v6ops;if (dev && (mask &XT_ADDRTYPE_LOCAL )) {
net/netfilter/xt_connlimit.c +1 -1
@@ -328,7 +328,7 @@ connlimit_mt(const struct sk_buff *skb, struct xt_action_param *par)unsigned int connections; ct =nf_ct_get (skb, &ctinfo); -if (ct !=NULL ) { +if (ct) { tuple_ptr = &ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple; zone =nf_ct_zone (ct); } else if (!nf_ct_get_tuplepr(skb, skb_network_offset(skb),
net/netfilter/xt_conntrack.c +1 -1
@@ -181,7 +181,7 @@ conntrack_mt(const struct sk_buff *skb, struct xt_action_param *par, statebit =XT_CONNTRACK_STATE_INVALID ;if (info->match_flags &XT_CONNTRACK_STATE ) { -if (ct !=NULL ) { +if (ct) {if (test_bit (IPS_SRC_NAT_BIT , &ct->status)) statebit |=XT_CONNTRACK_STATE_SNAT ;if (test_bit (IPS_DST_NAT_BIT , &ct->status))
net/netfilter/xt_hashlimit.c +2 -2
@@ -193,7 +193,7 @@ dsthash_alloc_init(struct xt_hashlimit_htable *ht,* hashtable, double check if this packet lost race. */ ent =dsthash_find (ht, dst); -if (ent !=NULL ) { +if (ent) {spin_unlock (&ht->lock); *race = true;return ent;
@@ -368,7 +368,7 @@ static void htable_remove_proc_entry(struct xt_hashlimit_htable *hinfo)else parent = hashlimit_net->ip6t_hashlimit; -if (parent !=NULL ) +if (parent)remove_proc_entry (hinfo->name, parent); }
net/netfilter/xt_recent.c +3 -3
@@ -374,7 +374,7 @@ static int recent_mt_check(const struct xt_mtchk_param *par,mutex_lock (&recent_mutex); t =recent_table_lookup (recent_net, info->name); -if (t !=NULL ) { +if (t) {if (nstamp_mask > t->nstamps_max_mask) {spin_lock_bh (&recent_lock);recent_table_flush (t);
@@ -461,7 +461,7 @@ static void recent_mt_destroy(const struct xt_mtdtor_param *par)list_del (&t->list);spin_unlock_bh (&recent_lock);#ifdef CONFIG_PROC_FS -if (recent_net->xt_recent !=NULL ) +if (recent_net->xt_recent)remove_proc_entry (t->name, recent_net->xt_recent);#endif recent_table_flush (t);
@@ -596,7 +596,7 @@ recent_mt_proc_write(struct file *file, const char __user *input, ++c; --size; -if (strnchr (c, size,':' ) !=NULL ) { +if (strnchr (c, size,':' )) { family =NFPROTO_IPV6 ; succ =in6_pton (c, size, (void *)&addr,'\n' ,NULL ); }else {
Signature · 1 line
2.11.0
Quoted 1 line · Arushi Singhal
Replace explicit NULL comparison with ! operator to simplify code.
I still wouldn't do this, for the same reason as before. Comparing to NULL explicitly more or less gave an extra guarantee that the other operand was also a pointer.
Pablo Neira Ayuso
maintainerQuoted 7 lines · Jan Engelhardt
Quoted 1 line · Arushi Singhal
Replace explicit NULL comparison with ! operator to simplify code.
I still wouldn't do this, for the same reason as before. Comparing to NULL explicitly more or less gave an extra guarantee that the other operand was also a pointer.
Arushi, where does it say in the coding style that this is prefered?
Quoted 10 lines · Arushi Singhal
On Sun, Apr 9, 2017 at 1:44 AM, Pablo Neira Ayuso <[email protected]> wrote:
On Sat, Apr 08, 2017 at 08:21:56PM +0200, Jan Engelhardt wrote:
> On Saturday 2017-04-08 19:21, Arushi Singhal wrote:
>
> >Replace explicit NULL comparison with ! operator to simplify code. >
> I still wouldn't do this, for the same reason as before. Comparing to > NULL explicitly more or less gave an extra guarantee that the other > operand was also a pointer.
Quoted 3 lines
Arushi, where does it say in the coding style that this is prefered?
This is reported by checkpatch.pl script.
checkpatch has been controversial at times, like when people took the 80 character limit way too literally. Changing pointer comparisons looks like another thing that is better left ignored.
2017-04-09 16:26 GMT+08:00 Jan Engelhardt <[email protected]>:
Quoted 12 lines · Arushi Singhal
Quoted 10 lines · Pablo Neira Ayuso
On Sat, Apr 08, 2017 at 08:21:56PM +0200, Jan Engelhardt wrote:
> On Saturday 2017-04-08 19:21, Arushi Singhal wrote:
>
> >Replace explicit NULL comparison with ! operator to simplify code. >
> I still wouldn't do this, for the same reason as before. Comparing to > NULL explicitly more or less gave an extra guarantee that the other > operand was also a pointer.
Quoted 7 lines
Quoted 3 lines
Arushi, where does it say in the coding style that this is prefered?
This is reported by checkpatch.pl script.
checkpatch has been controversial at times, like when people took the 80 character limit way too literally. Changing pointer comparisons looks like another thing that is better left ignored.
Yes, I agree too. Converting the "if (p != NULL)" to "if (p)" like this seems unnecessary.
Pablo Neira Ayuso
maintainerQuoted 8 lines · Arushi Singhal
Quoted 5 lines · Pablo Neira Ayuso
Quoted 4 lines · Jan Engelhardt
Quoted 1 line · Arushi Singhal
Replace explicit NULL comparison with ! operator to simplify code.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
I still wouldn't do this, for the same reason as before. Comparing to NULL explicitly more or less gave an extra guarantee that the other operand was also a pointer.
Arushi, where does it say in the coding style that this is prefered?
This is reported by checkpatch.pl script.
I don't find it in the coding style. I think this is what it stands as preference in this case IMO. Otherwise, it would be good to get the kernel coding style document in sync with it, including the reason why this way to express thing is cleaner. We have to justify the changes.