Re: [PATCH] kobject_add: use constant strings directly as fmtstrings

From: Greg KH
Date: Wed Nov 19 2008 - 11:01:19 EST


On Wed, Nov 19, 2008 at 11:54:19PM +0800, crquan@xxxxxxxxx wrote:
> From: Cheng Renquan <crquan@xxxxxxxxx>
>
> Signed-off-by: Cheng Renquan <crquan@xxxxxxxxx>
> ---
> block/blk-sysfs.c | 2 +-
> block/elevator.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
> index 21e275d..0b189e9 100644
> --- a/block/blk-sysfs.c
> +++ b/block/blk-sysfs.c
> @@ -342,7 +342,7 @@ int blk_register_queue(struct gendisk *disk)
> return 0;
>
> ret = kobject_add(&q->kobj, kobject_get(&disk_to_dev(disk)->kobj),
> - "%s", "queue");
> + "queue");

Why? What does this change buy us?

thanks,

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