Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3562453pxf; Mon, 29 Mar 2021 05:49:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWFuG14gmwNiB6tYt79175jobIM5LAspCsiuW4pTatSvXR6P5V62AD52lqLJLuXMmd81CB X-Received: by 2002:a50:fc08:: with SMTP id i8mr23166876edr.277.1617022157567; Mon, 29 Mar 2021 05:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617022157; cv=none; d=google.com; s=arc-20160816; b=F93U1xpEHG+1VWja+f1K9gSn1nKx+z4LMSm7JGkXHIA1WyfrnNBBIoFx5VpOErTlZr JJdqKFNGUp5iFOr8xhDZ+ra1XfEgNINT4LpzX1D/9/QeYgXErAFMhrQ20kgBuWNLVAF7 XUkAPULO3kbHFm2Lq5yj/R77/PjDeirP1B74ruQFNQmiLIhsbYLOUHqXkIIs4ALVaYoq ZrRSEgItJPEWDwh0BHw3hOExg2IgYs09ouV8SbUqsPZzJhm/qNVkNAZuvGiOPJoh/cFo 6Ly8atTwroQSjo1O59CZ2ZneNX8ZzXZx6Ap4H5j472aNqm8BA2MDD8o/801zPfDizT2G 9khA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:user-agent:date :mime-version:references:in-reply-to:cc:to:reply-to:from:subject :message-id; bh=qcUkrZxCZhAMY+mD6RDntHpxB7c/p3mawg28QpuxShY=; b=jR39lusm38ImwJfN0LwBm4vhOIEnaFvSNdAIpe2sjx6MB7bz2rJtasn+0Qc0N8J586 BNjxuAwoKR0OdsAE4qGkLvCcw6eBNjKAX9Ui4ezlRONa+dq7RTJLmMr25xisPMW7U+jo cACvArkeDlXk158XuPKCi0FZSSJA9LumUvYTgJWwdD2XTmLoN21mtKDdPtAoXLpkalNh rHnCCo4Oyi54niw9pYa5ezWfKcOTG6M7Aa6OFzsl7T46TA2A/oLfqe+VZN1EtUOVpPeq x2RSaiz6P7W1AduUwMmv9vKs5UDsNUYJeUJcTfdRrMwdhL4qsGkd0FgYCIKuGGP6nf/P 7O+A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si12852000ejc.452.2021.03.29.05.48.54; Mon, 29 Mar 2021 05:49:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231178AbhC2Mrr (ORCPT + 99 others); Mon, 29 Mar 2021 08:47:47 -0400 Received: from mail-lf1-f52.google.com ([209.85.167.52]:42568 "EHLO mail-lf1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230437AbhC2MrY (ORCPT ); Mon, 29 Mar 2021 08:47:24 -0400 Received: by mail-lf1-f52.google.com with SMTP id o10so18196416lfb.9; Mon, 29 Mar 2021 05:47:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:reply-to:to:cc :in-reply-to:references:mime-version:date:user-agent :content-transfer-encoding; bh=qcUkrZxCZhAMY+mD6RDntHpxB7c/p3mawg28QpuxShY=; b=TpjX4pNbD75w4xB+txGJdl9x5PI+sU44yTheoTNZC/w3MdNn3/hyVW9La3tv3HaT0/ Lr8SCKMQ7KI1ntgzy93y4u918nOG2DzOWYJOMzBIidjgemTTaIRitt6jlL5LmNHpojig W/7VGxfpzDUVixkWAR4EXI6ab0ILYYpogJpV+I1Xh34atEVUsq2QO0jM6CaOmHT4kShx bhOAcJI8k4WTHRoyVIu+/8qsDlmGj48vlEyl8xPbVt2nA55CuTLPXrTp31O+v3RBHiSd wyQAcLoIoYJdaCZu7ha+3XxIXhLOQ5Afn9quBHeVGg8y9nwklL2/H2O6RM9hbeIMOXkR OVww== X-Gm-Message-State: AOAM530kUIKiVXX2APdJR6nkeNt6iDqXWgRQgsIvVwI3AGJlVTQqVoHT DzHhMkwV1adr5gQ1/Fa0LHCxZAxNP++PPg== X-Received: by 2002:a05:6512:5d7:: with SMTP id o23mr16028798lfo.81.1617022043565; Mon, 29 Mar 2021 05:47:23 -0700 (PDT) Received: from dc7vkhyyyyyyyyyyyyyby-3.rev.dnainternet.fi (dc7vkhyyyyyyyyyyyyyby-3.rev.dnainternet.fi. [2001:14ba:16e2:8300::2]) by smtp.gmail.com with ESMTPSA id f22sm1826514lfc.68.2021.03.29.05.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 05:47:23 -0700 (PDT) Message-ID: Subject: Re: [PATCH 2/2] gpiolib: Allow drivers to return EOPNOTSUPP from config From: Matti Vaittinen Reply-To: matti.vaittinen@fi.rohmeurope.com To: Andy Shevchenko , Joe Perches Cc: Linus Walleij , Bartosz Golaszewski , Stephen Boyd , Andy Shevchenko , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 29 Mar 2021 15:20:07 +0300 User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-03-29 at 14:59 +0300, Andy Shevchenko wrote: > On Mon, Mar 29, 2021 at 2:43 PM Matti Vaittinen > wrote: > > The checkpacth instructs to switch from ENOSUPP to EOPNOTSUPP. > > > WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP > > > > Make the gpiolib allow drivers to return both so driver developers > > can avoid one of the checkpatch complaints. > > Internally we are fine to use the ENOTSUPP. > Checkpatch false positives there. I agree. OTOH, the checkpatch check makes sense to user-visible stuff. Yet, the checkpatch has hard time guessing what is user-visible - so it probably is easiest to nag about all ENOTSUPP uses as it does now. > I doubt we need this change. Rather checkpatch should rephrase this > to > point out that this is only applicable to _user-visible_ error path. > Cc'ed Joe. Yes, thanks for pulling Joe in. Anyways, no matter what the warning says, all false positives are annoying. I don't see why we should stay with ENOTSUPP in gpiolib? (other than the burden of changing it). But I have no strong opinion on this. All options I see have downsides. Accepting both ENOTSUPP and EOPNOTSUPP is the easy way to avoid allowing checkpatch warnings - but I admit it isn't stylish. Converting all ENOTSUPP cases inside gpiolib to EOPNOTSUPP is teodious although end result might be nicer. Leaving it as is gives annoying false-positives to driver developers. My personal preference was this patch - others can have other view like Andy does. I'll leave this to community/maintainers to evaluate :) Best Regards Matti Vaittinen