lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 30 Sep 2014 21:27:12 -0500
From:	Scott Wood <scottwood@...escale.com>
To:	Timur Tabi <timur@...i.org>
CC:	"J. German Rivera" <German.Rivera@...escale.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Arnd Bergmann <arnd@...db.de>,
	lkml <linux-kernel@...r.kernel.org>,
	<stuart.yoder@...escale.com>,
	Kim Phillips <Kim.Phillips@...escale.com>,
	Alexander Graf <agraf@...e.de>,
	<linuxppc-release@...ux.freescale.net>
Subject: Re: [PATCH 3/3 v2] drivers/bus: Device driver for FSL-MC DPRC
 devices

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@...escale.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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ