public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gabriel Devenyi <devenyga@mcmaster.ca>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KernelJanitor: Convert remaining error returns to return -E Linux 2.5.68
Date: Tue, 29 Apr 2003 23:08:30 +0000	[thread overview]
Message-ID: <200304292308.30947.devenyga@mcmaster.ca> (raw)
In-Reply-To: <20030429153244.19c32b3c.rddunlap@osdl.org>

Thanks for the suggestions, I'm kinda new at this and just following the TODO 
which unfortuately says "sed s/return EWHATEVER/return -EWHATEVER/". I'll 
work on checking the things you suggested. As for your other questions, the 
kernel did build but I didn't attempt to boot it, I'll be sure to do so in 
the future. Thanks for the encouragement.

P.S. Anyone who works on KernelJanitor, kj.pl is suggesting some of the things 
I'm changing which aparently I shouldn't.

Building the Future,
Gabriel Devenyi
devenyga@mcmaster.ca

On April 29, 2003 10:32 pm, you wrote:
> On Tue, 29 Apr 2003 22:15:20 +0000 Gabriel Devenyi <devenyga@mcmaster.ca> 
wrote:
> | This patch applies to 2.5.68. It converts all the remaining error returns
> | to the new return -E form, this is in the KernelJanitor TODO list.
> |
> | http://muss.mcmaster.ca/~devenyga/patch-linux-2.5.68-return-errors.patch
> |
> | Please CC me with any discussion since I do not subscribe to lkml
> | --
>
> I'd have to say that it really depends on whether the caller can
> handle negative return values.  Did you check/audit the callers too?
>
> If it's a well-defined Unix/Linux error code (like s/ENOMEM/-ENOMEM/),
> this should be made to work (at least in most cases).
>
> And don't change ones that use ERR_PTR, like this:
>
> -		return ERR_PTR(-ENOMEM);
> +		return -ENOMEM;
>
>
> Local variable returns of positive/negative are probably not correct...
> without auditing the callers, it's hard to say.  E.g.:
>
> -	return ErrFlag;
> +	return -ErrFlag;
>
> (same type of change in DAC960 driver)
>
>
> I'm a bit suspicious of:
>
> -	return EOF;
> +	return -EOF;
>
> and
>
> -		return E05;
> +		return -E05;
>
> It's not just a global search & replace...
>
>
> One more thing... did you build and boot that modified kernel?
> If so, did it build with the same number or fewer warnings than the
> unmodified version?
>
> --
> ~Randy

-- 

  reply	other threads:[~2003-04-29 22:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-29 22:15 [PATCH] KernelJanitor: Convert remaining error returns to return -E Linux 2.5.68 Gabriel Devenyi
2003-04-29 22:32 ` Randy.Dunlap
2003-04-29 23:08   ` Gabriel Devenyi [this message]
2003-04-30  0:22     ` Dave Jones
2003-04-29 22:42 ` viro
2003-04-29 23:11   ` Gabriel Devenyi
2003-05-05 22:11     ` Pavel Machek
2003-05-05 22:22       ` viro
2003-05-05 22:33         ` Martin Mares
  -- strict thread matches above, loose matches on Subject: below --
2003-04-29 23:11 Randy.Dunlap
2003-04-30  0:02 ` viro
2003-04-30  0:25   ` John Levon
2003-04-30 14:19   ` Dave Kleikamp
2003-05-01  4:12   ` Randy.Dunlap

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=200304292308.30947.devenyga@mcmaster.ca \
    --to=devenyga@mcmaster.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox