Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2225409pxb; Tue, 23 Feb 2021 01:30:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOO4R79LT8hfLBoG0TXEy/94M8URQrJRnnP8s+MkzKxlLwRSSsNgRi17HcEPSVssO8Oeq+ X-Received: by 2002:a17:906:6942:: with SMTP id c2mr10150154ejs.425.1614072607668; Tue, 23 Feb 2021 01:30:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614072607; cv=none; d=google.com; s=arc-20160816; b=wYyqG3vIHlRq39PRRg2FB7G5zEpskBvglyXy9eK6Ax3IVmURzE43i5mdU/D6AwZMW+ r6z/NVCwCfgp9gPN+I+gWJitouDRhCxA5v1SF73sJ8sf4LUrYs7nZh731+q0D5p9hpZl W0Rw1v0nQnxnMXmSG2j1cSf6GngDZ5DtrF6Bmn8ZbhJwVVHw9dvemCjRYcXsVI6cmiL4 z2SEuAnfMF/uXo+oQkplPm2D0ndQEYYaleNzcYDg2bNhkr0x+VPg6LxRW/ZcH1FjSBVC Rb3RNrOHBcWCl44jH7B/bYym1mVUP0U1QoWfaNAHPCo+peWbgzXrRXAcoO7LiFmLQe7D nl2g== 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=2YgTzb8nJjT4HesdYTFVuyUqx9Dx1Tv/H2uBMm7uSFQ=; b=ELNCvHeH6qFPAKq+UMOeFyLV5rgfmQwxCrmqlPfuiE8EGwBdATlfJMRmRitcrXi22Y yFWPJsWAshu+EX92SM6uUPN6OHg/vSVMI4E/dI1+royPC2pJG5rzTF4o8jrZbUCrRYm7 /+lZSTGWZ2Zyky3MLChZ6yJmJol6BpRmmlN1bYIWsJYd5wi6Q8t1W3H5zJaNBH1Lz+PX 8W8PG0LM6ow6IBqSDw7hXDDLwdUh25igsStdmIQB7aM2oD0Ab7bi4DYWimq7wiW9GMrx y1NRGn9VWphUb4Mo77a3L6eosQZO80TzHoPyOeKM7pe3uvZq9N1CmS3r6Q3/qEB8Uwy+ n+yg== 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 t5si15027149edt.292.2021.02.23.01.29.28; Tue, 23 Feb 2021 01:30:07 -0800 (PST) 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 S230248AbhBWI7E (ORCPT + 99 others); Tue, 23 Feb 2021 03:59:04 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:51578 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230014AbhBWI7C (ORCPT ); Tue, 23 Feb 2021 03:59:02 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 60A571C0B85; Tue, 23 Feb 2021 09:58:20 +0100 (CET) Date: Tue, 23 Feb 2021 09:58:19 +0100 From: Pavel Machek To: =?iso-8859-1?Q?=C1lvaro_Fern=E1ndez?= Rojas Cc: Florian Fainelli , Dan Murphy , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] leds: bcm6328: improve write and read functions Message-ID: <20210223085819.GB9750@amd> References: <20210223081732.9362-1-noltari@gmail.com> <20210223081732.9362-2-noltari@gmail.com> <20210223083449.GA9750@amd> <3826ACDE-EFF2-4CC5-82EE-2DBC991CF996@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5I6of5zJg18YgZEa" Content-Disposition: inline In-Reply-To: <3826ACDE-EFF2-4CC5-82EE-2DBC991CF996@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --5I6of5zJg18YgZEa Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > >> This is proven to work in BMIPS BE/LE and ARM BE/LE, as used in bcm283= 5-rng > >> and bcmgenet drivers. > >> Both should also be inline functions. > >=20 > >=20 > >=20 > >> -#ifdef CONFIG_CPU_BIG_ENDIAN > >> - iowrite32be(data, reg); > >> -#else > >> - writel(data, reg); > >> -#endif > >> + /* MIPS chips strapped for BE will automagically configure the > >> + * peripheral registers for CPU-native byte order. > >> + */ > >=20 > > Bad comment style. >=20 > I just wanted to copy the same comment as the one in bcm2835-rng and bcmg= enet=E2=80=A6 > https://github.com/torvalds/linux/blob/3b9cdafb5358eb9f3790de2f728f765fef= 100731/drivers/char/hw_random/bcm2835-rng.c#L42-L60 > https://github.com/torvalds/linux/blob/3b9cdafb5358eb9f3790de2f728f765fef= 100731/drivers/net/ethernet/broadcom/genet/bcmgenet.c#L71-L88 > Yeah, but ideally you should not be copying comments; there should be one central place which does it and does it right. Pavel --=20 http://www.livejournal.com/~pavelmachek --5I6of5zJg18YgZEa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmA0w6sACgkQMOfwapXb+vLvMgCfYs6RiaK1D1v4cfgUOj82H3wH AlYAnihI3nqL+vgqkWS0dzv+hioqDBLx =wT7D -----END PGP SIGNATURE----- --5I6of5zJg18YgZEa--