Re: return value warnings about scsi_add_host, anything in progre ss?

2005-02-08 Thread Alexander Stohr
Matthew Wilcox wrote:
 I think you misunderstood my point.  megaraid does not produce a warning
 about a missing return check when I compile it with gcc-3.4.  Does it
 warn for you?  If not, why did you include it in the list?

I grepped the whole source tree and discared the locations where
in the very same line the return value got obviousely used for something.
I am not sure right now why megaraid got into the list.
The listing was meant as a summary information where
the described sitatuion might be present as well.
I agree, i should have checked the lines in front of the statement
for every single location, to avoid any false positives. I didnt do that.

-Alex.
-
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: return value warnings about scsi_add_host, anything in progre ss?

2005-02-07 Thread Alexander Stohr
 On Mon, Feb 07, 2005 at 04:10:22PM +, Matthew Wilcox wrote:
  I'm not sure why returning the result doesn't count as a use of the result
  (in the case of megaraid).
  
From: Alexander Stohr [mailto:[EMAIL PROTECTED]

./drivers/scsi/megaraid.c:4890: error = scsi_add_host(host, pdev-dev);
 
 I don't get a warning from this line, using gcc 3.4.4 20041218 (prerelease)
 (Debian 3.4.3-7):
 
 drivers/scsi/megaraid.c: In function `megadev_ioctl':
 drivers/scsi/megaraid.c:3626: warning: ignoring return value of 
 `copy_to_user', declared with attribute warn_unused_result
 
 Were you confused with that warning?

My main concern was the adaptec aic7 and aic9 series,
and i am aware that a one-time loading device should
have good chances to succeed, i dont call it critical for
my particular application case (some few Gigs main memory).

But as the very same problem exists all over the place,
even in USB devices - which can be plugged and unplugged
any now and then. Producing a memory leak of a few 10 
to 100 kB on every plug and remove is nothing really 
acceptable for a system that is expected to have longer uptimes.

So if there are some solutions out there for getting the return
value interpreted and in the error case the device registering 
canceled, then i asked if the respective coders and maintainers 
could pop up for getting thoses messages removed from the 
compiler`s output. Can you please? I just dont want to duplicate
any works here, or much worser code something that no one
with a better understanding would ever integrate into the kernel.

-Alex.
-
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html