All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: kernel-janitors@lists.osdl.org, kjhall@us.ibm.com, akpm@osdl.org,
	benh@kernel.crashing.org, maxk@qualcomm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [KJ] [PATCH] Correct misc_register return code handling
Date: Mon, 23 Oct 2006 17:39:24 +0000	[thread overview]
Message-ID: <1161625164.21701.18.camel@localhost.localdomain> (raw)
In-Reply-To: <20061023171910.GA23714@hmsreliant.homelinux.net>

Ar Llu, 2006-10-23 am 13:19 -0400, ysgrifennodd Neil Horman:
> +	for_each_online_node(node) {
> +		if(timers[node] != NULL)
> +			kfree(timers[node]);
> +	}

The if test appears to be redundant as kfree(NULL) is a valid no-op.

> +	if (misc_register(&hp_sdc_rtc_dev) != 0)
> +		printk(KERN_INFO "Could not register misc. dev for sdc\n");

Many users will misconstrue this has a hard disk name - is there a
better name to use.

>  	if (ret)
>  		printk(KERN_ERR "tun: Can't register misc device %d\n", TUN_MINOR);

These all really show that we should pass the name into the misc
register and do the printk there to cut down on random name variants and
kernel size. Separate problem, just noting it in case someone feels
inspired 8)

Alan

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

WARNING: multiple messages have this Message-ID (diff)
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: kernel-janitors@lists.osdl.org, kjhall@us.ibm.com, akpm@osdl.org,
	benh@kernel.crashing.org, maxk@qualcomm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [KJ][PATCH] Correct misc_register return code handling in several drivers
Date: Mon, 23 Oct 2006 18:39:24 +0100	[thread overview]
Message-ID: <1161625164.21701.18.camel@localhost.localdomain> (raw)
In-Reply-To: <20061023171910.GA23714@hmsreliant.homelinux.net>

Ar Llu, 2006-10-23 am 13:19 -0400, ysgrifennodd Neil Horman:
> +	for_each_online_node(node) {
> +		if(timers[node] != NULL)
> +			kfree(timers[node]);
> +	}

The if test appears to be redundant as kfree(NULL) is a valid no-op.

> +	if (misc_register(&hp_sdc_rtc_dev) != 0)
> +		printk(KERN_INFO "Could not register misc. dev for sdc\n");

Many users will misconstrue this has a hard disk name - is there a
better name to use.

>  	if (ret)
>  		printk(KERN_ERR "tun: Can't register misc device %d\n", TUN_MINOR);

These all really show that we should pass the name into the misc
register and do the printk there to cut down on random name variants and
kernel size. Separate problem, just noting it in case someone feels
inspired 8)

Alan


  reply	other threads:[~2006-10-23 17:39 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-23 17:19 [KJ] [PATCH] Correct misc_register return code handling in several Neil Horman
2006-10-23 17:19 ` [KJ][PATCH] Correct misc_register return code handling in several drivers Neil Horman
2006-10-23 17:39 ` Alan Cox [this message]
2006-10-23 17:39   ` Alan Cox
2006-10-23 17:54   ` [KJ] [PATCH] Correct misc_register return code handling in Neil Horman
2006-10-23 17:54     ` [KJ][PATCH] Correct misc_register return code handling in several drivers Neil Horman
2006-10-23 18:23     ` [KJ] [PATCH] Correct misc_register return code handling Kylene Jo Hall
2006-10-23 18:23       ` [KJ][PATCH] Correct misc_register return code handling in several drivers Kylene Jo Hall
2006-10-23 19:18     ` [KJ] [PATCH] Correct misc_register return code handling Alan Cox
2006-10-23 19:18       ` [KJ][PATCH] Correct misc_register return code handling in several drivers Alan Cox
2006-10-23 18:01 ` [KJ] [PATCH] Correct misc_register return code handling in Dan Carpenter
2006-10-23 18:01   ` [KJ] [PATCH] Correct misc_register return code handling in several drivers Dan Carpenter
2006-10-23 18:13   ` [KJ] [PATCH] Correct misc_register return code handling in Neil Horman
2006-10-23 18:13     ` [KJ] [PATCH] Correct misc_register return code handling in several drivers Neil Horman
2006-10-23 18:32     ` [KJ] [PATCH] Correct misc_register return code handling in Dan Carpenter
2006-10-23 18:32       ` [KJ] [PATCH] Correct misc_register return code handling in several drivers Dan Carpenter
2006-10-23 18:44       ` [KJ] [PATCH] Correct misc_register return code handling in Neil Horman
2006-10-23 18:44         ` [KJ] [PATCH] Correct misc_register return code handling in several drivers Neil Horman
2006-10-23 19:42 ` [KJ] [PATCH] Correct misc_register return code handling in Håkon Løvdal
2006-10-24  3:34 ` [KJ] [PATCH] Correct misc_register return code handling Benjamin Herrenschmidt
2006-10-24  3:34   ` [KJ][PATCH] Correct misc_register return code handling in several drivers Benjamin Herrenschmidt
2006-10-24 12:53   ` [KJ] [PATCH] Correct misc_register return code handling in Neil Horman
2006-10-24 12:53     ` [KJ][PATCH] Correct misc_register return code handling in several drivers Neil Horman
2006-10-24 13:24     ` [KJ] [PATCH] Correct misc_register return code handling in Matthew Wilcox
2006-10-24 13:24       ` [KJ] [PATCH] Correct misc_register return code handling in several drivers Matthew Wilcox
2006-10-24 15:07       ` [KJ] [PATCH] Correct misc_register return code handling in Neil Horman
2006-10-24 15:07         ` [KJ] [PATCH] Correct misc_register return code handling in several drivers Neil Horman
2006-10-24 22:42     ` [KJ] [PATCH] Correct misc_register return code handling Benjamin Herrenschmidt
2006-10-24 22:42       ` [KJ][PATCH] Correct misc_register return code handling in several drivers Benjamin Herrenschmidt
2006-10-25 13:17       ` [KJ] [PATCH] Correct misc_register return code handling in Neil Horman
2006-10-25 13:17         ` [KJ][PATCH] Correct misc_register return code handling in several drivers Neil Horman
2006-11-01 13:56       ` [KJ] [PATCH] Correct misc_register return code handling in Neil Horman
2006-11-01 13:56         ` [KJ][PATCH] Correct misc_register return code handling in several drivers Neil Horman
2006-11-01 23:55         ` [KJ] [PATCH] Correct misc_register return code handling in Andrew Morton
2006-11-01 23:55           ` [KJ][PATCH] Correct misc_register return code handling in several drivers Andrew Morton
2006-11-02 14:21           ` [KJ] [PATCH] Correct misc_register return code handling in Neil Horman
2006-11-02 14:21             ` [KJ][PATCH] Correct misc_register return code handling in several drivers Neil Horman
2006-11-02  0:05         ` [KJ] [PATCH] Correct misc_register return code handling in Jesper Juhl
2006-11-02  0:05           ` [KJ][PATCH] Correct misc_register return code handling in several drivers Jesper Juhl
2006-11-02  0:11           ` [KJ] [PATCH] Correct misc_register return code handling in Randy Dunlap
2006-11-02  0:11             ` [KJ][PATCH] Correct misc_register return code handling in several drivers Randy Dunlap
2006-11-02  0:24             ` [KJ] [PATCH] Correct misc_register return code handling in Jesper Juhl
2006-11-02  0:24               ` [KJ][PATCH] Correct misc_register return code handling in several drivers Jesper Juhl
2006-11-02  0:27             ` [KJ] [PATCH] Correct misc_register return code handling in Andrew Morton
2006-11-02  0:27               ` [KJ][PATCH] Correct misc_register return code handling in several drivers Andrew Morton
2006-11-02  0:44               ` [KJ] [PATCH] Correct misc_register return code handling in Jesper Juhl
2006-11-02  0:44                 ` [KJ][PATCH] Correct misc_register return code handling in several drivers Jesper Juhl
2006-11-02  1:12                 ` [KJ] [PATCH] Correct misc_register return code handling in Randy Dunlap
2006-11-02  1:12                   ` [KJ][PATCH] Correct misc_register return code handling in several drivers Randy Dunlap
2006-11-02  1:23                   ` [KJ] [PATCH] Correct misc_register return code handling in Jesper Juhl
2006-11-02  1:23                     ` [KJ][PATCH] Correct misc_register return code handling in several drivers Jesper Juhl
2006-11-02  1:22                     ` [KJ] [PATCH] Correct misc_register return code handling in Randy Dunlap
2006-11-02  1:22                       ` [KJ][PATCH] Correct misc_register return code handling in several drivers Randy Dunlap
2006-11-15  0:04                       ` [KJ] [PATCH] Correct misc_register return code handling in Randy Dunlap
2006-11-15  0:04                         ` [KJ][PATCH] Correct misc_register return code handling in several drivers Randy Dunlap
2006-11-15  9:05                         ` [KJ] [PATCH] Correct misc_register return code handling in Jesper Juhl
2006-11-15  9:05                           ` [KJ][PATCH] Correct misc_register return code handling in several drivers Jesper Juhl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1161625164.21701.18.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=kjhall@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxk@qualcomm.com \
    --cc=nhorman@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.