Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1235435pxj; Sat, 8 May 2021 11:22:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA5ByT52yzKxvY31bF9zNS9lS0WkOseN8sQC/p6Hn5CSHN+ThVgvni239ovv9jfd02B2yD X-Received: by 2002:a92:d250:: with SMTP id v16mr14688799ilg.248.1620498138732; Sat, 08 May 2021 11:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620498138; cv=none; d=google.com; s=arc-20160816; b=c+lyGDR2MmLPpuZUi6MKosfLoU4EJ5sPhqzfqSmdOATg6gxOm7vmKzwfvAapx4eaX4 FIdav2gAIOecCnGMb1T8sfxlZSsVPghY5oCcVOndRmSlChgVKB/4cY31gxbt8EVccUVT 1bJ+HD3bkBdAzMDvfViuUSqnaRXGKzfkqj1S0yHXEXkANWVKgb5AWhlrLY3NgUAAPwkT 70BSAuEYo4GZ5O1RK0kQBYNKVCHlcAWwVmboFKPp4do3lfOzSrIyEmFOrmo3L51zQwks zcNTmFrkTLzWRI66OsOCF5Md7y+0d55w3gi+gDS6bsnQzpS4zNOt3xyLs87IKUmku6IC gfLg== 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=vpLZHnBATYASHX2qyiYXjM99nZsADzAJuHz545iDnMw=; b=wOEDKDqx7hQo+bEU6BoBH0gWJSdAhehC7r0DIlM9PagnAH3cojzGKh0AhjlYdBelKM TCpd7B5h7z3J893V6LAHw4QalsvhSkeXVXVpm1XasfZa8ynm/4ts8mLL0eC89luQQDIV x8gihuGYKxrnLkSWpGjztzo+Q92LYr+1D8mhaDU6Pfdebis02ds4luntX+LXJQCIe4hz A1uzoVM5pQrhWAdW4M4tB6pIBfBuNKQVvlZRdMPch3vA5+PIbU+sso1XC8uiUowaA9e8 uOKEfjR812tyy4g4Ql+S3zSXqlk9mljhvuOe8dD0tX8Xf75nMAn0OzuMKO588jaFMKe9 Lidg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mO2WlNzo; 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 a5si10758161ilv.74.2021.05.08.11.22.06; Sat, 08 May 2021 11:22:18 -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=mO2WlNzo; 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 S229618AbhEHSWY (ORCPT + 99 others); Sat, 8 May 2021 14:22:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbhEHSWX (ORCPT ); Sat, 8 May 2021 14:22:23 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D36F3C061574 for ; Sat, 8 May 2021 11:21:20 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id a36so15663793ljq.8 for ; Sat, 08 May 2021 11:21:20 -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=vpLZHnBATYASHX2qyiYXjM99nZsADzAJuHz545iDnMw=; b=mO2WlNzoRrtDS3eRiZFmbBIjJyWzwqejoHEMnZi79SbFMnr2JnZlY/c0Qoa5dv2XAa rCqqL771Im0TYp8v8wom22qna9AviEv5GvP2xEN3HPrm4OirjqN/6a2+qo2xjLfRCdGS o6VjV+OsbreQ5X/On0x2vINCoRmDEQJXps/e0eWqOQxzd6K+xS4bVvqIEGkEfpHaMDoN U2a/GNhxpYXZmNStIu9c8uecnLb/XrhnvypOWIgCSiauXyjfDsmm757GhDphaPVapoGX GNgDiFliI2KVvv2dNk7v6quVqcNjXwP6d+vUpHr6/uA3TsgxezqthST2NFx3bYwTfJ94 Ttng== 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=vpLZHnBATYASHX2qyiYXjM99nZsADzAJuHz545iDnMw=; b=VMJv8PzHDdk1rkgJyNqBt7Ig2mWbxEL4mk+4E8BFG9YCwN7r7nM/9Uy8+1veuanxfD Ky4azUF5U3lphbZJQUfmcdHLCDMxiYNBAfJat+pDMueqXY/gASvtiyC8cRgCaql/xQpP jKYF3bqU9jKcwZNLdFj+ztPTntted+Ep1V/T0HnImjFRXJ8mFhnqFg7f+wYGD1UHknvY GDbB7quGM2KoaM0gdBN1fJijTjbjMVNE6DrpteZ6FKxTn5FDM8XBtzz+ZyUU9RFr0OKy aHFjsCeiODgbM5PEHwkImGWBFCJo2aFCWVOnJUPF4+nhvhkJkhAbQ9iQPJ7Tvviq/tVh DPBg== X-Gm-Message-State: AOAM530e13xSsWwP+93YYkNyiJVfxEK+Z+mSsjsm0chfofNpc09GUUzo vfkS3FS4q+LjMu+KRxte9PBoS7SlveYLCD+Ehla0gp/gTPM= X-Received: by 2002:a2e:2e12:: with SMTP id u18mr12755146lju.200.1620498079364; Sat, 08 May 2021 11:21:19 -0700 (PDT) MIME-Version: 1.0 References: <20210503144350.7496-1-aardelean@deviqon.com> <20210508161643.5990ec15@jic23-huawei> In-Reply-To: <20210508161643.5990ec15@jic23-huawei> From: Linus Walleij Date: Sat, 8 May 2021 20:21:08 +0200 Message-ID: Subject: Re: [PATCH] iio: core: return ENODEV if ioctl is unknown To: Jonathan Cameron , Greg KH Cc: Alexandru Ardelean , linux-iio , linux-kernel , 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 Sat, May 8, 2021 at 5:15 PM Jonathan Cameron wrote: > On Mon, 3 May 2021 17:43:50 +0300 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 > > This is going to be a little messy to apply as lots of churn in that file. > What I've done for now is pulled the fixes-togreg branch forwards onto > current staging/staging-linus but I'll do that again after > staging/staging-linus moves onto an rc1 or similar base. This is starting to become a recurring problem is it not? Have you considered the option to start to send your pull requests to Linus (Torvalds) directly? I suppose the current scheme is used because IIO changes can affect drivers/staging/ but at this point that thing is so much smaller than the stuff in drivers/iio proper that I start to question if it's worth it. Unless you really like to base your work on Gregs tree for some reason or other, that is. Yours, Linus Walleij