From: Douglas Gilbert <dougg@torque.net>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, rml@tech9.net
Subject: Re: [patch] scsi-sysfs bug fix
Date: Thu, 20 Mar 2003 09:56:19 +1000 [thread overview]
Message-ID: <3E7903A3.2000906@torque.net> (raw)
Robert Love wrote:
> drivers/scsi/scsi_sysfs.c :: store_rescan_field() calls
> scsi_rescan_device() without a prototype, and thus results
> in a compiler warning.
>
> Fix that up by adding the prototype to scsi.h, where it belongs.
> But then we see we are storing the return value of a void function
> (so that is why ANSI C is good)... so fix that up, too, by setting
> the return value to zero if a valid device was found. Otherwise,
> return ENODEV as before.
>
> Patch is against 2.5.65.
Christoph Hellwig sent a patch for this to the linux-scsi
list. Both patches have the same minor problem. Sysfs
store() callbacks are supposed to return the count of
bytes consumed. It's a moot point in this case since there
is no sscanf() processing. To use this code I can get
to the appropriate sysfs directory and write:
# echo "anything_I_like" > rescan
So are all bytes in that string consumed? If so the "ret = 0;"
line in your patch should be "ret = count;".
Doug Gilbert
next reply other threads:[~2003-03-19 23:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-19 23:56 Douglas Gilbert [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-03-19 20:51 [patch] scsi-sysfs bug fix Robert Love
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=3E7903A3.2000906@torque.net \
--to=dougg@torque.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@tech9.net \
/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.