public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Joshua Roys <roysjosh@gmail.com>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH] [alsa-devel] Fix a compile warning under gcc-4.2.3.
Date: Thu, 21 Feb 2008 09:48:30 +0100	[thread overview]
Message-ID: <47BD3ADE.8040501@ladisch.de> (raw)
In-Reply-To: <1203528197-24227-1-git-send-email-roysjosh@gmail.com>

Joshua Roys wrote:
> sound/core/init.c: In function ‘snd_card_disconnect’:
> sound/core/init.c:307: warning: the address of ‘snd_shutdown_f_ops’ will always evaluate as ‘true’
>
> Signed-off-by: Joshua Roys <roysjosh@gmail.com>
> ---
>  sound/core/init.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/sound/core/init.c b/sound/core/init.c
> index 2cb7099..1afc58b 100644
> --- a/sound/core/init.c
> +++ b/sound/core/init.c
> @@ -304,7 +304,6 @@ int snd_card_disconnect(struct snd_card *card)
>  		list_add(&mfile->shutdown_list, &shutdown_files);
>  		spin_unlock(&shutdown_lock);
>
> -		fops_get(&snd_shutdown_f_ops);
>  		mfile->file->f_op = &snd_shutdown_f_ops;
>  		
>  		mfile = mfile->next;

This change may get rid of the warning, but is has the slight
disadvantage that the kernel will blow up if you try to unload the sound
modules before all device files have been closed.

If you want to get rid of this warning, tell the compiler that fops_get
knows what it does; or try making fops_get an inline function instead of
a macro.


Regards,
Clemens

  reply	other threads:[~2008-02-21  8:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20 17:23 [PATCH] Fix a compile warning under gcc-4.2.3 Joshua Roys
2008-02-21  8:48 ` Clemens Ladisch [this message]
2008-02-21 11:19   ` [alsa-devel] " Takashi Iwai

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=47BD3ADE.8040501@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roysjosh@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