Re: [PATCH] block: Mark virtio_blk with __refdata in virtio_blk.c

From: Rakib Mullick
Date: Fri Jul 17 2009 - 10:13:36 EST


On 7/17/09, Tejun Heo <tj@xxxxxxxxxx> 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@xxxxxxxxx>

--- 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,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/