Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2427929ybi; Thu, 18 Jul 2019 08:14:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyN6j5EmP0v+WfPZcjrTByM9vIi/MF3G96mtQDoUdtNvafVXcS2ikO/hlmqyVdWvlIjahlq X-Received: by 2002:a17:902:2ec5:: with SMTP id r63mr50033609plb.21.1563462842095; Thu, 18 Jul 2019 08:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563462842; cv=none; d=google.com; s=arc-20160816; b=dx2zXEU2h2gHyEP2wbKLjSHSM9bDk+ZvCrqiceP54+2O7LYXum5W4QPH87MGAlNNXW FkHI+oyxPj0GHLsAedAufzpcTiRR7UxMJTwoHCzkIdifQHHM2T5gquzZPcArlHvm3ONT 7jjlXODLUhGFu9Vr492O/k3xNIASRgqNnm+u3TJe83bRqGWGRyabWUyEolh0vvaYHJa7 eFDw6xzaZYy25LphsyVyhu0cIC+OXrBbSMo4juiU0Kvf77N1PvZM/4h8TpoMeQUaT0b8 cdDl9sCNMPdqtQJu7hI/F+IV0KFK6BDRPli4j1Bs7BYAsnco1Pfy7V9emL6nPQPWzir+ xTZQ== 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:dkim-signature; bh=YxhFlZti0naM2sDVdiDzJc8/ssIuZA4T/1kRQ8AEdP4=; b=ZOfq5cWqPG2NgKO+FsPHiM2xn5JDos30clHdhlPv79heDwWDalTtYqQpzLwkVnIPT4 VNfDYYS58+aNJLa7OKIBWgX3vCtsDZ0hi1iOQypYS83zRowGW1L3u0uaqY91ulMWBLl8 suhuYOqB3rgX7B1bEqMAaS2Df+qxMZZ8l5TBrKAJfhaN/G/DOl9bOtp/XMrTJZ/UP2I+ Iq5llbIiMDuLl7UEcIm+8KLzXvTqdlUOW1cEbGPuFAgjsVKrECCQWG3jFpTJ0HnMr2yv WxXSnDdTduO27NIvRa+gZ7Li5fQ/OVSWVoaDVnGsFSHO4DDhdUxMQTz21WZDVPcI/dQw f8cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fd1twbsR; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q19si1368618pgg.521.2019.07.18.08.13.45; Thu, 18 Jul 2019 08:14:02 -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=pass header.i=@gmail.com header.s=20161025 header.b=Fd1twbsR; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390636AbfGRPNX (ORCPT + 99 others); Thu, 18 Jul 2019 11:13:23 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:37796 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727685AbfGRPNX (ORCPT ); Thu, 18 Jul 2019 11:13:23 -0400 Received: by mail-io1-f66.google.com with SMTP id q22so51995840iog.4 for ; Thu, 18 Jul 2019 08:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YxhFlZti0naM2sDVdiDzJc8/ssIuZA4T/1kRQ8AEdP4=; b=Fd1twbsRFkV2uARiboN365L46fCumZdWwggXza4I9g+14jQ/0ZBU41IunO1gxAhnWh AJZKfFjseNbttdxS58l+XFoCi/V6+cjbOQyavTaAF8iO+GNZ4txNmYtFQG0pSl/NYngW uqJpqlDXRXluzItAEgpuqPVTDhJDbe8MdjBLmSrTTFhw8+FesAoGRxe/ekypVMsI1SHl MB7fMS2gNVIkHA7BLfob3iDPXQF30JC90BqeDLbK9FzAFj7rr2cSH9Xq0XaTRNeURyt9 5p0NvduYZLObluTF/yq1Pprx3hS3M9IpM7TxlsFlgAitcruT57tSgHKqYql5f+72OGds VIWQ== 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=YxhFlZti0naM2sDVdiDzJc8/ssIuZA4T/1kRQ8AEdP4=; b=RSlJSugn6GEcxWniTrRfsHeHggy1b+PoZFCcAF8mXTHzbeqDRmNqJtMDEHX9PPoLPL S7C1btwIGvdPyu8jMt0iyAWZ8XBEzCcdmy15v90ZUwy8d16t5lf9SJUV+Kbi8dP7ZwvZ 1zmWphBNSvU9RnTgLgb1e2V8dmBnCa/QxZNbCQLsBUVNuqwyZXHga4fpujYzrxhg9KYs Sb6NsZWiZQ6nfMkzsFlFyfugMBuS2ItI5lcLr4Ue+inibzbCci+E54unm/o3I9xCskEy Hvb5AVkTiw4fmDUF33OZIW4B8LW6200Bv8hSnTLZzotI8WOgj9uAS4Inaq5dsz9wBc19 6IaQ== X-Gm-Message-State: APjAAAWS/vcukRLjXNHlud7DbrUaXTVSJd3E7D9TqFksPu/iKCSVSsHX sc2TOz6r9DhHj0XvIjZt63MpcR0VIyfz5jnrzfQTXm+o8uvdtQ== X-Received: by 2002:a6b:7208:: with SMTP id n8mr33238445ioc.151.1563462801849; Thu, 18 Jul 2019 08:13:21 -0700 (PDT) MIME-Version: 1.0 References: <20190718134240.2265724-1-arnd@arndb.de> <7da08013-5ee0-1c39-e16b-8b6843a28381@samsung.com> In-Reply-To: <7da08013-5ee0-1c39-e16b-8b6843a28381@samsung.com> From: Dmitry Torokhov Date: Thu, 18 Jul 2019 18:13:08 +0300 Message-ID: Subject: Re: [PATCH] drm/bridge: fix RC_CORE dependency To: Andrzej Hajda Cc: Arnd Bergmann , David Airlie , Daniel Vetter , =?UTF-8?Q?Ronald_Tschal=C3=A4r?= , Laurent Pinchart , Sean Paul , dri-devel , Linux Kernel Mailing List 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 5:55 PM Andrzej Hajda wrote: > > On 18.07.2019 16:21, Arnd Bergmann wrote: > > On Thu, Jul 18, 2019 at 4:16 PM Andrzej Hajda wrote: > >> Hi Arnd, > >> > >> On 18.07.2019 15:42, Arnd Bergmann wrote: > >>> Using 'imply' causes a new problem, as it allows the case of > >>> CONFIG_INPUT=m with RC_CORE=y, which fails to link: > >>> > >>> drivers/media/rc/rc-main.o: In function `ir_do_keyup': > >>> rc-main.c:(.text+0x2b4): undefined reference to `input_event' > >>> drivers/media/rc/rc-main.o: In function `rc_repeat': > >>> rc-main.c:(.text+0x350): undefined reference to `input_event' > >>> drivers/media/rc/rc-main.o: In function `rc_allocate_device': > >>> rc-main.c:(.text+0x90c): undefined reference to `input_allocate_device' > >>> > >>> Add a 'depends on' that allows building both with and without > >>> CONFIG_RC_CORE, but disallows combinations that don't link. > >>> > >>> Fixes: 5023cf32210d ("drm/bridge: make remote control optional") > >>> Signed-off-by: Arnd Bergmann > >> > >> Proper solution has been already merged via input tree[1]. > >> > >> > >> [1]: > >> https://lore.kernel.org/lkml/CAKdAkRTGXNbUsuKASNGLfwUwC7Asod9K5baYLPWPU7EX-42-yA@mail.gmail.com/ > > At that link, I only see the patch that caused the regression, not > > the solution. Are you sure it's fixed? > > > Ups, you are right, I though you are fixing what this patch attempted to > fix :) > > Anyway, we want to avoid dependency on RC_CORE - this driver does not > require it, but with RC_CORE it has additional features. > > Maybe "imply INPUT" would help? No, it won't. I am sorry, I should have looked closer, but as written, drivers/gpu/drm/bridge/sil-sii8620.c has a hard dependency on the RC core and "imply" was the wrong solution for this, we need "depends on RC_CORE". If we want to make RC support optional than we should stub out paths that use RC_CORE (such as sii8620_init_rcp_input_dev()) and guard them by "#ifdef CONFIG_RC_CORE". Then we could keep "imply" on RC_CORE. I am surprised though that imply allows violating the constraint on implied symbols, as RC_CORE has straight "depends on" for INPUT. Thanks. -- Dmitry