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=-6.9 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 74982C07E85 for ; Tue, 11 Dec 2018 08:14:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 41B1E20811 for ; Tue, 11 Dec 2018 08:14:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41B1E20811 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 S1726135AbeLKIOn (ORCPT ); Tue, 11 Dec 2018 03:14:43 -0500 Received: from mx2.suse.de ([195.135.220.15]:55902 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726036AbeLKIOm (ORCPT ); Tue, 11 Dec 2018 03:14:42 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D1496AE04; Tue, 11 Dec 2018 08:14:40 +0000 (UTC) Date: Tue, 11 Dec 2018 09:14:39 +0100 Message-ID: From: Takashi Iwai To: "Arnd Bergmann" Cc: "Connor McAdams" , "Jaroslav Kysela" , "Takashi Sakamoto" , , "Alastair Bridgewater" , Subject: Re: [PATCH] ALSA: hda/ca0132 - make pci_iounmap() call conditional In-Reply-To: <20181210205445.2913413-1-arnd@arndb.de> References: <20181210205445.2913413-1-arnd@arndb.de> 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 Mon, 10 Dec 2018 21:54:25 +0100, Arnd Bergmann wrote: > > When building without CONFIG_PCI, we can (depending on the architecture) > get a link failure: > > ERROR: "pci_iounmap" [sound/pci/hda/snd-hda-codec-ca0132.ko] undefined! > > Adding a compile-time check for PCI gets it to work correctly on > 32-bit ARM. > > Signed-off-by: Arnd Bergmann The proper "fix" would be to make this working for SH no matter which config is... But pci_iomap and pci_iounmap() are such a mess, and no one really cares about SH nowadays, so I'd take this easier way. thanks, Takashi > --- > sound/pci/hda/patch_ca0132.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c > index c40cb6336017..e5bdbc245682 100644 > --- a/sound/pci/hda/patch_ca0132.c > +++ b/sound/pci/hda/patch_ca0132.c > @@ -8451,7 +8451,7 @@ static void ca0132_free(struct hda_codec *codec) > ca0132_exit_chip(codec); > > snd_hda_power_down(codec); > - if (spec->mem_base) > + if (IS_ENABLED(CONFIG_PCI) && spec->mem_base) > pci_iounmap(codec->bus->pci, spec->mem_base); > kfree(spec->spec_init_verbs); > kfree(codec->spec); > -- > 2.20.0 > >