ipmi: remove voidp casts
Subsystems (2)
PATCH 1/1 ipmi: remove voidp casts
This trivial patch removes the (void *) conversion as per the kernel janitor TODO list.
drivers/char/ipmi/ipmi_si_intf.c +3 -3
@@ -2483,11 +2483,11 @@ static int __devexit ipmi_of_remove(strustatic struct of_device_id ipmi_match[] { { .type = "ipmi", .compatible = "ipmi-kcs", - .data = (void *)(unsigned long) SI_KCS }, + .data = (unsigned long) SI_KCS }, { .type = "ipmi", .compatible = "ipmi-smic", - .data = (void *)(unsigned long) SI_SMIC }, + .data = (unsigned long) SI_SMIC }, { .type = "ipmi", .compatible = "ipmi-bt", - .data = (void *)(unsigned long) SI_BT }, + .data = (unsigned long) SI_BT }, {}, };
Quoted 2 lines · Mahesh Kalappattil
This trivial patch removes the (void *) conversion as per the kernel janitor TODO list.
Does that work if the original type is not a pointer type (unsigned long here)?
julia
Quoted 22 lines
Signed-off-by Mahesh Kalappattil <[email protected]>drivers/char/ipmi/ipmi_si_intf.c +3
-4@@ -2483,11 +2483,11 @@ static int __devexit ipmi_of_remove(stru static struct of_device_id ipmi_match[] > { { .type = "ipmi", .compatible = "ipmi-kcs", - .data = (void *)(unsigned long) SI_KCS }, + .data = (unsigned long) SI_KCS }, { .type = "ipmi", .compatible = "ipmi-smic", - .data = (void *)(unsigned long) SI_SMIC }, + .data = (unsigned long) SI_SMIC }, { .type = "ipmi", .compatible = "ipmi-bt", - .data = (void *)(unsigned long) SI_BT }, + .data = (unsigned long) SI_BT }, {}, }; --To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
My apologies... As you said, i think (void *) is necessary here to convert (unsigned long) to pointer. Please ignore the patch. Should we still keep (void *) if we have had a pointer in place of (unsigned long)?
Thanks,
Mahesh
Quoted 24 lines · Julia Lawall
Quoted 2 lines · Mahesh Kalappattil
This trivial patch removes the (void *) conversion as per the kernel janitor TODO list.
Does that work if the original type is not a pointer type (unsigned long here)?
julia
Quoted 14 lines
Signed-off-by Mahesh Kalappattil <[email protected]>drivers/char/ipmi/ipmi_si_intf.c +2
-3@@ -2483,11 +2483,11 @@ static int __devexit ipmi_of_remove(stru static struct of_device_id ipmi_match[] >> { { .type = "ipmi", .compatible = "ipmi-kcs", - .data = (void *)(unsigned long) SI_KCS }, + .data = (unsigned long) SI_KCS }, { .type = "ipmi", .compatible = "ipmi-smic", - .data = (void *)(unsigned long) SI_SMIC }, + .data = (unsigned long) SI_SMIC }, { .type = "ipmi", .compatible = "ipmi-bt", - .data = (void *)(unsigned long) SI_BT },
Quoted 9 lines
Quoted 8 lines
drivers/char/ipmi/ipmi_si_intf.c +1
-1+ .data = (unsigned long) SI_BT }, {}, }; --To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html