]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
mmc:: Undo my conversion of (bool) to !!.
authorWarner Losh <imp@FreeBSD.org>
Thu, 3 Jun 2021 17:26:57 +0000 (11:26 -0600)
committerWarner Losh <imp@FreeBSD.org>
Thu, 3 Jun 2021 17:29:04 +0000 (11:29 -0600)
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

index 9d120fa01a265b81f9b4424af830841096a80d65..175de28ac5fb780cc355cb80ee1306912c7db23e 100644 (file)
@@ -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