Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3670117ybb; Mon, 6 Apr 2020 13:13:17 -0700 (PDT) X-Google-Smtp-Source: APiQypJp7yyGcbUUTStauH5iF92P/fCDW84/+5DyEAYJfIG89c4AH7UBJZQgTKccORCgvu4UQ57X X-Received: by 2002:aca:eb4e:: with SMTP id j75mr885854oih.18.1586203997424; Mon, 06 Apr 2020 13:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586203997; cv=none; d=google.com; s=arc-20160816; b=mGeLJS+ZeMCY9NfMf3Usi4IN0jxXQnz5CoOa54ii2y6NnfMPJrD89zukrv7c7rl87Y b/KgapLKKSq8dfQIiEC8zSw0POu1G9J9kiefb1aq/nW7f98t+mG4qHJ2+EZ5XTpu3pvO UpOrNge/+sfrQ0574KvUhRDxaR+RmuMZy7s8yCLaDWruuefY4shDxn982PhbNy1np0mj 5/tcLnohI9M5dsJBKyEGCV6BjTyXHBs4Cv7WQ7esZheVch3iTUzl6g2a6V2QBUPLiJu8 ZBfchOL3ttlujoRqsxDc8n1bOeJM4H6lWRCfHPmBdmMkLvkdjSq8GniUyOXnir4LxyfJ prKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=AovzD2XzQna1K99kQRM/T8oO9mMmV+EXPr9Z1h5ZpeQ=; b=YfsSR/+2nsIvc+W3asswRG2UR0VGs+fjOOKvxg3vdVQpf3h6yuhkBqpocjlpWXRYu5 pbQkzHJYNzI2qI40UC4vfloVJDa9NRIdLlkbLmO79OqhJNMeLwcQDxEkxTr9T/75wl7s ekMJLMseu8iYuUCOqqHwVnMNsxSFS0tkIKFjLqJPFdK90VWTqZWEQey4ykSoKJPoyE/z F6u7jTXWjFxpEDs93XDCfFlgedOIw1OaUl7XaYUDGCgSjYTgk0E/NXSyfI9uXqNeQcF7 XlCLVBF7OOEdWq38OzYapSzGO2OvuV7X4kfLjAbeQDbYAfXLmr8ZnbiGSWU1NIhmcdO+ fd/g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si301610otl.238.2020.04.06.13.13.05; Mon, 06 Apr 2020 13:13:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726339AbgDFUMR (ORCPT + 99 others); Mon, 6 Apr 2020 16:12:17 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:37808 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbgDFUMR (ORCPT ); Mon, 6 Apr 2020 16:12:17 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 80B8D1C47B2; Mon, 6 Apr 2020 22:12:15 +0200 (CEST) Date: Mon, 6 Apr 2020 22:12:13 +0200 From: Pavel Machek To: Dan Murphy Cc: Lubomir Rintel , Jacek Anaszewski , linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: Re: [PATCH v3] leds: ariel: Add driver for status LEDs on Dell Wyse 3020 Message-ID: <20200406201213.GB18036@bug> References: <20200322074134.79237-1-lkundrak@v3.sk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > >+enum ec_index { > >+ EC_BLUE_LED = 0x01, > >+ EC_AMBER_LED = 0x02, > > Defining the value after the 0x0 is unnecessary as enums are incremental > only the first value needs to be defined if the following values are in > numerical order > > Can these also be #defined instead of an enum??? Not requesting them to be > just wondering about the design decision here. enum is okay here. > >+ EC_GREEN_LED = 0x03, > >+}; > >+ > >+enum { > >+ EC_LED_OFF = 0x00, > >+ EC_LED_STILL = 0x01, > Same comment as above > >+ EC_LED_FADE = 0x02, > >+ EC_LED_BLINK = 0x03, > >+}; If the values are shared with hardware (and they are), making them explicit is right thing to do. > >+#define NLEDS 3 > > This define needs to be more unique. Why? > Something like EC_NLEDS or EC_NUM_LEDS and should be moved to the top of the file under > the #includes I'd do it that way, but I would not request new patch version just for that. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html