lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 21 Feb 2008 09:48:30 +0100
From:	Clemens Ladisch <clemens@...isch.de>
To:	Joshua Roys <roysjosh@...il.com>
CC:	linux-kernel@...r.kernel.org, alsa-devel@...a-project.org
Subject: Re: [PATCH] [alsa-devel] Fix a compile warning under gcc-4.2.3.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ