From: Dan Carpenter <dan.carpenter@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: "Darrick J. Wong" <djwong@kernel.org>, linux-xfs@vger.kernel.org
Subject: Re: [bug report] xfs: pass the goal of the incore inode walk to xfs_inode_walk()
Date: Fri, 13 Aug 2021 11:12:47 +0300 [thread overview]
Message-ID: <20210813080715.GY22532@kadam> (raw)
In-Reply-To: <20210812235714.GF3657114@dread.disaster.area>
On Fri, Aug 13, 2021 at 09:57:14AM +1000, Dave Chinner wrote:
> FWIW, I just assumed it was a current TOT being checked because
> c809d7e948a1 was introduced in 5.14-rc1 and that's the commit smatch
> is, IMO, incorrectly blaming. Commit 777eb1fa857e ("xfs: remove
> xfs_dqrele_all_inodes") which is the one in for-next that removed
> the XFS_ICWALK_DQRELE definition from the enum and so, under C90,
> gcc will turn the enum from from signed to unsigned. But we still
> build the kernel under C89, so it's not clear to me that the smatch
> assertion is correct...
No, it's still unsigned with -std=gnu89.
#include <stdio.h>
enum num { ONE, TWO };
int main(void)
{
enum num x;
x = -1;
if (x < 0)
printf("signed\n");
else
printf("unsigned\n");
return 0;
}
$ gcc -std=gnu89 test.c
$ ./a.out
unsigned
$
>
> Perhaps there might be some improvements that can be made to smatch
> to handle this better. Knowing what tree was being checked would
> also help us here.
Yep. My bad.
regards,
dan carpenter
next prev parent reply other threads:[~2021-08-13 8:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 6:42 [bug report] xfs: pass the goal of the incore inode walk to xfs_inode_walk() Dan Carpenter
2021-08-12 21:40 ` Dave Chinner
2021-08-12 22:41 ` Darrick J. Wong
2021-08-12 23:57 ` Dave Chinner
2021-08-13 8:12 ` Dan Carpenter [this message]
2021-08-13 7:38 ` Dan Carpenter
2021-08-13 8:15 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210813080715.GY22532@kadam \
--to=dan.carpenter@oracle.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox