Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp112414lqp; Tue, 11 Jun 2024 17:03:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUO/e0qcnTkcCkmSclMHORnMRkXpV1OXiHClJ0lh/N/dRN04IF96JB4KlJi/0/zr2JRFYjGBK9/HEl4MmP298uReb8EgewNMVMlAMCEsQ== X-Google-Smtp-Source: AGHT+IEvzMUjwd68fobyur+ZUsEwwvx4KrY5unFQsekJPfgxToJKSVmezkLobtVNh9LB61xSge0w X-Received: by 2002:a17:906:6b91:b0:a6e:f436:20f1 with SMTP id a640c23a62f3a-a6f47d524c3mr7987366b.25.1718150612169; Tue, 11 Jun 2024 17:03:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718150612; cv=pass; d=google.com; s=arc-20160816; b=nxIIMEa5lKTMRdBQbqwF2Rg4cjK617fJgSbevfZEWt76R+PcFNHIHXesF464aCSU4g hoJJ/iAepC/1EVBSaUKspnnrAobMBSRBnOFO8jpd3k/d3SYl9OBRkVcDrKTl0X6uGmt2 xLsGGR/dQMr6BWsEQ4cT+M1zj+NTHjoUtOek1iI+QaqFd4X1zdhLW16Tio7wSUTBIk/4 SK2LsWPtRZvCHuzNkPwRSQG4xtUZbSjeblarMCktcS7gw/f3iM6/joH3fwaaa5MU744N YQK9tLlZ0HGKBxX8std0+bd0hEH0Yh0v/1aH+aSgJHB3dwB7NgRfF5ZydWRnv0iKJ7WU zPyA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=CfmyTtQtTR+NEjqwxQHjbPbQLc9kh23HqpCVVQcN7s8=; fh=fCSlGnTpygtmAGL49evpxZ7J3IMURP3RGagEZv0x0ew=; b=SagABiSj68OmuNV77+K1TS7+KRwtJhb13ZMTbg/7VDKW3LW4NBot3Y8lmhR8XuTxIG Pf611T8sF6flj1hFLgA1UzCe8lj8L+5h/kRIqs314nEN1/M0gX0dY/KI1qCke/XCeA8n c89153Kit2izPg9Fhc0PKOwA+oY7sMQMjlPg97MH8XRny+rfFOxL3hp3X7SuXHMdn/1A JU9EFjZggaTUcWrAJcp5aAJ8GdSDWCa27CZdZC2i/vkBVmtNtfg0k77g14lZXGB6Stqw 3IuYSKsWrGOjfd/Pkb8xEAC7C4on0l1E5T5AOqdfuvlw9wUNW7fr3ys48vvWR1Zrf2iz KXGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ERmB5so1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-210724-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210724-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6eb5f03dedsi450148966b.664.2024.06.11.17.03.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 17:03:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210724-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ERmB5so1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-210724-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210724-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 019161F23E30 for ; Wed, 12 Jun 2024 00:03:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC033A34; Wed, 12 Jun 2024 00:03:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ERmB5so1" Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F21517C; Wed, 12 Jun 2024 00:03:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718150600; cv=none; b=A8OUlL4HSQfDr9XSeSr3Y4mBkfmJzLrSmiI5nuQfmeh6MEwXj3/UQn3AyyY4qzoRmA04XNkrkS7O88scmF5v5HD4lDRpLnTdKUv8KaUYhE8qKYUK4tDksy65Rm8vRMAG1dGlQecx41eidGnViX5HRPzKizvsbk66x62NHjX+xws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718150600; c=relaxed/simple; bh=CfmyTtQtTR+NEjqwxQHjbPbQLc9kh23HqpCVVQcN7s8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=JdzhtnfRSvmH5P/nxnzqa5x9ITySJHZ8+emm4Mc9viSSeiB1C2Ofnj+vkTMdLnt9esfCAh3lX7zecc/5ciO1/3yAPouvfd3W1mlsqpfdJCOReDVtIxkW9EVjFKg7zdQZOxnHtAQ3evDoaz/6p8uX2qtFcVVeWG2ZHes/VU0firE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ERmB5so1; arc=none smtp.client-ip=209.85.167.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-52c8c0d73d3so3382038e87.1; Tue, 11 Jun 2024 17:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718150596; x=1718755396; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CfmyTtQtTR+NEjqwxQHjbPbQLc9kh23HqpCVVQcN7s8=; b=ERmB5so1mgkNHOi7TrQgHedrn6UmFfsNudHIvGUkO9GBN9huFn30RiELRhR5ijc1Mq PGtnIpJNxQe7BVgtLkx9CPpi3fPnBD0bxPITFg3TxvyFbkFm8PD0wzd7+99K8vNGILKT ECVP9QpCwlKSBpU/WrfOQvuQTngAHAwYTQqi3VEaCByiFL0TONco2sCTA+GiVIy2isql Aj0ebDxcVDGJSI1szvw+hrJiICnBpAVeRk3aiLgqq/lVYacCDDLZIwXNtCjogdlHDXkB YO3+JYkzC9zHPCF5PThHJ01+4SCJh+sKNTO3y96tw5u3VFx06K8/M1bw/QeW6s7K6NMl hNVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718150596; x=1718755396; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CfmyTtQtTR+NEjqwxQHjbPbQLc9kh23HqpCVVQcN7s8=; b=Je1dntzzlyqjIvb48gDVyKZ1FLG1YsCxkf3hvKlp4MpEzvrRFuRAYp8UF6YhrgZVIU APDqQFakdybxPM1mepqMwhV5kV7tFfhUdNAFUhO8lB7NidGOhk+4Niay35OL9YLrddOG shtYaETFPclUdzggzp4Hj9siQvrLprksGcBDNtU9Pn8VTk+DxxeTAQHHKlR61w4PhrG+ HPkvgd4UkQgn5OvX6bS6RwwVcntWzrp6XcYlASMaZBMdDKuAFNlgOawmAFxtopnfQtlA Ih4GvTHia4gAcGWDK9+PizcxGHbOtZMll2B0PPmpD+DonuQWmLjhGDD3zE3sTi5cWIKh 4K8A== X-Forwarded-Encrypted: i=1; AJvYcCX0wi8ZTPLETil1XJAaQO9BAI4weiccsGEVkxpwrSB5+K92cVYmP6spzm4LOcpJqk3j9WDkBTDfcVgPqh33kyZ167ybcm2g99yQ0Zmrt3kuCayqyBjp9Csb7sIvi8htjgyn60iY X-Gm-Message-State: AOJu0Yz+2BrW+2rh9HNyvXRvP4DcmZDm9qnKWDIYrXIbQ0ijxSukwWLI WpEgJ0t5KEQfSivZjEm1G7xgZmcdHmtQJQhzhwFygnxZ1GwNd64oYZWDrjP7vWecOyumOgZpONK 0n+I4CjRWCTaAkrhhR0XW8/KZH4w= X-Received: by 2002:a05:6512:2004:b0:52b:b8c9:9cd7 with SMTP id 2adb3069b0e04-52c9a3d1c0bmr86074e87.18.1718150596124; Tue, 11 Jun 2024 17:03:16 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240528120424.3353880-1-arnd@kernel.org> In-Reply-To: From: Luiz Angelo Daros de Luca Date: Tue, 11 Jun 2024 21:03:04 -0300 Message-ID: Subject: Re: [PATCH] net: dsa: realtek: add LEDS_CLASS dependency To: Linus Walleij Cc: Arnd Bergmann , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Arnd Bergmann , =?UTF-8?Q?Alvin_=C5=A0ipraga?= , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > On Tue, May 28, 2024 at 2:04=E2=80=AFPM Arnd Bergmann w= rote: > > > From: Arnd Bergmann > > > > This driver fails to link when LED support is disabled: > > > > ERROR: modpost: "led_init_default_state_get" [drivers/net/dsa/realtek/r= tl8366.ko] undefined! > > ERROR: modpost: "devm_led_classdev_register_ext" [drivers/net/dsa/realt= ek/rtl8366.ko] undefined! > > > > Add a dependency that prevents this configuration. Thank you, Arnd. > > > > Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb"= ) > > Signed-off-by: Arnd Bergmann > > Reviewed-by: Linus Walleij > > I tried to create a separate .c file for the leds and stubbed functions > for the LED stuff, but it ended up having to create a set of headers > just to share things between the different parts of the drivers and > it was so messy that it's not worth it. Thanks, Linus. I'll give it a try next month. For now, the fixed dependency is not a big deal as this switch was designed for small routers, which normally have LEDs. > > Yours, > Linus Walleij Reviewed-by: Luiz Angelo Daros de Luca