Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1490634 > unrolled thread

Re: [PATCH 10/10] firewire-net: Adjust checks for null pointers in five functions

Started byStefan Richter <stefanr@s5r6.in-berlin.de>
First post2016-09-24 14:10 +0200
Last post2016-09-24 14:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 10/10] firewire-net: Adjust checks for null pointers in  five functions Stefan Richter <stefanr@s5r6.in-berlin.de> - 2016-09-24 14:10 +0200

#1490634 — Re: [PATCH 10/10] firewire-net: Adjust checks for null pointers in five functions

FromStefan Richter <stefanr@s5r6.in-berlin.de>
Date2016-09-24 14:10 +0200
SubjectRe: [PATCH 10/10] firewire-net: Adjust checks for null pointers in five functions
Message-ID<skTWh-P9-17@gated-at.bofh.it>
On Sep 18 SF Markus Elfring wrote:
> The script "checkpatch.pl" can point information out like the following.

A side note:  checkpatch.pl is for authors to help prepare their
submissions of new code (or their refactoring of existing code if for some
reason a refactoring is undertaken).

> Comparison to NULL could be written !…

Yes it could, or it could remain as is.  Both styles are used in
drivers/firewire/net.c, so it is indeed preferable to normalize it to one
of them.  I keep your patch for the next occasion when related work is
being done on drivers/firewire/net.c or drivers/firewire.

> Thus fix the affected source code places.

It is not a "fix", it is a stylistic change.

> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/firewire/net.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
> index eb7ce5e..e313be3 100644
> --- a/drivers/firewire/net.c
> +++ b/drivers/firewire/net.c
> @@ -366,13 +366,13 @@ static struct fwnet_partial_datagram *fwnet_pd_new(struct net_device *net,
>  
>  	INIT_LIST_HEAD(&new->fi_list);
>  	fi = fwnet_frag_new(new, frag_off, frag_len);
> -	if (fi == NULL)
> +	if (!fi)
>  		goto free_new;
[...]
-- 
Stefan Richter
-======----- =--= ==---
http://arcgraph.de/sr/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web