Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp394018rdb; Tue, 19 Dec 2023 23:19:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHr+jNZ3NKYGtbUTQGwn9u0DdeyP5nofSh6KXJZwi6s0zo+XYqWaq/rCiCX6OfOWnnU/NfE X-Received: by 2002:a05:622a:44d:b0:427:80b7:c824 with SMTP id o13-20020a05622a044d00b0042780b7c824mr2058947qtx.45.1703056788315; Tue, 19 Dec 2023 23:19:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703056788; cv=none; d=google.com; s=arc-20160816; b=Eh9VfVxtLe9xBObq6UHd+CRA9jEyQHsNGiHf9+rol9sblBT6YRGXRSnfjyJlUcCOKu wtYAQHiaSM+43aDKBjYZ1SSqXyabsNl0jTQH+ElvDmUize4s7ejOtG0BAFIzdEcrDt6E wn3YwnvLeRR4ExQSzlhww/BbsV6m4STb1HqNGrsew5bpJwvSquZjCaOwl8e4iR9f64gv iG6JX7WOnq2ZuCMYJ/A3GfeeQC4Ct6hZyaEJ+5vUnDWly7YVKEHWHiCCeLAteHpcL7Bn zMxK9HcTAWGtu8BYi8MchdCkcJXAMi4GRrHG/3YOMeOoWaKalKK6dPJq/y9Tswxdk0fd A1sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=Y6fzl6vcO4Hv/XujG9Dw3Folx8t279iaf7fTJn0KvN8=; fh=bTEyX4GbReQU+3pU9gWDIgL2EDdMqDWXm7B5uNCwszs=; b=R9mQEf9lN/HAF02F/I72PlSW27oeEBemq+U74qmbn8u1BYIVdMEoqrwkr4Mg0thrOb 3jnU2a80bVUZNlKezjC3WVM4x3i+J5t25rKMsySAorjybhkujoh/3WG/DF8OiDnqXrNN oOrD+8AvVcPlRdHv7wZMp7UdhiSX90DMCfCACWkbzFjCH/50wR97Eq8zvr56q6zj6zoF K7QMqoUPLyDKZ0XUqPK0OFBaePE3B0g4o/yiGjABoqOQvsMAuCqsFMU9iRYFxN4AaH+n 1oCzCQEFaI/oY+add0o8Fn22k8zAHxshN4qPZKby5IXEdwwHoEBJiH1BVNZhWeETGK3K MDyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hiMCouBw; spf=pass (google.com: domain of linux-kernel+bounces-6461-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6461-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c11-20020a05622a024b00b00425f0a4b2aesi3875098qtx.788.2023.12.19.23.19.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 23:19:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6461-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=@bootlin.com header.s=gm1 header.b=hiMCouBw; spf=pass (google.com: domain of linux-kernel+bounces-6461-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6461-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 759331C25657 for ; Wed, 20 Dec 2023 07:19:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58AB715495; Wed, 20 Dec 2023 07:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="hiMCouBw" X-Original-To: linux-kernel@vger.kernel.org Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 866DB14A8E; Wed, 20 Dec 2023 07:19:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id AB40D240003; Wed, 20 Dec 2023 07:19:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1703056767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y6fzl6vcO4Hv/XujG9Dw3Folx8t279iaf7fTJn0KvN8=; b=hiMCouBwpjTDotM2nWPy4MfCqL59dT0H4ebnMP4Wh99CZIvg5xa8mCUGrn/d5LI6eRQAIX ir/6d8YLTlLQAFv2T6USU0WnkFWRkEDY7oE/2dpeXvueyhjIEsdJcPXYojokq4jnNvcu/B GE0jb4PceNrrxwakYSszdrR/RvF0kV6Qg7FqnEj3M3IHlafqoOBioPjMw5a146+AN5AWHS cKz7pFHemYRdjEWo7+fq3vBWL1ix+wLsy6PoNf422Md0FbUyzavzb3+/DL6js4YHt866XY 6L/s3Ts5bSFWE7/Dpt4voAPef9a7pFYa3nnsnyJrxoBhGkS1A2j04qHBg2DyAA== Date: Wed, 20 Dec 2023 08:19:24 +0100 From: Miquel Raynal To: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Michael Walle , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, u-boot@lists.denx.de, =?UTF-8?B?UmFmYcWC?= =?UTF-8?B?IE1pxYJlY2tp?= Subject: Re: [PATCH V2 4/5] nvmem: u-boot-env: improve coding style Message-ID: <20231220081924.39b96ec4@xps-13> In-Reply-To: <20231219174025.15228-4-zajec5@gmail.com> References: <20231219174025.15228-1-zajec5@gmail.com> <20231219174025.15228-4-zajec5@gmail.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Hi Rafa=C5=82, zajec5@gmail.com wrote on Tue, 19 Dec 2023 18:40:24 +0100: > From: Rafa=C5=82 Mi=C5=82ecki >=20 > 1. Prefer kzalloc() over kcalloc() > See memory-allocation.rst which says: "to be on the safe side it's > best to use routines that set memory to zero, like kzalloc()" > 2. Drop dev_err() for u_boot_env_add_cells() fail > It can fail only on -ENOMEM. We don't want to print error then. > 3. Add extra "crc32_addr" variable > It makes code reading header's crc32 easier to understand / review. >=20 > Signed-off-by: Rafa=C5=82 Mi=C5=82ecki Looks much nicer :) Reviewed-by: Miquel Raynal Thanks, Miqu=C3=A8l