Messages in this thread | | | Subject | Re: [PATCH 3/3 v2] drivers/bus: Device driver for FSL-MC DPRC devices | From | Scott Wood <> | Date | Tue, 30 Sep 2014 21:27:12 -0500 |
| |
On Tue, 2014-09-30 at 21:19 -0500, Timur Tabi wrote: > On Fri, Sep 19, 2014 at 5:49 PM, J. German Rivera > <German.Rivera@freescale.com> wrote: > > +/** > > + * dprc_remove_devices - Removes devices for objects removed from a DPRC > > + * > > + * @mc_bus_dev: pointer to the fsl-mc device that represents a DPRC object > > + * @obj_desc_array: array of object descriptors for child objects currently > > + * present in the DPRC in the MC. > > + * @num_child_objects_in_mc: number of entries in obj_desc_array > > + * > > + * Synchronizes the state of the Linux bus driver with the actual state of > > + * the MC by removing devices that represent MC objects that have > > + * been dynamically removed in the physical DPRC. > > + */ > > +static void dprc_remove_devices(struct fsl_mc_device *mc_bus_dev, > > + struct dprc_obj_desc *obj_desc_array, > > + int num_child_objects_in_mc) > > +{ > > + if (num_child_objects_in_mc != 0) { > > Like here. Just do "if (num_child_objects_in_mc) {"
This seems to be a place that is testing for zero as a value rather than as a stand-in for NULL, so I'd argue it's better style to leave it as is.
-Scott
| |