Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1916643ybi; Thu, 18 Jul 2019 00:17:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyv0SpB9Mlf/bQmwi5bz3iMA8QH6Gbm3zxoh1nzoMVkv5CfECfSSekQaM773gupwjBMNRKe X-Received: by 2002:a63:6154:: with SMTP id v81mr14264908pgb.296.1563434240378; Thu, 18 Jul 2019 00:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563434240; cv=none; d=google.com; s=arc-20160816; b=W2rtVIvVAHdKGMgoM3N1Yy8YLXdmNb3taXjw2DrXjgv9Bimvrsczpo0Aly/snv+Q1l 5mOw0aLqz4Qp1xzRJWgXCgoEktUBpCfAWGgO7CtVwhHvnbVsx31p4qP079uLRVPSbZVA Jm5sA3oyabvgydqike+n0d1SK1L60hQzxa1pei80rrrgHu20U+dObLrf0/YeqhLVt2W0 IXHKpjWTqgu9X6Xk9YTwfI++r6Mr3C66w/yEQRW06aHPlGjF4ml6Uiqg2toPeW0Q4fp4 CpOzmLUkW0euJZKN51PZlqoV3rVqU0MowFLniqKHCLg8HR+XMCEICbdhTnGB5Rci90vK VKWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=RR4IHlcwE85yecXmrTCej2oXAVqCKbGwHCp8nhmDW4Y=; b=QlMb0sxbOO4pbniv36cMCRhmEFdtT4ncTHoxUN3Ikol781dHA9y893ZIoXzs6Tmwil fxhZNadviXx0EF0CQvdMNyKWNGubbWIyGD0f3akPkwqEhPlhfK8glw/0IBBSdsq076H6 QOsomXcrRNAirXdzobYoMx8wnNO06lbHuI6KCuravdY7Eq+L5kyNNoohQ/N24mI5Uly0 5j/21VIexU7o0PzbDgAABUB5sPcWPR/xeIWxJ+zjOZjyMsa0Xeol/f8nWwhqojGRG2sT uVcplqROApmkexMBAm+b+0WCL9D0yliKspqLHqHC6mnUYOWeEZRiUjmj7P0Wb235fOUh VIxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14si761133pgc.244.2019.07.18.00.17.03; Thu, 18 Jul 2019 00:17:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727131AbfGRHQR (ORCPT + 99 others); Thu, 18 Jul 2019 03:16:17 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:33301 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbfGRHQR (ORCPT ); Thu, 18 Jul 2019 03:16:17 -0400 Received: by mail-qt1-f193.google.com with SMTP id r6so21926247qtt.0; Thu, 18 Jul 2019 00:16:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RR4IHlcwE85yecXmrTCej2oXAVqCKbGwHCp8nhmDW4Y=; b=NKn3GtkYQlsABVSCpr7uTadbRTuivVx4YRC51zbUB2eb8X12hpTE2Afdpd7mcghqHv +LE9zURAgJHkwBYsI3pTNjXdQqTwgVC71S6R6KlIn7s+h+uFTY0g8ofTEVJHDH4B5BvQ L83PU+bys5zbIqQi/yVLKJpHUEUhYhILRZIOXGjvudRI5Y9qltGR58lDQi3FUqSaWB47 CDtVhr4ToCIO9SqIHm5RoMPSkGI1Dlk7gIu2ute0meXXgzePshdQgqTKjcg0dxkCaEv8 Ziy8epIigKBHOIoxp2GA38XPiwTn/irI3E0GTYFac/NKWR2thQP9mfrA1DVPQUuW5IdJ QQLA== X-Gm-Message-State: APjAAAXL9zmWoYGPuWF7K/fbMVGfhXrtRtN9sdz1fQyTksvQhkzfHxAk vcCzkjRqZSgOPznNJfNUEUcymhClrypVq/YC0QU= X-Received: by 2002:aed:3e7c:: with SMTP id m57mr31097101qtf.204.1563434176445; Thu, 18 Jul 2019 00:16:16 -0700 (PDT) MIME-Version: 1.0 References: <20190718020654.39860-1-yuehaibing@huawei.com> In-Reply-To: <20190718020654.39860-1-yuehaibing@huawei.com> From: Arnd Bergmann Date: Thu, 18 Jul 2019 09:15:59 +0200 Message-ID: Subject: Re: [PATCH] Input: applespi: Fix build error without CONFIG_PCI To: YueHaibing Cc: Dmitry Torokhov , Hartley Sweeten , Rob Herring , ronald@innovation.ch, Andy Shevchenko , Linux Kernel Mailing List , "open list:HID CORE LAYER" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 18, 2019 at 4:07 AM YueHaibing wrote: > > If CONFIG_KEYBOARD_APPLESPI is set to y, but > CONFIG_PCI is not set, building will fails: > > drivers/spi/spi-pxa2xx-pci.c: In function pxa2xx_spi_pci_probe: > drivers/spi/spi-pxa2xx-pci.c:208:8: error: implicit declaration of function pcim_enable_device; > did you mean pci_enable_device? [-Werror=implicit-function-declaration] > ret = pcim_enable_device(dev); > ^~~~~~~~~~~~~~~~~~ > pci_enable_device > drivers/spi/spi-pxa2xx-pci.c:239:8: error: implicit declaration of function pci_alloc_irq_vectors; > did you mean pci_alloc_consistent? [-Werror=implicit-function-declaration] > ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES); > ^~~~~~~~~~~~~~~~~~~~~ > > Make CONFIG_KEYBOARD_APPLESPI depends on CONFIG_PCI > to fix this. > > Reported-by: Hulk Robot > Fixes: b426ac045209 ("Input: add Apple SPI keyboard and trackpad driver") > Signed-off-by: YueHaibing I found the same build bug, plus another issue: arch/arm/Kconfig:1942:error: recursive dependency detected! arch/arm/Kconfig:1942: symbol XIP_KERNEL depends on KASAN lib/Kconfig.kasan:15: symbol KASAN depends on SYSFS fs/sysfs/Kconfig:2: symbol SYSFS is selected by CONFIGFS_FS fs/configfs/Kconfig:2: symbol CONFIGFS_FS is selected by USB_LIBCOMPOSITE drivers/usb/gadget/Kconfig:145: symbol USB_LIBCOMPOSITE is selected by USB_ZERO drivers/usb/gadget/legacy/Kconfig:17: symbol USB_ZERO is part of choice drivers/usb/gadget/Kconfig:486: choice contains symbol USB_G_WEBCAM drivers/usb/gadget/legacy/Kconfig:479: symbol USB_G_WEBCAM is part of choice VIDEO_V4L2 drivers/media/v4l2-core/Kconfig:7: symbol VIDEO_V4L2 depends on I2C drivers/i2c/Kconfig:8: symbol I2C is selected by FB_DDC drivers/video/fbdev/Kconfig:63: symbol FB_DDC depends on FB drivers/video/fbdev/Kconfig:12: symbol FB is selected by DRM_KMS_FB_HELPER drivers/gpu/drm/Kconfig:75: symbol DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER drivers/gpu/drm/Kconfig:69: symbol DRM_KMS_HELPER is selected by DRM_ARMADA drivers/gpu/drm/armada/Kconfig:2: symbol DRM_ARMADA depends on HAVE_CLK arch/Kconfig:314: symbol HAVE_CLK is selected by CLKDEV_LOOKUP drivers/clk/Kconfig:3: symbol CLKDEV_LOOKUP is selected by COMMON_CLK drivers/clk/Kconfig:10: symbol COMMON_CLK is selected by MFD_INTEL_LPSS drivers/mfd/Kconfig:600: symbol MFD_INTEL_LPSS is selected by MFD_INTEL_LPSS_PCI drivers/mfd/Kconfig:614: symbol MFD_INTEL_LPSS_PCI is implied by KEYBOARD_APPLESPI drivers/input/keyboard/Kconfig:74: symbol KEYBOARD_APPLESPI depends on EFI arch/arm/Kconfig:2031: symbol EFI depends on XIP_KERNEL Your patch correctly solves the spi_pxa2xx issue, but I'd prefer to instead drop the three 'imply' statements altogether, they seem to do more harm than good. (the circular dependency I saw might only happen when applying the arm32 KASAN patches, but I expect to see them merged for linux-5.4) Arnd