Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3084409pxy; Sun, 25 Apr 2021 13:25:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydhbHb/k0hKfzrFVlqH0wxy97u6LA5Y+3ivB4ZjG0qb4/NlMGQ+Pwb/qxoNNwRPTJ5ZJKS X-Received: by 2002:a17:906:32d1:: with SMTP id k17mr15051337ejk.94.1619382344478; Sun, 25 Apr 2021 13:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619382344; cv=none; d=google.com; s=arc-20160816; b=YtWI0e/Ap8bDp2m4ODGUnq+8rECUT5HI/yx/rPpaPNe0wMTvEFRSKOhuK2ZKcafoHl P5B/9EiIACKCBP/c/PrBvhPUi2PSCWMA3BZTeGmFhx3tKgmgPT/JnB4IMOBEzhr3oo0c rCdv23oEh3xa0tSezU/EjWYWHSOZOKYtCY2S33GY4CDpTyuZemlhg+T0M7631MjCSZYg gtsMYIskP6sCnWrFiKFt3WwYEEArXxmh3AE2EFKweiz5jkvPcURPnAaFpERBJjLFf4q7 tQ8pnl56dEmxQXDj9Co9+Q7kcwMadB1R1bhoenPwLMMoOOZRtSBBePSYngEQeLPKWfTp YVJw== 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=KAr07bi0O60q1iMUjn3V9pv6meBilgySRRx71qE3mFM=; b=VXf+jWoHiSqnkIKuCHTNmob6ZAfbU0CimcWRSrviq7FNwQkAqk4xWtfpMqnCKHiGR8 1Ztz0P5nOyQxOSK6cihAyrTQhZONCYJvngkA7eFxYpEFO999FIaGebmDhAGcbujjrwz3 YoCxF8it7DwCc9jX1JkoODFrCXp2MRz7NspqzMWK3S4vPVhjI0xarg2rgWQrlXP1qdyx zaKahMOr6phG/WR8bCPOl8m7qp2P+UJIF7Rnyj4ki8a8LonnUVR4dJw1LyygtauLZnDG 6qaNPtutSfJPKCRNNh79niPXZko+d+K/hkOa/6VWs8Dc9H2F4Ow19iSNGKtjyfuTdf38 lKgA== 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 w7si11645728ejy.722.2021.04.25.13.25.20; Sun, 25 Apr 2021 13:25:44 -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 S231321AbhDYUUM (ORCPT + 99 others); Sun, 25 Apr 2021 16:20:12 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:47210 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230494AbhDYUUL (ORCPT ); Sun, 25 Apr 2021 16:20:11 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id CD4311C0B76; Sun, 25 Apr 2021 22:19:29 +0200 (CEST) Date: Sun, 25 Apr 2021 22:19:28 +0200 From: Pavel Machek To: Jacek Anaszewski Cc: =?iso-8859-1?Q?N=EDcolas_F=2E_R=2E_A=2E?= Prado , Dan Murphy , Bjorn Andersson , Andy Gross , Rob Herring , linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Brian Masney , Luca Weiss , Russell King , Georgi Djakov , linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, lkcamp@lists.libreplanetbr.org, andrealmeid@collabora.com Subject: Re: [PATCH v2 2/4] leds: Add driver for QCOM SPMI Flash LEDs Message-ID: <20210425201928.GA10996@amd> References: <20210126140240.1517044-1-nfraprado@protonmail.com> <20210126140240.1517044-3-nfraprado@protonmail.com> <20210219110227.GG19207@duo.ucw.cz> <7bb757c7-55af-66a4-aa12-fe646a19fcf6@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: <7bb757c7-55af-66a4-aa12-fe646a19fcf6@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > >>>+#include > >>>+#include > >>>+#include > >>>+#include > >>>+#include > >>>+#include > >>>+#include > >>>+#include > >>>+#include > >>>+#include > >>>+#include > >>>+#include > >>>+#include > >>>+#include > >> > >>Please sort includes alphabetically. > > > >No need to do that. >=20 > Keeping the includes sorted eliminates the risk of introducing duplicates > and allows for faster lookup. >=20 > What gain is in having them unsorted? It is not there is gain in them unsorted; it is that keeping sorted order is not worth the effort. > >>>+#define FLASH_SAFETY_TIMER 0x40 > >> > >>Namespacing prefix is needed for macros, e.g. QCOM_FLASH*. > > > >No need for that in .c files. >=20 > In general it eliminates the risk of name clash with other subsystems > headers. >=20 > And actually the prefix here should be QCOM_LED_FLASH to avoid ambiguity > with flash memory. If you dropped the vendor prefix then you'd get > possible name clash with led-class-flash.h namespace prefix. I believe the cost (longer macro names) outweights the benefits here. Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmCFztAACgkQMOfwapXb+vKsAQCgwoITptPZoLauNTG8eGPnXx4k axkAnAlN7nrSYyNTLk7gonKmd2sqzFrb =QgY3 -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--