Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp222633pxp; Sat, 19 Mar 2022 00:12:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4PvHgmE+nV0UT5kIFOLtoVif3o6oQ9BTuLA755yX5jMC65AnLFETVGneSm21ZAKVB47qu X-Received: by 2002:a17:903:32d2:b0:153:9c6a:5750 with SMTP id i18-20020a17090332d200b001539c6a5750mr3180426plr.34.1647673958211; Sat, 19 Mar 2022 00:12:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647673958; cv=none; d=google.com; s=arc-20160816; b=E3SX/okbrgDmn/FV0oiXsPw4SRVO7Nm+8y0KTDI6z15Cr9N51sS+v+z679ENVfQ9r2 W38fjeEbCuD9mPmqQHCzlZPen6V2pbv1DjQg1i30N2NTFiKbhf2kJjSvd89YJrUwzSjB lWdR77qfdGd/622QOhb923jKfPu4T7QkMVvXHWWPUKeb/3q/9JbNegPAcAQFUbaGO8Vh 1F9NNQmeXuOOBEvOHIDobu3qQ87g+s4pSh5tb9rvFk2Llz6NdquQ7WudpRacxsWpWDDA AK8yb4AHEh+kuZAJtKTdCL1SdEK4F1lGZb6zEAovRCYVGl9qGLdnweMV6VAwZxP/X9VK 4C0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=hwFaJqqqG8uUr3fjXxsVA+nII57NXxwdDsoh1j9zLU8=; b=ElcNcMXk/9AwF5fL6B36Iabn50jAfvmNpnXL9s9sVcGO20x4qoTikio358YVZr6nQI nJKsTN1E9Zc0t2yJ/nOpcYudiK44JU5nWPJMqWdPXTwXQOf/UAGnK0JKYOczud/8Sk5b 9sDDpt1hhrI9hs3b0uZkW+5ZDM0fHQ4pqQAF90ZbiObp/i2oYFmPSysx2q5BQjIp5yzI GbfY7sVlxbXa1KD+VPxflO7oJQ9mL0FoH4S04NbhX0rMQamV7G64jVbRi5/eMTlXcTdw 1jDyBh77YbnmsdW0RslcS0JVH/mzoKIdFt1EZuzJvO4TzG8mKAVG2HmoYyL8xS3pf7FZ XhRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=sYgGKh6d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z16-20020a1709028f9000b00153b2d1649dsi4193908plo.165.2022.03.19.00.12.01; Sat, 19 Mar 2022 00:12:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=sYgGKh6d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241145AbiCSE6E (ORCPT + 99 others); Sat, 19 Mar 2022 00:58:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242173AbiCSE6C (ORCPT ); Sat, 19 Mar 2022 00:58:02 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4380B2A4BE5 for ; Fri, 18 Mar 2022 21:56:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description; bh=hwFaJqqqG8uUr3fjXxsVA+nII57NXxwdDsoh1j9zLU8=; b=sYgGKh6dBxUGoBFst+uzjWVsdR CWber+AaE0Aplg5JPGEO5RntoT2dKhTmnJB9P2b5bM6lXdGMvJUEzdysWS6C2WGsp0fCh63xzUeHR BvDAAip4j88WlrNdp4esF957+lg0RBPyE1Mq5ZUD4PZ+hhJZcpAexGfaIdJdIIJ/P7sstIEGoMdlu HgU40NOG2iYAw4sy3MLAsXKY7hldYnyCHO7n5zxOVpYLjEJmA9ATeJCfrmMhTXqNoyqI2YBdxdOw1 8DZvDueoeelxBJQjKfvgOmb0YBbXYzMTgG8f3RDVxZcAxYu4PxfPItPY0NgklL7yVaYW2I4GODk2b 8s0DuVtA==; Received: from [2601:1c0:6280:3f0::aa0b] by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nVR8f-008ZOw-PS; Sat, 19 Mar 2022 04:56:30 +0000 Message-ID: Date: Fri, 18 Mar 2022 21:56:25 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled Content-Language: en-US To: Finn Thain , Benjamin Herrenschmidt Cc: Michael Ellerman , Geert Uytterhoeven , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/18/22 21:18, Finn Thain wrote: > drivers/macintosh/via-pmu-event.o: In function `via_pmu_event': > via-pmu-event.c:(.text+0x44): undefined reference to `input_event' > via-pmu-event.c:(.text+0x68): undefined reference to `input_event' > via-pmu-event.c:(.text+0x94): undefined reference to `input_event' > via-pmu-event.c:(.text+0xb8): undefined reference to `input_event' > drivers/macintosh/via-pmu-event.o: In function `via_pmu_event_init': > via-pmu-event.c:(.init.text+0x20): undefined reference to `input_allocate_device' > via-pmu-event.c:(.init.text+0xc4): undefined reference to `input_register_device' > via-pmu-event.c:(.init.text+0xd4): undefined reference to `input_free_device' > make[1]: *** [Makefile:1155: vmlinux] Error 1 > make: *** [Makefile:350: __build_one_by_one] Error 2 > > Don't call into the input subsystem unless CONFIG_INPUT is built-in. > > Reported-by: kernel test robot > Cc: Michael Ellerman > Cc: Geert Uytterhoeven > Signed-off-by: Finn Thain Hi Finn, It builds without those reported errors, but I do see these warnings since the robot-supplied .config file has: # CONFIG_PROC_FS is not set CC drivers/macintosh/via-pmu.o ../drivers/macintosh/via-pmu.c:897:12: warning: 'pmu_battery_proc_show' defined but not used [-Wunused-function] 897 | static int pmu_battery_proc_show(struct seq_file *m, void *v) | ^~~~~~~~~~~~~~~~~~~~~ ../drivers/macintosh/via-pmu.c:871:12: warning: 'pmu_irqstats_proc_show' defined but not used [-Wunused-function] 871 | static int pmu_irqstats_proc_show(struct seq_file *m, void *v) | ^~~~~~~~~~~~~~~~~~~~~~ ../drivers/macintosh/via-pmu.c:860:12: warning: 'pmu_info_proc_show' defined but not used [-Wunused-function] 860 | static int pmu_info_proc_show(struct seq_file *m, void *v) | ^~~~~~~~~~~~~~~~~~ > --- > drivers/macintosh/Makefile | 5 ++++- > drivers/macintosh/via-pmu.c | 2 ++ > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/macintosh/Makefile b/drivers/macintosh/Makefile > index 49819b1b6f20..eaf28b1c272f 100644 > --- a/drivers/macintosh/Makefile > +++ b/drivers/macintosh/Makefile > @@ -12,7 +12,10 @@ obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o > obj-$(CONFIG_INPUT_ADBHID) += adbhid.o > obj-$(CONFIG_ANSLCD) += ans-lcd.o > > -obj-$(CONFIG_ADB_PMU) += via-pmu.o via-pmu-event.o > +obj-$(CONFIG_ADB_PMU) += via-pmu.o > +ifeq ($(CONFIG_INPUT), y) > +obj-$(CONFIG_ADB_PMU) += via-pmu-event.o > +endif > obj-$(CONFIG_ADB_PMU_LED) += via-pmu-led.o > obj-$(CONFIG_PMAC_BACKLIGHT) += via-pmu-backlight.o > obj-$(CONFIG_ADB_CUDA) += via-cuda.o > diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c > index 4b98bc26a94b..55afa6dfa263 100644 > --- a/drivers/macintosh/via-pmu.c > +++ b/drivers/macintosh/via-pmu.c > @@ -1457,12 +1457,14 @@ pmu_handle_data(unsigned char *data, int len) > if (pmu_battery_count) > query_battery_state(); > pmu_pass_intr(data, len); > +#ifdef CONFIG_INPUT > /* len == 6 is probably a bad check. But how do I > * know what PMU versions send what events here? */ > if (len == 6) { > via_pmu_event(PMU_EVT_POWER, !!(data[1]&8)); > via_pmu_event(PMU_EVT_LID, data[1]&1); > } > +#endif > break; > > default: thanks. -- ~Randy