Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3203652pxf; Mon, 15 Mar 2021 04:21:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVyAK8UYAWl4vInxdC6Kuy8R9N92H4KaNksJs4SXKnqvcQ0huDmXxTczDejwYvqN7z195z X-Received: by 2002:a17:906:5e55:: with SMTP id b21mr6927006eju.289.1615807265315; Mon, 15 Mar 2021 04:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615807265; cv=none; d=google.com; s=arc-20160816; b=yWUmvJ1OEn7ce38Ax/kzq6yhLitlwPlDyFdf5dzskgDEN62pGAGEQLyoUCJa9TaGgB OnweBGvJ3WwfbARv7wDwQOYA2ssOXVdGt9bWT9F4exCSgc2GLh+vk16hiB42m6Y92bHP 3dC56ijmLqIWZ5BlNCBcjN+/rONJX6lB+CCS/1cUneVrHhm5GUD+6tjNhfpOYjVBOfSa 1fi82fSAwCojm/HKvwsRCkLHeDv40lR3a3iuhRmikqUCOziEcxHbKpucS+JnNBzS9vki OzQoAO/on+cCn8LRibyR9fTkY7sXqRhJRjgHNk4J6Ox/LMq+bnw9dwuf9ZGElAgkFrYe 6WVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=dwt1U8XueH7pSW1Z0VNlUdJlEgtjV4RJpGuzXgjcQys=; b=hFHg82L4j+iMPZZNaz2Z5/SDXFmq/tnx3ILw4Oj5X1W9NjUXbHdRAlULS198uyFJwt qukQIuZNjRBJ9/cOH+1FYwaqkq07m3fPSz7V65LJJIYjBN4Brdl9/9euP9S6HKQ/CHaF ZqK9eIvn1UmDtRc2qtyuGMFIBfHrcFsy6h12c+JGPdlrci20Pm28MSkoum56Ok0ZkCLf aYU0IWkjQXvdPGiAYg04ODgaUQ7u8zt7WU5S0WhL8quixFQAE0NUGBiAJ46E5dp4Scep PnfxuRHX5prDaJnbDne8VN7JvYQ2kty6trdedNbj3CBchBTbth+WCqbNtdzo7OKU/lHs wMYw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h7si11035098edt.553.2021.03.15.04.20.42; Mon, 15 Mar 2021 04:21:05 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229523AbhCOLTY (ORCPT + 99 others); Mon, 15 Mar 2021 07:19:24 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:43934 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbhCOLTS (ORCPT ); Mon, 15 Mar 2021 07:19:18 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 336A71C0B78; Mon, 15 Mar 2021 12:19:16 +0100 (CET) Date: Mon, 15 Mar 2021 12:19:15 +0100 From: Pavel Machek To: Andy Shevchenko Cc: Henning Schild , Linux Kernel Mailing List , Linux LED Subsystem , Platform Driver , linux-watchdog@vger.kernel.org, Srikanth Krishnakar , Jan Kiszka , Gerd Haeussler , Guenter Roeck , Wim Van Sebroeck , Mark Gross , Hans de Goede Subject: Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs Message-ID: <20210315111915.GA14857@duo.ucw.cz> References: <20210315095710.7140-1-henning.schild@siemens.com> <20210315095710.7140-3-henning.schild@siemens.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > + struct led_classdev cdev; > > +}; > > + > > +static struct simatic_ipc_led simatic_ipc_leds_io[] =3D { > > + {1 << 15, "simatic-ipc:green:" LED_FUNCTION_STATUS "-1" }, > > + {1 << 7, "simatic-ipc:yellow:" LED_FUNCTION_STATUS "-1" }, > > + {1 << 14, "simatic-ipc:red:" LED_FUNCTION_STATUS "-2" }, > > + {1 << 6, "simatic-ipc:yellow:" LED_FUNCTION_STATUS "-2" }, > > + {1 << 13, "simatic-ipc:red:" LED_FUNCTION_STATUS "-3" }, > > + {1 << 5, "simatic-ipc:yellow:" LED_FUNCTION_STATUS "-3" }, >=20 > Can you use BIT() macro here? And can it be sorted by the bit order? There's nothing wrong with << and this order is fine. But I still don't like the naming. simantic-ipc: prefix is useless. Having 6 status leds is not good, either. > > + struct simatic_ipc_led *led =3D > > + container_of(led_cd, struct simatic_ipc_led, cdev); >=20 > One line? 80 columns. It is fine as it is. Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYE9CswAKCRAw5/Bqldv6 8tJBAJ0QMrBemQByIk0eybhiAr+UntP9OwCeOLQPeLwTNXrHjtUcD1y+OCeIVgE= =4CEG -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c--