lkml.org 
[lkml]   [2009]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH] block: Mark virtio_blk with __refdata in virtio_blk.c
From
On 7/17/09, Tejun Heo <tj@kernel.org> wrote:
> Hello,
>
> Generally looks good to me.
>
>
> > +/* We were warned by false positive warning, so __refdata comes into rescue. */
> > +static struct virtio_driver __refdata virtio_blk = {
>
>
> But it would be nicer if the comment contains a bit more of detail.
> Can you please beef it up a bit? After that I'll queue it in my temp
> tree and send to Linus' way.
>
Ok. Assuming that changelog is ok. I'm just sending the patch here
with a beefed up comment. Hopefully everyone will like it. If not or
if requires resend please notice.

Thanks,

----
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>

--- linus/drivers/block/virtio_blk.c 2009-07-17 21:07:40.000000000 +0600
+++ rakib/drivers/block/virtio_blk.c 2009-07-17 21:14:36.000000000 +0600
@@ -424,7 +424,13 @@ static unsigned int features[] = {
VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY
};

-static struct virtio_driver virtio_blk = {
+/*
+ * virtio_blk messes up by simultaneously refering to a __devinit and
+ * a __devexit function. Which causes a false positive warning. So we
+ * use __refdata to avoid this warning.
+ */
+
+static struct virtio_driver __refdata virtio_blk = {
.feature_table = features,
.feature_table_size = ARRAY_SIZE(features),
.driver.name = KBUILD_MODNAME,

\
 
 \ /
  Last update: 2009-07-17 16:15    [W:0.048 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site