From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-106113.protonmail.ch (mail-106113.protonmail.ch [79.135.106.113]) (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 6003030E821 for ; Tue, 25 Aug 2026 11:00:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.113 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787655632; cv=none; b=RIuQ5aOsnctPF+HGRW/EVeh93Uq4cibCP8vXa/miT35PU6G/wsMzJ0M0bXtcE6lktMpA2BPxVVHrlj8R+nfkHgYSdg5obWX9xMVz8psmSu/pf0Td6BMhKDTl1gzFqM5dx1ll+V9j2VcXkG3aCEE+MnYobyfz1wRapgr7oRaoikA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787655632; c=relaxed/simple; bh=hlQaic0F0CxMkHX0OwjEl1Bx+fB1Q/isL2/ynDVBG14=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=TLmNmHoc4TJeXP5Mo+oUw+mD0qM5RNC/TKEs862G5mD8Km1qY1ss6W3gx8Ljv4iq6v1i8Zh6moISRZHzHpFG+dTc/ejEa6eUG9Kmc6yQg3ulYjFs3QSO3wWeD3lfJ28uM+q7mFLDquOiBAJ5pA3cA/3LupRTXEHrGExDoCd7fxI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=L8bibeUi; arc=none smtp.client-ip=79.135.106.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="L8bibeUi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail; t=1787655624; x=1787914824; bh=el0ckJyITQBcyMzLRk7pDSGAYgyQePG9Nu8b8f3Hh54=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=L8bibeUicnFFoDCPHx8kwWFRlY/pG6kDuqTvEXdB37ZJiZI4x6KW9TC7DBaax+LVi pSsWW+wCMfWftkbz4E0TgzVB7sWl9sw+fF9jhGSmhQ9L8SQt1r6nqcyAaiNisXG8Mk jw9xjbbrKTH9DZctHwtQF3o/wXmXmzfjc26amaS/VWUph0ce3D5702J7XWyu9wZEns DArRD/AGutSPrzdBwfVyW0C6y6gVHNlEJvD9C0H5hOCPHPDWV1itBv5+Uba7BMeI/M hIrDuaWvxcH5rV9lWeZsCgzG/jh5p+tvgKBlM3+cL15km6IDbirRWpcnXsEbTwbMGG TMe124eunRXWQ== X-Pm-Submission-Id: 4hTlDk67C3z1DDXK From: Esben Haabendal To: "Joshua Crofts" Cc: "Jonathan Cameron" , "Lars-Peter Clausen" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Martin Kepplinger" , "Sean Nyekjaer" , "David Lechner" , Nuno =?utf-8?Q?S=C3=A1?= , "Andy Shevchenko" , "Martin Kepplinger" , "Christoph Muellner" , , , Subject: Re: [PATCH v6 9/9] iio: accel: mma8452: Use proper error code when missing device model In-Reply-To: <20260825122301.0000531e@gmail.com> (Joshua Crofts's message of "Tue, 25 Aug 2026 12:23:01 +0200") References: <20260825-mma8452-open-drain-v6-0-9b252804ee80@geanix.com> <20260825-mma8452-open-drain-v6-9-9b252804ee80@geanix.com> <20260825122301.0000531e@gmail.com> Date: Tue, 25 Aug 2026 13:00:21 +0200 Message-ID: <87fr02o46y.fsf@geanix.com> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Joshua Crofts" writes: > On Tue, 25 Aug 2026 10:27:47 +0200 > Esben Haabendal wrote: > >> The device is there, but we don't have data describing how to use it. > > A bit of a weird commit message IMO, :) > I'd do > > Switch -ENODEV error on i2c_get_match_data() failure to -ENODATA to > satisfy the IIO coding style. (but this is only my opinion). Sounds good to me. I will update for next version, if needed. But feel free to make the change when merging. /Esben > (We recently had a few conversations about -ENODEV vs. -ENODATA and > while there are a lot of uses of -ENODEV in IIO they should be replaced > with -ENODATA when checking *_get_match_data() results). > >> >> Signed-off-by: Esben Haabendal >> --- >> drivers/iio/accel/mma8452.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c >> index 4a1eb196589a..42e3371cdb1d 100644 >> --- a/drivers/iio/accel/mma8452.c >> +++ b/drivers/iio/accel/mma8452.c >> @@ -1595,7 +1595,7 @@ static int mma8452_probe(struct i2c_client *client) >> >> data->chip_info = i2c_get_match_data(client); >> if (!data->chip_info) >> - return dev_err_probe(dev, -ENODEV, "unknown device model\n"); >> + return dev_err_probe(dev, -ENODATA, "unknown device model\n"); >> >> ret = iio_read_mount_matrix(dev, &data->orientation); >> if (ret) >> > > Reviewed-by: Joshua Crofts > > -- > Kind regards, > Joshua Crofts