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] [day] [month] [year] [list]
Date:	Mon, 22 Jan 2007 11:56:24 -0800
From:	Andrew Morton <akpm@...l.org>
To:	Ben Dooks <ben@...nity.fluff.org>
Cc:	rpurdie@...ys.net, ben-linux@...ff.org,
	linux-kernel@...r.kernel.org
Subject: Re: LEDS: S3C24XX generate name if none given

> On Mon, 15 Jan 2007 15:42:21 +0000 Ben Dooks <ben@...nity.fluff.org> wrote:
> On Mon, Jan 15, 2007 at 01:44:28PM +0000, Richard Purdie wrote:
> > On Mon, 2007-01-15 at 12:26 +0000, Ben Dooks wrote:
> > > Generate a name if none is passed to the S3C24XX GPIO LED driver.

Wouldn't it be better to fix the callers to consistently pass in a name
rather than hacking around fixing stuff up in the callee?

> +	/* create name if we were not passed one */
> +
> +	if (led->cdev.name == NULL) {
> +		char name[64];
> +
> +		snprintf(name, sizeof(name), "%s.%d",  dev->name, dev->id);
> +		led->cdev.name = kstrdup(name);
> +	}
> +

Take a peek at kasprintf() ;)

Please include full-and-fresh changelog in each iteration of a patch, so
poor patch-takers don't have to go making one up for you, thanks.
-
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