Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp523928pxb; Thu, 25 Feb 2021 08:21:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJySM0Myvs4YEhtR7uMxnouoZ9bnpf5Y43qntnnq+N5I/qCUZwyZQj9ZEiLbB9VkJ4WnkBY4 X-Received: by 2002:a17:906:4e57:: with SMTP id g23mr3328847ejw.47.1614270099581; Thu, 25 Feb 2021 08:21:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614270099; cv=none; d=google.com; s=arc-20160816; b=YwrlBzPoTBmtsh0eDbtFvNSsOannmweePmDF/jMkuYiLvURn/na/LtisFQtWn3Ptnc AkHjsJP63nby806zDTqD8bPf68gOBTZ7creY8wQQIG2ALRthP2YFTameIBC+X6rYSjo5 aTSXzggdI36QU/GhIthJuiGEl8Qi+3SH2NvHDKXVofDcVIOO0QURxJhEy0Kp9+z8VXPS H91A0t22voa+sLTPn4Dbs42w6bgYViM8njnPhEwokXvl0dz9SIcR2pfzv4QUlu7cySwq pMwbBss4U3lyD0gp5xMPSiMzgV8w4VLWQNbDKxo9qpat7mh18OU1enWyCcvoNukXqN7C FRig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cjpHXriLd/dK7HFWyHVvtuZ9u/dsUxGKQrSX8SOHcTw=; b=etpCA9gJASMKemxXunrVFxYb5/Oj3sLoPbdSulxgWrTrAxMlOujDxX9c+am1vfEZSj IuoZo9B4w9S/aMtk0j9G5ITvmreAQoZD4pRVVpI//ybzsnAsi+IMYp5puU4QvcgV9ox7 E/xzk699QWQBOf6Rs1m2XVSWv/g/iWr2rZCUVyUn1AXsUiuEJ5TZi9y9oObwAo9FBFKl UWxZYWuksBbGGtv1hmwOP3ZnKbi/itM38ri//Z9FZl1AczXAfhDs71M3k99kxZb7yYyI Q1I+zKa+M08yHBAoAwhw+RsUVfOHk+0V5es9ovr0SjUb41OrFmijZIywauYjRtIia+bJ 7SeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qFtp6Tf2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i28si3467786edy.261.2021.02.25.08.21.16; Thu, 25 Feb 2021 08:21:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qFtp6Tf2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233916AbhBYQRt (ORCPT + 99 others); Thu, 25 Feb 2021 11:17:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:55836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233396AbhBYQP1 (ORCPT ); Thu, 25 Feb 2021 11:15:27 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8E19564F1E; Thu, 25 Feb 2021 16:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614269684; bh=DBu7As++Xj2ngUuK1+BPHEYJ3spEm1jiZ3IV1eWJtd8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qFtp6Tf2JB8d/ukEzEcZsf0tWz1mYfS3aR0VwIyRAt4RZhgFXjTqzJtS5swbKi/xB +6UnlZYTg8pRWAb33zl1hobuU73Y1NVHYEEs5xaXgSSlfuK/icvsCBdmcAkEXY0+xd kKfthyOsit98bXQM6FG6ohNgkVJIkP18Miuedlh4UJo4Bxw+Ai5Zo0bITZSybECxXY BFkr2kZwWEtWhaQLnNMxM7g4Loy2cznVtBkbgcBb+9uAsHZqNtc+t/Yq49LNXmJ9tQ 96wGodMlVyPIXRUZYlli9Um2itO9MAWYErmVUK+CZ+18DTYlGX7RT8PEKFaegRb5qK vlKT54/asbDMg== Received: by mail-ot1-f50.google.com with SMTP id k13so6147064otn.13; Thu, 25 Feb 2021 08:14:44 -0800 (PST) X-Gm-Message-State: AOAM531v//N+DB0zZnDZQwxer7DPImE7Ol01NE8gpKsDLxHjXLfI8+zm ozS3q6KRd0BEozSzUAFOSGoK0Sof7NLX4x1cA6U= X-Received: by 2002:a9d:6b8b:: with SMTP id b11mr2919095otq.210.1614269683648; Thu, 25 Feb 2021 08:14:43 -0800 (PST) MIME-Version: 1.0 References: <20210225143910.3964364-1-arnd@kernel.org> <20210225143910.3964364-3-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Thu, 25 Feb 2021 17:14:27 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] net: dsa: mt7530: add GPIOLIB dependency To: DENG Qingfang Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Linus Walleij , Arnd Bergmann , Landen Chao , Sean Wang , netdev , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 25, 2021 at 4:52 PM DENG Qingfang wrote: > > Hi Arnd, > > On Thu, Feb 25, 2021 at 10:40 PM Arnd Bergmann wrote: > > > > From: Arnd Bergmann > > > > The new gpio support may be optional at runtime, but it requires > > building against gpiolib: > > > > ERROR: modpost: "gpiochip_get_data" [drivers/net/dsa/mt7530.ko] undefined! > > ERROR: modpost: "devm_gpiochip_add_data_with_key" [drivers/net/dsa/mt7530.ko] undefined! > > > > Add a Kconfig dependency to enforce this. > > I think wrapping the GPIO code block with #ifdef CONFIG_GPIOLIB ... > #endif may be a better idea. In practice there is little difference, as most configurations have GPIOLIB enabled anyway, in particular every configuration in which this driver is used. If you want to send an alternative patch to add the #ifdef, please include Reported-by: Arnd Bergmann Arnd