From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78B1FC32789 for ; Tue, 6 Nov 2018 16:18:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 466C72081D for ; Tue, 6 Nov 2018 16:18:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 466C72081D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389276AbeKGBos (ORCPT ); Tue, 6 Nov 2018 20:44:48 -0500 Received: from mx2.suse.de ([195.135.220.15]:36320 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387685AbeKGBos (ORCPT ); Tue, 6 Nov 2018 20:44:48 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DBF80B6DB; Tue, 6 Nov 2018 16:18:49 +0000 (UTC) Date: Tue, 06 Nov 2018 17:18:49 +0100 Message-ID: From: Takashi Iwai To: Randy Dunlap Cc: Geert Uytterhoeven , Linux Kernel Mailing List , linux-s390 , ALSA Development Mailing List , linuxppc-dev Subject: Re: [alsa-devel] Build regressions/improvements in v4.20-rc1 (sound/pci/hda/patch_ca0132.c) In-Reply-To: <80f2f98b-9ab1-2a1c-0962-63e3be1dd742@infradead.org> References: <20181105220559.27458-1-geert@linux-m68k.org> <80f2f98b-9ab1-2a1c-0962-63e3be1dd742@infradead.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/26 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 06 Nov 2018 02:04:47 +0100, Randy Dunlap wrote: > > On 11/5/18 2:12 PM, Geert Uytterhoeven wrote: > > On Mon, Nov 5, 2018 at 11:07 PM Geert Uytterhoeven wrote: > >> Below is the list of build error/warning regressions/improvements in > >> v4.20-rc1[1] compared to v4.19[2]. > >> > >> Summarized: > >> - build errors: +3/-0 > >> - build warnings: +449/-2712 > >> > >> Happy fixing! ;-) > >> > >> Thanks to the linux-next team for providing the build service. > >> > >> [1] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/651022382c7f8da46cb4872a545ee1da6d097d2a/ (all 240 configs) > >> [2] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d/ (all 240 configs) > >> > >> > >> *** ERRORS *** > >> > >> + /kisskb/src/sound/pci/hda/patch_ca0132.c: error: implicit declaration of function 'pci_iomap' [-Werror=implicit-function-declaration]: => 8799:3 > > > > sh4-all{mod,yes}config > > > > Looks like d9b84a15892c0233 ("ALSA: hda: Fix implicit definition of > > pci_iomap() on SH") > > is not sufficient? > > Different problem. This is about "select": > > config SND_SOC_ALL_CODECS > tristate "Build all ASoC CODEC drivers" > > That enables (sets): > select SND_SOC_HDAC_HDA > which selects SND_HDA even though CONFIG_PCI is not enabled. Actually it is OK to enable CONFIG_SND_HDA_CODEC_CA0132 without CONFIG_PCI. IIRC, there was a system like that, too. The commit above should have covered the build failure on SH, but apparently isn't enough for some arch setups, as it seems. The cause is clear now: pci_iomap() is defined in asm-generic/pci_iomap.h only when CONFIG_GENERIC_PCI_IOMAP is defined. Including asm/io.h doesn't help unless CONFIG_PCI is set. Below is a quick fix for this. thanks, Takashi -- 8< -- From: Takashi Iwai Subject: [PATCH] ALSA: hda/ca0132 - Yet more fix on build breakage without PCI support The recent change in CA0132 codec driver for supporting more Creative boards includes the pci_iomap() call to get the extra register accesses. This is supposed to work on all archs and setups, by the implicit assumption that every arch would provide a dummy function returning NULL when no PCI is available. But the reality bites, of course; as Geert's regular build test shows, some configs (at least SH4 without CONFIG_PCI) leads to a build error due to the implicit function declaration. So this is another attempt to fix the issue: now we add an ifdef CONFIG_PCI line, so that pci_iomap() won't be called unless PCI is really usable. This should fall back to the standard quirk again with a warning. Fixes: d9b84a15892c0233 ("ALSA: hda: Fix implicit definition of pci_iomap() on SH") Reported-by: Geert Uytterhoeven Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_ca0132.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 0a24037184c3..9ed808b45e75 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -8796,7 +8796,13 @@ static int patch_ca0132(struct hda_codec *codec) } if (spec->use_pci_mmio) { + /* + * ifdef below needed due to lack of pci_iomap() decleration + * for some archs when no PCI is defined + */ +#ifdef CONFIG_PCI spec->mem_base = pci_iomap(codec->bus->pci, 2, 0xC20); +#endif if (spec->mem_base == NULL) { codec_warn(codec, "pci_iomap failed! Setting quirk to QUIRK_NONE."); spec->quirk = QUIRK_NONE; -- 2.19.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6ED55C32789 for ; Tue, 6 Nov 2018 16:20:54 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CB4392081D for ; Tue, 6 Nov 2018 16:20:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB4392081D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42qFCR5NxxzF3F0 for ; Wed, 7 Nov 2018 03:20:51 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=suse.de (client-ip=195.135.220.15; helo=mx1.suse.de; envelope-from=tiwai@suse.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42qF9J3p6VzF3Cp for ; Wed, 7 Nov 2018 03:18:53 +1100 (AEDT) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DBF80B6DB; Tue, 6 Nov 2018 16:18:49 +0000 (UTC) Date: Tue, 06 Nov 2018 17:18:49 +0100 Message-ID: From: Takashi Iwai To: Randy Dunlap Subject: Re: [alsa-devel] Build regressions/improvements in v4.20-rc1 (sound/pci/hda/patch_ca0132.c) In-Reply-To: <80f2f98b-9ab1-2a1c-0962-63e3be1dd742@infradead.org> References: <20181105220559.27458-1-geert@linux-m68k.org> <80f2f98b-9ab1-2a1c-0962-63e3be1dd742@infradead.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/26 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390 , ALSA Development Mailing List , linuxppc-dev , Geert Uytterhoeven , Linux Kernel Mailing List Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, 06 Nov 2018 02:04:47 +0100, Randy Dunlap wrote: > > On 11/5/18 2:12 PM, Geert Uytterhoeven wrote: > > On Mon, Nov 5, 2018 at 11:07 PM Geert Uytterhoeven wrote: > >> Below is the list of build error/warning regressions/improvements in > >> v4.20-rc1[1] compared to v4.19[2]. > >> > >> Summarized: > >> - build errors: +3/-0 > >> - build warnings: +449/-2712 > >> > >> Happy fixing! ;-) > >> > >> Thanks to the linux-next team for providing the build service. > >> > >> [1] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/651022382c7f8da46cb4872a545ee1da6d097d2a/ (all 240 configs) > >> [2] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d/ (all 240 configs) > >> > >> > >> *** ERRORS *** > >> > >> + /kisskb/src/sound/pci/hda/patch_ca0132.c: error: implicit declaration of function 'pci_iomap' [-Werror=implicit-function-declaration]: => 8799:3 > > > > sh4-all{mod,yes}config > > > > Looks like d9b84a15892c0233 ("ALSA: hda: Fix implicit definition of > > pci_iomap() on SH") > > is not sufficient? > > Different problem. This is about "select": > > config SND_SOC_ALL_CODECS > tristate "Build all ASoC CODEC drivers" > > That enables (sets): > select SND_SOC_HDAC_HDA > which selects SND_HDA even though CONFIG_PCI is not enabled. Actually it is OK to enable CONFIG_SND_HDA_CODEC_CA0132 without CONFIG_PCI. IIRC, there was a system like that, too. The commit above should have covered the build failure on SH, but apparently isn't enough for some arch setups, as it seems. The cause is clear now: pci_iomap() is defined in asm-generic/pci_iomap.h only when CONFIG_GENERIC_PCI_IOMAP is defined. Including asm/io.h doesn't help unless CONFIG_PCI is set. Below is a quick fix for this. thanks, Takashi -- 8< -- From: Takashi Iwai Subject: [PATCH] ALSA: hda/ca0132 - Yet more fix on build breakage without PCI support The recent change in CA0132 codec driver for supporting more Creative boards includes the pci_iomap() call to get the extra register accesses. This is supposed to work on all archs and setups, by the implicit assumption that every arch would provide a dummy function returning NULL when no PCI is available. But the reality bites, of course; as Geert's regular build test shows, some configs (at least SH4 without CONFIG_PCI) leads to a build error due to the implicit function declaration. So this is another attempt to fix the issue: now we add an ifdef CONFIG_PCI line, so that pci_iomap() won't be called unless PCI is really usable. This should fall back to the standard quirk again with a warning. Fixes: d9b84a15892c0233 ("ALSA: hda: Fix implicit definition of pci_iomap() on SH") Reported-by: Geert Uytterhoeven Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_ca0132.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 0a24037184c3..9ed808b45e75 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -8796,7 +8796,13 @@ static int patch_ca0132(struct hda_codec *codec) } if (spec->use_pci_mmio) { + /* + * ifdef below needed due to lack of pci_iomap() decleration + * for some archs when no PCI is defined + */ +#ifdef CONFIG_PCI spec->mem_base = pci_iomap(codec->bus->pci, 2, 0xC20); +#endif if (spec->mem_base == NULL) { codec_warn(codec, "pci_iomap failed! Setting quirk to QUIRK_NONE."); spec->quirk = QUIRK_NONE; -- 2.19.1