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:	Wed, 26 Sep 2007 10:58:37 +0200
From:	Joachim Fenkes <FENKES@...ibm.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Christoph Raisch <raisch@...ibm.com>,
	Jan-Bernd Themann <themann@...ibm.com>,
	LKML <linux-kernel@...r.kernel.org>, linuxppc-dev@...abs.org,
	Paul Mackerras <paulus@...ba.org>,
	Paul Mackerras <pmac@....ibm.com>,
	Stefan Roscher <stefan.roscher@...ibm.com>,
	Thomas Q Klein <tklein@...ibm.com>
Subject: Re: [PATCH 3/5] ibmebus: Add device creation and bus probing based on of_device

> > +/* These devices will automatically be added to the bus during init 
*/
> > +static struct of_device_id builtin_matches[] = {
> > +   { .name = "lhca" },
> > +   { .compatible = "IBM,lhca" },
> > +   { .name = "lhea" },
> > +   { .compatible = "IBM,lhea" },
> > +   {},
> > +};
> > +
> 
> Hmm, do you have devices that only have the matching name property
> but not the compatible property? If not, I'd suggest only looking
> for compatible, so you have less chance of false positives.

If a device that's not an lhca is called "lhca", that's its own fault, i 
guess ;) But i concur that looking for the compatible property will 
probably suffice.
 
> > +static int ibmebus_create_device(struct device_node *dn)
> > [...]
> 
> nice!

Thanks.
 
> > -      rc = IS_ERR(dev) ? PTR_ERR(dev) : count;
> > +      rc = rc ? rc : count;
> 
> the last line looks a bit silly. Maybe instead do
> 
>       rc = ibmebus_create_device(dn);
>         of_node_put(dn);
>    }
> 
>    kfree(path);
>    if (rc)
>       return rc;
>    return count;
> }

More code lines? ;) But yes, that looks more like "standard kernel 
pattern" - I'll change that.

Joachim
-
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