All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/17] xfs: unsigned flags conversion for c11
@ 2022-04-11  0:31 Dave Chinner
  2022-04-11  0:31 ` [PATCH 01/17] xfs: convert buffer flags to unsigned Dave Chinner
                   ` (16 more replies)
  0 siblings, 17 replies; 40+ messages in thread
From: Dave Chinner @ 2022-04-11  0:31 UTC (permalink / raw)
  To: linux-xfs

Hi folks,

With the addition of C11 compiler specs to 5.18-rc1, some compilers
are generating warnings about our use of signed flag values being
placed into unsigned fields.

The initial warning is caused by the trace event infrastructure
using __print_flags(). The array structure used internally that we
use macros to initialise defines the flags field as an unsigned
long. This causes signed int flags that set the high bit to be sign
extended and not be correct. gcc-5 then fails to detect this value
as a constant and it throws errors.

The fix for this is to just define the flag values as unsigned ints.
While we only need to convert the buffer flags to avoid the build
error for merge into 5.18-rcX, this series converts all the flags
fields that are used to initialise trace event __print_flags()
arrays. Most of these flags are stored in unsigned int variables, we
really should be declaring them as unsigned values anyway.

Hence this patch set cleans up all these flag values to use unsigned
values, use unsigned storage variables, and convert all the places
that pass them around to use unsigned varaibles. I've converted
all the value definitions to use consistent (1u << x) definitions so
it is clear they are intended to be one bit per value flags.

There are other flags values and fields in XFS that I have not
converted - these can be cleaned up over time as they currently do
not have non-obvious build-breaking potential.

This is based on 5.18-rc2.

Cheers,

Dave.



^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2022-04-21  9:16 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11  0:31 [PATCH 00/17] xfs: unsigned flags conversion for c11 Dave Chinner
2022-04-11  0:31 ` [PATCH 01/17] xfs: convert buffer flags to unsigned Dave Chinner
2022-04-11 10:05   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 02/17] xfs: convert attr type " Dave Chinner
2022-04-11 10:23   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 03/17] xfs: convert scrub " Dave Chinner
2022-04-11 10:33   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 04/17] xfs: convert bmap extent " Dave Chinner
2022-04-11 10:42   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 05/17] xfs: convert bmapi " Dave Chinner
2022-04-11 12:53   ` Chandan Babu R
2022-04-11 13:44     ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 06/17] xfs: convert AGF log " Dave Chinner
2022-04-11 13:27   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 07/17] xfs: convert AGI " Dave Chinner
2022-04-11 13:49   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 08/17] xfs: convert btree buffer " Dave Chinner
2022-04-11 14:03   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 09/17] xfs: convert buffer log item " Dave Chinner
2022-04-12  7:25   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 10/17] xfs: convert da btree operations " Dave Chinner
2022-04-12  7:25   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 11/17] xfs: convert dquot " Dave Chinner
2022-04-12  7:26   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 12/17] xfs: convert log item tracepoint " Dave Chinner
2022-04-12  7:26   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 13/17] xfs: convert inode lock " Dave Chinner
2022-04-12  7:26   ` Chandan Babu R
2022-04-12  8:43     ` Dave Chinner
2022-04-21  0:44       ` [PATCH 13/17 v2] " Dave Chinner
2022-04-21  3:07         ` Alli
2022-04-21  9:15         ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 14/17] xfs: convert ptag " Dave Chinner
2022-04-12  7:26   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 15/17] xfs: convert quota options " Dave Chinner
2022-04-12  7:26   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 16/17] xfs: convert shutdown reasons " Dave Chinner
2022-04-12  7:27   ` Chandan Babu R
2022-04-11  0:31 ` [PATCH 17/17] xfs: convert log ticket and iclog flags " Dave Chinner
2022-04-12  7:27   ` Chandan Babu R

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.