public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: "Nelson, Shannon" <shannon.nelson@intel.com>,
	Rusty Russell <rusty@rustcorp.com.au>
Cc: Gabriel C <nix.or.die@googlemail.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: __unsafe() usage
Date: Mon, 23 Jul 2007 19:59:27 +0200	[thread overview]
Message-ID: <20070723175927.GM26212@stusta.de> (raw)
In-Reply-To: <BAE9DCEF64577A439B3A37F36F9B691C02B820A3@orsmsx418.amr.corp.intel.com>

On Mon, Jul 23, 2007 at 09:05:54AM -0700, Nelson, Shannon wrote:
> Gabriel C [mailto:nix.or.die@googlemail.com] 
> >
> >Hi,
> >
> >I got this warning on current git using gcc 4.2.1 :
> >
> >...
> >
> >drivers/dma/ioatdma.c: In function 'ioat_init_module':
> >drivers/dma/ioatdma.c:816: warning: the address of 
> >'__this_module' will always evaluate as 'true'
>...

I'm less interested in why this gives a warning, more interesting is the 
code:
        __unsafe(THIS_MODULE);

@Rusty:
As far as I understand it, __unsafe() wasn't intended for such a usage, 
and simply not providing an exit function would be the right solution?
If this is true, and since the MOD_INC_USE_COUNT compat code is long 
gone, shouldn't we be able to completely remove __unsafe() and the 
struct member "unsafe"?

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  parent reply	other threads:[~2007-07-23 18:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <46A3FE3E.20300@googlemail.com>
2007-07-23  1:15 ` drivers/dma/ioatdma.c - address of '__this_module' will always evaluate as 'true' , warning Gabriel C
2007-07-23 16:05 ` Nelson, Shannon
2007-07-23 16:36   ` Gabriel C
2007-07-23 19:17     ` Nelson, Shannon
2007-07-23 17:59   ` Adrian Bunk [this message]
2007-07-23 23:16     ` __unsafe() usage Rusty Russell
2007-07-23 23:40       ` Nelson, Shannon
2007-07-23 23:42       ` Dan Williams
2007-07-24 13:05       ` [Lksctp-developers] " Vlad Yasevich
2007-07-24 22:27         ` Rusty Russell
2007-07-25 14:55           ` Vlad Yasevich

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=20070723175927.GM26212@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nix.or.die@googlemail.com \
    --cc=rusty@rustcorp.com.au \
    --cc=shannon.nelson@intel.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