Received: by 2002:a05:7208:70d5:b0:7f:5597:fa5c with SMTP id q21csp2256656rba; Sun, 24 Mar 2024 08:33:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVl3xbIyTbokvU80NhkYAxM/0RWTo5uHl4yLLA2ATp32UPii20ig84Rv8GjgJRmzMO9FmaTV3+JeTYHW6Gsh41ZUKPoAejkiFQ8WptIqg== X-Google-Smtp-Source: AGHT+IH3LRWO6oD1eSC8ZuJJKC/O1GEcdpduA9uJzfJKpjDFUqimh5GcZNoiv7OkwQzDGMLPJr30 X-Received: by 2002:a05:622a:5e8d:b0:431:3f67:4b47 with SMTP id er13-20020a05622a5e8d00b004313f674b47mr6326024qtb.20.1711294397050; Sun, 24 Mar 2024 08:33:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711294397; cv=pass; d=google.com; s=arc-20160816; b=DRUuppVwVvAhPTAUlYl/gZOlsQ2bOuQxHVRNT22K2ndV8/YcgvKPnnzEvHpTaoGN2m ZOuhSGchcAhn9NrtBdbRwTNu7y4vzA4WulCx8Rs2zqmjT1ZxWq4GLswnBPPoEse/8D5A AMA5tB0EPWh9vI6j1iRHNWOcEIOyuXtBvCyzzFimtJSAh0xT0is11QDfFFpchcOxDgJV cjU3iqzpVgTfgoCt7vK3LQApu/XltpW2N+xXzFdZp3phokjwCY1Y5MecYEFqqWT0cwKC qgcNR1OHhQG1WVSw56NgxdxB7niS9IP6j87ptXWguRq4XNVxEtDamDcI34nRvzLi7bog PR0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2TlEn+OknbnKMHjb6XpI9hq5uQzUBuHZ9lTXfUcMn94=; fh=daxskhSZAYmHEUq8Jl4X/Urjyu+vfWRb8PA0TNEl5RY=; b=lkZ/evBNBhsSoANmTzuZpCUh6D+5TTrk5lskPa9E2aYDUe4UBJLWQXDXaOvMiNIjgJ SZkn/OPZ54H6eXgVcEq/DxtppQerpVz0bMpWbNiNIT8cikzStlko7NlhRcR93LC+HN7w kl6pQJGWARMVXgdi2+s2leCSPoUVsEd6/m9xX3geB7tC0ap4VfEeLaz8B6gZejc7Qh0K pyBRvWP5QHSd7P0U65xYyTdUa+vvZ2qvS5skewrZ5zz8LZ6q0U2a3n2p7F/hhCE/qrh4 eH3QVWbjsxCLL2sszStZEzTgbBvSH6GDw/MT8cQDT9AhpzfzZsM5rq9tqgQEPLY8T+BA cshA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=NkVGcMWH; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-112727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id fx5-20020a05622a4ac500b004313766bb7bsi3709799qtb.780.2024.03.24.08.33.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 08:33:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=NkVGcMWH; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-112727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B24E71C20DCE for ; Sun, 24 Mar 2024 15:33:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB69918EA8; Sun, 24 Mar 2024 15:33:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="NkVGcMWH" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FB1018651; Sun, 24 Mar 2024 15:33:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711294387; cv=none; b=FSENSWPQ5tGxL0CXiU7gugrY16okaY3D9C/sHEWEXQBXlHztPigitkNng6wx450nlGZ8jV0x9+zzr4opVxmSKhjUikOkLcVVnZ4jsK+jrMPge6Xua9dzWliZRjgDaHZ2ZGo8lpOUi5jnhSolJUmvagivocF4UUQ1YdPudhHAT4Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711294387; c=relaxed/simple; bh=wUAtV8wQbBO1XcNrunnboFHejfDjPcWWK1zxAkVYNI4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=im4eu2V6WKpYGlb9lVElrwx8RQnaBBq6q+pduSrW4x+/KWnzzDkgZFfdedhUbaIgS3n+AFAcOEzDrVIOExK2jiKLHNsXCMTISFfR1WqzYFmRWKAYwZ4E4RK1VE0Kq7R57DLH/PDxA5Xksgf/F29HvkA592ewMjWN623HfgXitQA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=NkVGcMWH; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=2TlEn+OknbnKMHjb6XpI9hq5uQzUBuHZ9lTXfUcMn94=; b=Nk VGcMWHr/2wzNCPmwHvsmx+9GLsGt5NjrUwpnHMrtWL5Z9hzFLS8v3wd0ibOCK69KHdVYswtdigpbn 3dk6rkf1r42P4xn5gy/+/Bkk+6+nQYmFRArMRe/91Kl05l0cIMRPo7cIB4bWbwCx2dr5OXlKOysXZ WgWcFIpuY8OcVNc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1roPq9-00B6On-FO; Sun, 24 Mar 2024 16:32:53 +0100 Date: Sun, 24 Mar 2024 16:32:53 +0100 From: Andrew Lunn To: Luiz Angelo Daros de Luca Cc: Linus Walleij , Alvin =?utf-8?Q?=C5=A0ipraga?= , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 4/4] net: dsa: realtek: add LED drivers for rtl8366rb Message-ID: References: <20240310-realtek-led-v1-0-4d9813ce938e@gmail.com> <20240310-realtek-led-v1-4-4d9813ce938e@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: > OK, I'll add _group_/_GROUP_ both to the enum name and macros. Led > blink rate, for example, is global, used by all groups. However, it > will be difficult to respect the 80 columns limit passing > RTL8366RB_LED_GROUP_OFF to a rb8366rb_set_ledgroup_mode function with > only two levels of indentation. Do you have any recommendations? https://www.kernel.org/doc/html/v4.10/process/coding-style.html Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program. Functions should be short and sweet, and do just one thing. They should fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24, as we all know), and do one thing and do that well. Maybe you need to use more helper functions? Andrew