From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752222Ab1BUX52 (ORCPT ); Mon, 21 Feb 2011 18:57:28 -0500 Received: from smtp-out3.tiscali.nl ([195.241.79.178]:52504 "EHLO smtp-out3.tiscali.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974Ab1BUX5Y (ORCPT ); Mon, 21 Feb 2011 18:57:24 -0500 Subject: snd_intel8x0m: error message because return value is unused? From: Paul Bolle To: linux-kernel@vger.kernel.org Date: Tue, 22 Feb 2011 00:57:22 +0100 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 2.91.5 (2.91.5-4.fc15) Content-Transfer-Encoding: 7bit Message-ID: <1298332643.11571.21.camel@t41.thuisdomein> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 0) In order to make a laptop run without error messages (ie, printks at KERN_ERR level) I had to look at an error generated by snd_intel8x0m: ALSA intel8x0m.c:904: AC'97 warm reset still in progress? [0x2] 1) There's a datasheet one can study to understand that message. But that seems not necessary here. It all boils down to the fact that this test: if ((igetdword(chip, ICHREG(GLOB_CNT)) & ICH_AC97WARM) == 0) goto __ok; will always fail so we'll never go to __ok and finally that error will be printed. But if I simply change it into: cnt = igetdword(chip, ICHREG(GLOB_CNT)); if ((cnt & ICH_AC97WARM) == 0) goto __ok; this test will (always) succeed, we'll go to __ok and no error message will be printed. So apparently, the error message was just a false alarm. 2) Before I submit a (trivial) patch to fix this I'd like to better understand what is going on here: is this standard C behavior, something the build system asks the compiler to do, or maybe something else? Paul Bolle