Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove placeholder constants #3620

Conversation

Lilit0x
Copy link
Contributor

@Lilit0x Lilit0x commented Mar 14, 2024

This PR removes placeholder constants as described in #3131. Below are lists of patterns matched for unused constant names.
It also includes an update of the IPROTO_MAX constant on newer versions of Linux mentioned in #1896.

  • _COUNT
  • _MAX
  • _NUM

These are all breaking changes for the new libc 1.0 version tracked in #3248

@rustbot
Copy link
Collaborator

rustbot commented Mar 14, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@Lilit0x Lilit0x marked this pull request as ready for review March 15, 2024 11:38
@rustbot
Copy link
Collaborator

rustbot commented Mar 15, 2024

Some changes occurred in solarish module

cc @jclulow, @pfmooney

Copy link
Member

@Amanieu Amanieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many of these are not placeholder constants, you should individually double-check each of them.

@@ -5007,7 +4990,6 @@ pub const VM_HUGETLB_PAGES: ::c_int = 18;
pub const VM_SWAPPINESS: ::c_int = 19;
pub const VM_LOWMEM_RESERVE_RATIO: ::c_int = 20;
pub const VM_MIN_FREE_KBYTES: ::c_int = 21;
pub const VM_MAX_MAP_COUNT: ::c_int = 22;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a placeholder constant: it is an input to a function which returns a count.

@@ -3676,7 +3660,6 @@ pub const IW_MICFAILURE_KEY_ID: ::c_ulong = 0x00000003;
pub const IW_MICFAILURE_GROUP: ::c_ulong = 0x00000004;
pub const IW_MICFAILURE_PAIRWISE: ::c_ulong = 0x00000008;
pub const IW_MICFAILURE_STAKEY: ::c_ulong = 0x00000010;
pub const IW_MICFAILURE_COUNT: ::c_ulong = 0x00000060;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

See #1896 for more info."
)]
pub const IPPROTO_MAX: ::c_int = 256;
pub const IPPROTO_MAX: ::c_int = 263;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed.

@@ -2324,8 +2321,6 @@ pub const IFLA_EVENT: ::c_ushort = 44;
pub const IFLA_NEW_NETNSID: ::c_ushort = 45;
pub const IFLA_IF_NETNSID: ::c_ushort = 46;
pub const IFLA_TARGET_NETNSID: ::c_ushort = IFLA_IF_NETNSID;
pub const IFLA_CARRIER_UP_COUNT: ::c_ushort = 47;
pub const IFLA_CARRIER_DOWN_COUNT: ::c_ushort = 48;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a placeholder.

@@ -2307,8 +2306,6 @@ pub const IFLA_GROUP: ::c_ushort = 27;
pub const IFLA_NET_NS_FD: ::c_ushort = 28;
pub const IFLA_EXT_MASK: ::c_ushort = 29;
pub const IFLA_PROMISCUITY: ::c_ushort = 30;
pub const IFLA_NUM_TX_QUEUES: ::c_ushort = 31;
pub const IFLA_NUM_RX_QUEUES: ::c_ushort = 32;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a placeholder.

@@ -1436,7 +1435,6 @@ pub const DOWNTIME: ::c_short = 11;
// utmpx database types
pub const UTX_DB_UTMPX: ::c_uint = 0;
pub const UTX_DB_WTMPX: ::c_uint = 1;
pub const UTX_DB_LASTLOG: ::c_uint = 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a placeholder.

@@ -1064,7 +1064,6 @@ pub const CPUCTL_CPUID: ::c_int = 0xc0106303;
pub const CPUCTL_UPDATE: ::c_int = 0xc0106304;
pub const CPUCTL_MSRSBIT: ::c_int = 0xc0106305;
pub const CPUCTL_MSRCBIT: ::c_int = 0xc0106306;
pub const CPUCTL_CPUID_COUNT: ::c_int = 0xc0106307;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a placeholder.

@@ -5225,7 +5221,6 @@ pub const VOL_CAP_FMT_DECMPFS_COMPRESSION: attrgroup_t = 0x00010000;
pub const VOL_CAP_FMT_64BIT_OBJECT_IDS: attrgroup_t = 0x00020000;
pub const VOL_CAP_FMT_DIR_HARDLINKS: attrgroup_t = 0x00040000;
pub const VOL_CAP_FMT_DOCUMENT_ID: attrgroup_t = 0x00080000;
pub const VOL_CAP_FMT_WRITE_GENERATION_COUNT: attrgroup_t = 0x00100000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a placeholder.

@@ -5140,7 +5137,6 @@ pub const ATTR_CMN_OWNERID: attrgroup_t = 0x00008000;
pub const ATTR_CMN_GRPID: attrgroup_t = 0x00010000;
pub const ATTR_CMN_ACCESSMASK: attrgroup_t = 0x00020000;
pub const ATTR_CMN_FLAGS: attrgroup_t = 0x00040000;
pub const ATTR_CMN_GEN_COUNT: attrgroup_t = 0x00080000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a placeholder.

@@ -1404,8 +1404,6 @@ pub const LPAR_INFO_FORMAT1: ::c_int = 1;
pub const LPAR_INFO_FORMAT2: ::c_int = 2;
pub const WPAR_INFO_FORMAT: ::c_int = 3;
pub const PROC_MODULE_INFO: ::c_int = 4;
pub const NUM_PROC_MODULE_TYPES: ::c_int = 5;
pub const LPAR_INFO_VRME_NUM_POOLS: ::c_int = 6;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a placeholder.

@JohnTitor
Copy link
Member

Closing as inactive, it'd be great if you could split PRs to make our review easy. Thank you for the PR anyway!

@JohnTitor JohnTitor closed this Apr 29, 2024
@Lilit0x
Copy link
Contributor Author

Lilit0x commented Apr 29, 2024

Closing as inactive, it'd be great if you could split PRs to make our review easy. Thank you for the PR anyway!

Yeahh, I paused on it because some clarification is needed based on my discussion with @Amanieu .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants