git: ef65f7bdf26e - main - mmc:: Undo my conversion of (bool) to !!.
Warner Losh
imp at FreeBSD.org
Thu Jun 3 17:29:08 UTC 2021
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=ef65f7bdf26e2f69e13d54e1ffd671de7d9032f6
commit ef65f7bdf26e2f69e13d54e1ffd671de7d9032f6
Author: Warner Losh <imp at FreeBSD.org>
AuthorDate: 2021-06-03 17:26:57 +0000
Commit: Warner Losh <imp at FreeBSD.org>
CommitDate: 2021-06-03 17:29:04 +0000
mmc:: Undo my conversion of (bool) to !!.
The need for !! over (bool) pre-dates gcc 4.2, so go with the patch
as-submitted because the kernel tends to prefer that.
Suggested by: emaste@
Sponsored by: Netflix
---
sys/dev/mmc/mmc_fdt_helpers.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/dev/mmc/mmc_fdt_helpers.c b/sys/dev/mmc/mmc_fdt_helpers.c
index 9d120fa01a26..175de28ac5fb 100644
--- a/sys/dev/mmc/mmc_fdt_helpers.c
+++ b/sys/dev/mmc/mmc_fdt_helpers.c
@@ -407,7 +407,7 @@ mmc_fdt_gpio_get_present(struct mmc_fdt_helper *helper)
gpio_pin_is_active(helper->cd_pin, &pinstate);
- return (pinstate ^ !!(helper->props & MMC_PROP_CD_INVERTED));
+ return (pinstate ^ (bool)(helper->props & MMC_PROP_CD_INVERTED));
}
bool
@@ -423,7 +423,7 @@ mmc_fdt_gpio_get_readonly(struct mmc_fdt_helper *helper)
gpio_pin_is_active(helper->wp_pin, &pinstate);
- return (pinstate ^ !!(helper->props & MMC_PROP_WP_INVERTED));
+ return (pinstate ^ (bool)(helper->props & MMC_PROP_WP_INVERTED));
}
void
More information about the dev-commits-src-main
mailing list