Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp494750pxy; Wed, 5 May 2021 07:12:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfMtesM027EHcO/Dg8hue1Zz6wQXLi3SIsaAKcoCBXr5JWDQdMXkg7gIYKQEL0d93HYP6H X-Received: by 2002:a17:90a:638a:: with SMTP id f10mr10197422pjj.29.1620223974065; Wed, 05 May 2021 07:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620223974; cv=none; d=google.com; s=arc-20160816; b=lEesw0fRb1Tnm39GATv9NFRvMdMVCfkoakbrA4XBcswEMsD8TRMkKhNTgeCQeemx4W lNccUB6orJZkyNP754+QtWWq4kEjA7C3FCqcdlIWMi0Jsb83kcGo9WPElkWIWChPJJlX iv1vuAoTvP4ccb+ObRXkwcE0QMonr6o9wKzwBK3fqlhgW7U4DHnWortlOw5UeS7Vz9b0 iM8sQjVLT25nQ0uuAdKHErRNZb+wTmoFtThuprZXyjxbbJXhX/zINFXpVIVSb7rM9Trt Dwua9ea5wi0pTVFQoIsI7xdzphIslVuvNvPSfCruo9ia1pt78WCUCEdeRfuINLML75YM TiYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DUJ6wIodjpCneHighQ0GfY8iqpoBiT6LHmEd2Kcx/xc=; b=zlMCiu7EqoY15um2OqEp4Wm+675A78yg90AQIRvQTjuX2kiGMXaFAbZLqPhZh7E9B2 KNX3m2Id2pEI4vGsvxtc96I4V5G5Cmytbud7l6icYU4Nf7yEy4yp8lgup3jwtJM+BbNM k+qaMAz500pZspdw2F8747xh8PToXn1pTMs5ef+igGu+T2KIRLezdyhPr7H17YK46h/r nf+5PROdhMfG5WfgY4ZMp5ofmdavuGSx88T3Kl5PmMdJKrxksa30PM7T7+XdRgiJPiU9 A6ZKGTUh/1AZSWVHHFcqzCkieXvnRRXNwxvae1z5ddOBj5FNKLSNnd7aaRMepB0ngtVA X7NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EUV6OxDb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i16si2789998pju.133.2021.05.05.07.12.37; Wed, 05 May 2021 07:12:54 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=EUV6OxDb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231995AbhEEMxd (ORCPT + 99 others); Wed, 5 May 2021 08:53:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230217AbhEEMxc (ORCPT ); Wed, 5 May 2021 08:53:32 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F3A7C06174A for ; Wed, 5 May 2021 05:52:36 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 12so2343135lfq.13 for ; Wed, 05 May 2021 05:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DUJ6wIodjpCneHighQ0GfY8iqpoBiT6LHmEd2Kcx/xc=; b=EUV6OxDbgS6qzK3ecwukeDactMuVot2m/JQ5e65pqn9Y5KX9Wd0U4L5oGUUHTVMc8T sJTshB6mNhR87tzS/RUDKmqmDpZtp/jo9bgY/Ct9XH7TaNonjfjWYaCgAeffGhlGUuwL Ocm1KpZ1GTP60hKlL1xK4R9ryauExez8czBIh+EjqHYAaxBTcAEka/pXR83SOD/Db9V6 ZBeuEb3hvfy0Mn5rfZMEDpph73rCJFBfpMIoTXc/IBnR0UPvWX2eFwM+hd98bki354Xd 4bQAOMFTyavJo49o2wwbesF9tIzRDR0zbWYURxbxMmh7ypjI6+qua08ndZVANo5e+KGq vvgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DUJ6wIodjpCneHighQ0GfY8iqpoBiT6LHmEd2Kcx/xc=; b=FbW5i8bKjkyMB1E3obV7/4UIvLWbB6peCAEyWH3/A6UCDSkX/ZTo5SFDoxEy0KoXzZ UbD578Vix6JMmr73zia/K/YjCAe2+wPPp0DhgyxYdcKTgiy1YukyFdhOBzVePFoepYVR 9JHyxMCla5cLJjijz1jrcmC9Oa/FDe389xAKwmqGoqEq3KVlT2dk0Qbp4UxXDzyXHwhA q7qjnQTZL+VC1wAjhtzB2vioYQLEkyq29XpqcgZJkb/n92fOExkEUyB+GZUBu+8zClnp tcf/fZh1YSPMSsOEHaXs78G3K5REgFuKEzRhn1runWfD4nBEAIlvb4sF7daeHRhKSAan FH4w== X-Gm-Message-State: AOAM532Y6HmwWWXo9Dp4P6R2hgYPiCbxaQId5YBzyO/TkIlks1NcCldj VcYX59mkw0F6opxzDyTafAzRJ0DT1+5+Cn9Jje44Ag== X-Received: by 2002:a19:b0b:: with SMTP id 11mr19983583lfl.291.1620219154638; Wed, 05 May 2021 05:52:34 -0700 (PDT) MIME-Version: 1.0 References: <20210503144350.7496-1-aardelean@deviqon.com> In-Reply-To: <20210503144350.7496-1-aardelean@deviqon.com> From: Linus Walleij Date: Wed, 5 May 2021 14:52:23 +0200 Message-ID: Subject: Re: [PATCH] iio: core: return ENODEV if ioctl is unknown To: Alexandru Ardelean Cc: linux-iio , linux-kernel , Jonathan Cameron , Lars-Peter Clausen , Paul Cercueil , Nuno Sa Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 3, 2021 at 4:43 PM Alexandru Ardelean wrote: > When the ioctl() mechanism was introduced in IIO core to centralize the > registration of all ioctls in one place via commit 8dedcc3eee3ac ("iio: > core: centralize ioctl() calls to the main chardev"), the return code was > changed from ENODEV to EINVAL, when the ioctl code isn't known. > > This was done by accident. > > This change reverts back to the old behavior, where if the ioctl() code > isn't known, ENODEV is returned (vs EINVAL). > > This was brought into perspective by this patch: > https://lore.kernel.org/linux-iio/20210428150815.136150-1-paul@crapouillou.net/ > > Fixes: 8dedcc3eee3ac ("iio: core: centralize ioctl() calls to the main chardev") > Cc: Linus Walleij > Cc: Paul Cercueil > Cc: Nuno Sa > Signed-off-by: Alexandru Ardelean Reviewed-by: Linus Walleij Yours, Linus Walleij