* xfs_icache.c:1298]: (style) Redundant condition
@ 2016-07-25 15:13 David Binderman
2016-08-01 6:32 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: David Binderman @ 2016-07-25 15:13 UTC (permalink / raw)
To: david, xfs, Linux Kernel Mailing List, dcb314
Hello there,
linux-4.7/fs/xfs/xfs_icache.c:1298]: (style) Redundant condition:
eofb. '!eofb || (eofb && eofb.eof_scan_owner!=0)' is equivalent to
'!eofb || eofb.eof_scan_owner!=0'
Source code is
ASSERT(!eofb || (eofb && eofb->eof_scan_owner != 0));
Maybe better code
ASSERT(!eofb || (eofb->eof_scan_owner != 0));
Regards
David Binderman
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: xfs_icache.c:1298]: (style) Redundant condition
2016-07-25 15:13 xfs_icache.c:1298]: (style) Redundant condition David Binderman
@ 2016-08-01 6:32 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2016-08-01 6:32 UTC (permalink / raw)
To: David Binderman; +Cc: Linux Kernel Mailing List, dcb314, xfs
On Mon, Jul 25, 2016 at 04:13:28PM +0100, David Binderman wrote:
> Hello there,
>
> linux-4.7/fs/xfs/xfs_icache.c:1298]: (style) Redundant condition:
> eofb. '!eofb || (eofb && eofb.eof_scan_owner!=0)' is equivalent to
> '!eofb || eofb.eof_scan_owner!=0'
>
> Source code is
>
> ASSERT(!eofb || (eofb && eofb->eof_scan_owner != 0));
>
> Maybe better code
>
> ASSERT(!eofb || (eofb->eof_scan_owner != 0));
Yes, that would be better. But it's probably not worth changing
existing code just for that.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-01 6:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-25 15:13 xfs_icache.c:1298]: (style) Redundant condition David Binderman
2016-08-01 6:32 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).