Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5961441ybi; Wed, 12 Jun 2019 11:26:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOkDmqAsX8EJPpJMKeUXYw4My0IuzkPeQ2kiIR7tvnYMKLWmkur/bJFHqJpflFEkoYDsH0 X-Received: by 2002:a17:902:44a4:: with SMTP id l33mr3410553pld.174.1560363999974; Wed, 12 Jun 2019 11:26:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560363999; cv=none; d=google.com; s=arc-20160816; b=PxaNlXclNoheL5/sYuy7l86uHPBvvzSvjPnP07SAF8+I0OxpbWhRwNmLqZhcfIR4gV QUTYczlkKALrgj8DJ+LkAHZ9IYZmmoi7QasTRIvcWCYEQ1NAyFztfUUWmlbpCWSnTkCB Hh5RdojrssXV1c4X13+KzeWf01bUnLip/yFz419IGwUk/CaNA6tXpczbLoGI0hcwDyfL OkDRHjl5xGSpHRgKT+Q1i7w6r6MdQl8Fr9MhvboCMjKUojxwGYIirvSU0t5oNaFxcuJB jbMbxqxmzShDq5eXwPmO4T9rxu1CLh4m9F6wn65N0WywkM37LDxOfSBSsigVAiuyWmf9 W36w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=hgHfKrHPZmhynIjT/1ELxTDkoVco2rB8zT2L0wqDGdU=; b=f7pgoKpJ4ldRMb8YtJvwSrsamjXL/ibVALTbWdbddn6xGMeGTA5O1cTYtG4gKht4V/ pwZ9TRdJDURS8mF/h5LNX5p+euaccqK2joz3mlr/601JhTPmbpmff3g82P22Jfgndj8B 4rzY36ONZnyKWkI84znwB+IaXLl1yAxEUFGIhReMtWHPv9rLvxUyk7RDtvzzJo+YtJwk nqRzQAK9wA4DlnnWZPtf9gc6hiGWW7L0ZEatotDUBhePajbkjVofBQychf4iiVVej8mz bSuiDYlzxa7k3j76tmc0Ca7A6JkeKCe6BBMtDYC7CG8YkdFj1xcNaGDcMMPtvPdWpm9B PLaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=JDbNDL5x; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si381493plz.290.2019.06.12.11.26.25; Wed, 12 Jun 2019 11:26:39 -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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=JDbNDL5x; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727875AbfFLSZq (ORCPT + 99 others); Wed, 12 Jun 2019 14:25:46 -0400 Received: from casper.infradead.org ([85.118.1.10]:42340 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727087AbfFLSZn (ORCPT ); Wed, 12 Jun 2019 14:25:43 -0400 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: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hgHfKrHPZmhynIjT/1ELxTDkoVco2rB8zT2L0wqDGdU=; b=JDbNDL5xQVrvu1OECyKE02I4F0 5nBVlamjATc+Duh9MWiuwDoWSCeK8ZlmeasCaLnbOEc/Ws1xYRS7Z+S2dac+a6/qFvRA3nxhCFqt4 Q6DDWrA9H7NLXS52779BgrxFNI19nUBtq1QU/ShtEN423eqpDuUqa3yjh+CDjFexiqgzPgYWGE2IZ /1pYZuz7nyj37zCyuaoPtFut+lTXs0KYD3fn6SrewAM3Tx1OOMfTyrdBP9OUgly1Bp/YMd3H4P13/ lBGnWBFKuvOXtpK+mHFBptZYaqHY4SWF1cCz1BXQeIkVGt6VVofeiAxq0zLC8C2RIGDcosrcyP+nu o2kYPSCA==; Received: from 201.86.169.251.dynamic.adsl.gvt.net.br ([201.86.169.251] helo=coco.lan) by casper.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hb7wF-0002jr-IP; Wed, 12 Jun 2019 18:25:36 +0000 Date: Wed, 12 Jun 2019 15:25:31 -0300 From: Mauro Carvalho Chehab To: Sean Young Cc: YueHaibing , tglx@linutronix.de, corbet@lwn.net, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH] media: ttpci: Fix build error without RC_CORE Message-ID: <20190612152531.624cfba4@coco.lan> In-Reply-To: <20190612175629.srfw7ybr256se5rt@gofer.mess.org> References: <20190612034310.4640-1-yuehaibing@huawei.com> <20190612074254.eky2xo7bajorkhfy@gofer.mess.org> <20190612063708.64498b44@coco.lan> <20190612175629.srfw7ybr256se5rt@gofer.mess.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, 12 Jun 2019 18:56:29 +0100 Sean Young escreveu: > On Wed, Jun 12, 2019 at 06:37:08AM -0300, Mauro Carvalho Chehab wrote: > > Em Wed, 12 Jun 2019 08:42:55 +0100 > > Sean Young escreveu: > > > > > On Wed, Jun 12, 2019 at 11:43:10AM +0800, YueHaibing wrote: > > > > If RC_CORE is not set, building fails: > > > > > > > > drivers/media/pci/ttpci/av7110_ir.o: In function `av7110_ir_init': > > > > av7110_ir.c:(.text+0x1b0): undefined reference to `rc_allocate_device' > > > > av7110_ir.c:(.text+0x2c1): undefined reference to `rc_register_device' > > > > av7110_ir.c:(.text+0x2dc): undefined reference to `rc_free_device' > > > > > > > > Reported-by: Hulk Robot > > > > Fixes: 71f49a8bf5c5 ("media: ttpci: use rc-core for the IR receiver") > > > > Signed-off-by: YueHaibing > > > > > > Thank you for spotting this and writing a patch. > > > > > > > --- > > > > drivers/media/pci/ttpci/Kconfig | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/media/pci/ttpci/Kconfig b/drivers/media/pci/ttpci/Kconfig > > > > index d96d4fa..b705631 100644 > > > > --- a/drivers/media/pci/ttpci/Kconfig > > > > +++ b/drivers/media/pci/ttpci/Kconfig > > > > @@ -7,7 +7,7 @@ config DVB_AV7110 > > > > depends on DVB_CORE && PCI && I2C > > > > select TTPCI_EEPROM > > > > select VIDEO_SAA7146_VV > > > > - select DVB_AV7110_IR if INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110 > > > > > > This says if > > > - select DVB_AV7110_IR if INPUT_EVDEV and DVB_AV7110 are both y or m > > > - select DVB_AV7110_IR if INPUT_EVDEV=y > > > This exists for the case when INPUT_EVDEV=y and DVB_AV7110=m, which is fine > > > > > > > + select DVB_AV7110_IR if RC_CORE=DVB_AV7110 && (INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110) > > > > > > That's not exactly the same. For one thing it should not longer depend on > > > INPUT_EVDEV=y. > > > > > > Now if DVB_AV7110=m and RC_CORE=y is not allowed which should be (this is > > > the case in Fedora default kernel config for example). > > > > My suggestion here is to stop using select here, using, instead > > a depends on for DVB_AV7110_IR, e. g. something like (untested): > > > > config DVB_AV7110_IR > > bool > > depends on RC_CORE && DVB_AV7110 > > default DVB_AV7110 As I said, this was untested. > Build will fail if RC_CORE=m && DVB_AV7110=y. So it should be > > depends on RC_CORE=y || RC_CORE = DVB_AV7110 Works for me. That's a lot cleaner and easier to understand than what we currently have. Thanks, Mauro