From: Tejun Heo <tj@kernel.org>
To: Rakib Mullick <rakib.mullick@gmail.com>
Cc: axboe@kernel.dk, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] block: Mark virtio_blk with __refdata in virtio_blk.c
Date: Fri, 17 Jul 2009 15:02:27 +0900 [thread overview]
Message-ID: <4A6013F3.1030101@kernel.org> (raw)
In-Reply-To: <b9df5fa10907120413l21761e1cxfc26436481954c2a@mail.gmail.com>
Hello,
Rakib Mullick wrote:
> Impact: Fix false positive warning.
>
> The variable virtio_blk references the function virtblk_probe() (which
> is in .devinit section) and also references the function
> virtblk_remove() ( which is in .devexit section). So, virtio_blk
> simultaneously refers .devinit and .devexit section. To avoid this
> messup, we mark virtio_blk as __refdata.
>
> We were warned by the following warning:
>
> LD drivers/block/built-in.o
> WARNING: drivers/block/built-in.o(.data+0xc8dc): Section mismatch in
> reference from the variable virtio_blk to the function
> .devinit.text:virtblk_probe()
> The variable virtio_blk references
> the function __devinit virtblk_probe()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
>
> WARNING: drivers/block/built-in.o(.data+0xc8e0): Section mismatch in
> reference from the variable virtio_blk to the function
> .devexit.text:virtblk_remove()
> The variable virtio_blk references
> the function __devexit virtblk_remove()
> If the reference is valid then annotate the
> variable with __exit* (see linux/init.h) or name the variable:
> *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
> Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
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.
Thanks.
--
tejun
next prev parent reply other threads:[~2009-07-17 6:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-12 11:13 [PATCH] block: Mark virtio_blk with __refdata in virtio_blk.c Rakib Mullick
2009-07-17 6:02 ` Tejun Heo [this message]
2009-07-17 14:13 ` Rakib Mullick
2009-07-19 1:48 ` Tejun Heo
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=4A6013F3.1030101@kernel.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=rakib.mullick@gmail.com \
/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