Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp460010rdh; Tue, 19 Dec 2023 04:25:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IHoGZ0nQm4CC7L7ILls25JpSAgDj9tSK7EaEniX3XuD5RatpJPKz7x4eIoHENnnGm6tz54m X-Received: by 2002:a17:907:e8f:b0:a1c:9738:2235 with SMTP id ho15-20020a1709070e8f00b00a1c97382235mr13238220ejc.118.1702988722783; Tue, 19 Dec 2023 04:25:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702988722; cv=none; d=google.com; s=arc-20160816; b=yKAJ6MVva/WPXPmYUSAbdCLN3XnTjaP/C9sHwRWea87LITrBDCre+jzlaMDnMpq9eG M0+xp8DpxOwrzYqhaNjWnLj50EsvYKk1rBknxWCZxfO1Rn6TUKzxVb3dQrXJKOLc0zYQ wk4KiUdnbi98XFv7eIOMb6PvOQZau2Q0ranaZj06J5MY06iNFcmpr5MV13yCEzjwvHr0 I4B3dpfbwy7K9ss7izeqrC0hgROnwUKmSaVcGCio91MDQ7lpLH2pKoYl15F5ecQ2AosE 0Hno2YU29F2nTmQLdz0e+8tiHq19wa03pLk7od8cT8kqcoJnTjcum8sm3gcA2Cv6M/4E 3y3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:message-id:references:in-reply-to:subject :cc:to:from:date:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Zo1bvGMOlMzlZUMlT7LD46uyFfN2T/tY+yhbado4I8M=; fh=yEqkwGPMhwnzEos+nAMnzQ0rWRCUpAlF6qiuJdrsfBo=; b=iE6L5TmWeolx1rF+YZWPcNgb1gPM8CaoLi1g33DtvXdaIqkowpYn6wBr0P+hw9JOrg 5rDSHxgENRSXaFGOD6rYvNY9VOS1TCaijgN8VO7tuqL5N9FnoMOz6/38yKO4x2PJ3jB3 VfRqhVWDsdWkdY+PKpGp4GlbvZA8nC+n6icsSM/AIq4ATLRqR9Y/+Ff7gYCAXzQiwZnI IWPRByrR3AvabmVYdHyCRA9UKSi4QcdqAlbWv75D/rGkOvuECrhKNgSY9mx1TrTOIZEZ 4ZAjXdrwmZctqfPq4Mpv9B/NTLTlLAJRyHDVGNln7GugStwy3O7u7blUH0rnV4gH244s Apqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=He1O7Dll; spf=pass (google.com: domain of linux-kernel+bounces-5163-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5163-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u7-20020a17090617c700b00a197ea73226si10690270eje.44.2023.12.19.04.25.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 04:25:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5163-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=He1O7Dll; spf=pass (google.com: domain of linux-kernel+bounces-5163-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5163-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6EA491F245C3 for ; Tue, 19 Dec 2023 12:25:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2818118634; Tue, 19 Dec 2023 12:25:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=walle.cc header.i=@walle.cc header.b="He1O7Dll" X-Original-To: linux-kernel@vger.kernel.org Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) (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 0ECA918622 for ; Tue, 19 Dec 2023 12:24:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=walle.cc Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=walle.cc Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id DF01B4FB; Tue, 19 Dec 2023 13:24:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1702988696; 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=Zo1bvGMOlMzlZUMlT7LD46uyFfN2T/tY+yhbado4I8M=; b=He1O7DllNLSQCRI6CEHrhhtQSLhUBhTSPm0+zqz/PciEb+AoKUZzy8JBzd6YwXkpsIpRBW TTpAv/wll81uuH6JEE+lo8Y0DbtGW5cmDy7vAFEnODr4qkMiHZ6m/IVyXhVVJsv8YCG7sK P839Gt7qOK/P3jzj1VE8v13HxpoF/pUjGJ9icNVTEQtdh7uoCz0X0GQpVI5OQFqoubRwZB TpNtpiouXWABbvCy+Fdmx4Q53WvK4oNc8G50LqR/e0+4UYLJZ/D4OmQVQ3CIb2yt5VKDAZ EK+N28j4deO+ku/qEPnzUc+J5QYeAvxbHpoMmSXQD2mP1CPVB5BdrTshtB1+uQ== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 19 Dec 2023 13:24:56 +0100 From: Michael Walle To: =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= Cc: Srinivas Kandagatla , Greg Kroah-Hartman , Miquel Raynal , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= Subject: Re: [PATCH v6.8 1/2] nvmem: layouts: refactor .add_cells() callback arguments In-Reply-To: <20231219120104.3422-1-zajec5@gmail.com> References: <20231219120104.3422-1-zajec5@gmail.com> Message-ID: X-Sender: michael@walle.cc Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > From: Rafał Miłecki > > Simply pass whole "struct nvmem_layout" instead of single variables. > There is nothing in "struct nvmem_layout" that we have to hide from > layout drivers. They also access it during .probe() and .remove(). > > Thanks to this change: > > 1. API gets more consistent > All layouts drivers callbacks get the same argument > > 2. Layouts get correct device > Before this change NVMEM core code was passing NVMEM device instead > of layout device. That resulted in: > * Confusing prints > * Calling devm_*() helpers on wrong device > * Helpers like of_device_get_match_data() dereferencing NULLs > > 3. It gets possible to get match data > First of all nvmem_layout_get_match_data() requires passing "struct > nvmem_layout" which .add_cells() callback didn't have before this. > It > doesn't matter much as it's rather useless now anyway (and will be > dropped). > What's more important however is that of_device_get_match_data() can > be used now thanks to owning a proper device pointer. > > Signed-off-by: Rafał Miłecki LGTM, Reviewed-by: Michael Walle