From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 239973081BE for ; Wed, 29 Apr 2026 07:44:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777448645; cv=none; b=AZfMcAcDOf/Go8FTY3otcm5h/yZ4RBLOzyhBeU931Fm/E6lIty2SJj9O+g6XynabGm0home25k8HuENMzTfYwGfoRHDvAZi1QUtHlWjkHZ74rL1YpHVeohD7uKSWZskCo3FhrGzL70iuvJbAk7AASdEPc7TGZYG5WnHP2VKlJMo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777448645; c=relaxed/simple; bh=Q0phJVWsHO/tZZo2lNJMK/oWePSDBFwRPVndXSpNW0s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=LBUW4MyKRH3R32hg/kkU/yp6Cge4TvoDRbM7++pDdN2Vk8nthTDxWS0qWptwMHxgIEjbx1oDFaWH0onNX8FZL5Rwsxrhhk9BtuM0lvJ833qtd7r5XgrgJUndnY7dMo12KcFii/7BFf/YDz1VOOTRYUeFcu6vnkLiTpR4zyD5AnU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Ez9mL/W2; arc=none smtp.client-ip=185.246.84.56 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Ez9mL/W2" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 7F1C81A347B; Wed, 29 Apr 2026 07:44:01 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 54323601DF; Wed, 29 Apr 2026 07:44:01 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1E09610728FEB; Wed, 29 Apr 2026 09:43:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1777448640; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=wDzYMb8ytq6WB5VDr1CNe0i/GlfvJFwXXiKej5QiStg=; b=Ez9mL/W2tQYxlB69TCFuvAQM9jNAID1xGARA3gFQhyftvEPg2/ZeulWJinWuYRK52GzdsD GgoWOx4KSCAxMMBaXO2WivCTPp9JEPuS4LCzW2KaVECUF3ZcXG2W6BCLLolyGDTffIo6n7 U8FEs2wchw7sWs2t39k/6D6pgST0NTkKjeBJkdMYZeNhbyRD0erEY0Fh000yzotXjwSpti HpchQJ1UnsNxVrKjnoNAcdaz70XgmdY4IDQi9UdxBbXQyBtv6iAftQ38TVmP+ebaQoTiN7 mce9D5CTaWPvh501s4mdJOAHGIVLPVa10ovfp3ZH646AkimLAjLqxvV+YKOi5A== From: Miquel Raynal To: Rosen Penev Cc: linux-kernel@vger.kernel.org, =?utf-8?Q?Rafa=C5=82_Mi=C5=82ecki?= , Srinivas Kandagatla Subject: Re: [PATCH] nvmem: layouts: u-boot-env: remove ethaddr check In-Reply-To: <87wlxqcj06.fsf@bootlin.com> (Miquel Raynal's message of "Wed, 29 Apr 2026 09:39:53 +0200") References: <20260428212621.60759-1-rosenp@gmail.com> <87wlxqcj06.fsf@bootlin.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Wed, 29 Apr 2026 09:44:02 +0200 Message-ID: <87qznycit9.fsf@bootlin.com> 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-Last-TLS-Session-Version: TLSv1.3 On 29/04/2026 at 09:39:53 +02, Miquel Raynal wr= ote: > Hi Rosen, > >> --- a/drivers/nvmem/layouts/u-boot-env.c >> +++ b/drivers/nvmem/layouts/u-boot-env.c >> @@ -75,11 +75,9 @@ static int u_boot_env_parse_cells(struct device *dev,= struct nvmem_device *nvmem >> info.offset =3D data_offset + value - data; >> info.bytes =3D strlen(value); >> info.np =3D of_get_child_by_name(dev->of_node, info.name); >> - if (!strcmp(var, "ethaddr")) { >> - info.raw_len =3D strlen(value); >> - info.bytes =3D ETH_ALEN; >> - info.read_post_process =3D u_boot_env_read_post_process_ethaddr; >> - } >> + info.raw_len =3D strlen(value); >> + info.bytes =3D ETH_ALEN; > > How do you know this is a MAC address? You are overwriting info.bytes above. I am sorry but this change has only been tested with your very own settings and does not look like something we could accept. You cannot attach the "process ethaddr" subprocess to any node, that would not make any sense. I guess we can extend a bit the condition with thinks like "eth%daddr", but that must remain limited. Thanks, Miqu=C3=A8l