From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2948BC433E6 for ; Mon, 22 Feb 2021 04:43:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E051A64E04 for ; Mon, 22 Feb 2021 04:43:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230164AbhBVEno (ORCPT ); Sun, 21 Feb 2021 23:43:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230044AbhBVEnj (ORCPT ); Sun, 21 Feb 2021 23:43:39 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C484C061574; Sun, 21 Feb 2021 20:42:59 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id p5so2100511plo.4; Sun, 21 Feb 2021 20:42:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nKtPFB1xyx73OQfeVTdioOSSM0I1Aror0iPkO5KBpc0=; b=Re2HcRKTF4oDMZmpesnJOT49BwGsqOQ5KGgusmwalLvCB7TfEYfXSeo69BzwRE689o z58SuWtj9UWQPTrO8Z6Ukn520ek2bdjIgYtTZh+TbOboMuZSsw+36lHU8Ya/QD29l5ki 0giww37q0kTVuFy3iMPRR99RUBLWtg0PPIl+y96/9d0yXJHhCPfjRnXiJXZjBQw36mkp Ok8D7aZp4iitcIBZLJhf+1dLyovaqdm9lQK0Y0yd5hn7JHKWdg4t6aqvUrG3zoic/fqL ZQ4UHyytn1+2ls0uNt/rARQjCI9kM74p5UWoxT7ro7xyVwBBaqNf6JyfIprf7vHvg0K1 YWmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nKtPFB1xyx73OQfeVTdioOSSM0I1Aror0iPkO5KBpc0=; b=nB/PzMQnvoaAiGT/4WawLQj+/EGbyeQLs8gpfCugHTaL0waZjMqwtzcLYqqLZVnsYL GELGX3xYfN4gj+/hL3DpRIWrljxfunnRPqLlScGsybh5hBinyQ802E0YqlMOJ5C5pxA4 9AVCVV7THtLOotDufKPOi/urQKTRLtVcsgctlKEfSmlOiTpx/Gx7ra0/qhbHzpCTk3ER ZcShhxw6MvJCSiqmyVNmhQQfrGaSCCBHKwuxiHWrok7sdPWOCuCemBu/bVlhWh1DNIY7 0utGg/Oe9ZmSUhDkTARSWWPVCR8K65Jd2GajpT3hS+yFMUQRoY1A0qsPj9KWbyBLH2+W sjrA== X-Gm-Message-State: AOAM531m2aFY8knn25llX7cBeQn93ygECXySnxZVyASZV2kCThYm1CmI XA2Ybz42+jTN5enHta8CZvk= X-Google-Smtp-Source: ABdhPJx4YWkwy4GkpN7j67wTtgRujttnGXkdr8fmpug5JI4lVDWB4gqo8OpDW5W+tWoXKI3txVZKjw== X-Received: by 2002:a17:90a:6589:: with SMTP id k9mr21210384pjj.100.1613968978881; Sun, 21 Feb 2021 20:42:58 -0800 (PST) Received: from shinobu ([156.146.35.76]) by smtp.gmail.com with ESMTPSA id js15sm8400296pjb.37.2021.02.21.20.42.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Feb 2021 20:42:58 -0800 (PST) Date: Mon, 22 Feb 2021 13:42:51 +0900 From: William Breathitt Gray To: David Lechner Cc: jic23@kernel.org, kernel@pengutronix.de, linux-stm32@st-md-mailman.stormreply.com, a.fatoum@pengutronix.de, kamel.bouhara@bootlin.com, gwendal@chromium.org, alexandre.belloni@bootlin.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, syednwaris@gmail.com, patrick.havelange@essensium.com, fabrice.gasnier@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, o.rempel@pengutronix.de Subject: Re: [PATCH v8 09/22] counter: Return error code on invalid modes Message-ID: References: <58e7c59bb7c7bb94c8655903308842d9d9e9907a.1613131238.git.vilhelm.gray@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="H+2x3VvQXXETcoRB" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --H+2x3VvQXXETcoRB Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 20, 2021 at 10:43:06AM -0600, David Lechner wrote: > On 2/12/21 6:13 AM, William Breathitt Gray wrote: > > Only a select set of modes (function, action, etc.) are valid for a > > given device configuration. This patch ensures that invalid modes result > > in a return -EINVAL. Such a situation should never occur in reality, but > > it's good to define a default switch cases for the sake of making the > > intent of the code clear. > >=20 > > Cc: Syed Nayyar Waris > > Cc: Kamel Bouhara > > Cc: Fabrice Gasnier > > Cc: Maxime Coquelin > > Cc: Alexandre Torgue > > Cc: David Lechner > > Signed-off-by: William Breathitt Gray > > --- >=20 > Reviewed-by: David Lechner >=20 > (In response to Jonathan's comment, I think this is fine rather than > adding more churn to change all of the breaks to returns - but will > keep that in mind for future changes.) Due to some other updates I'm making to this patchset, I went ahead already and updated the breaks to returns in the few places where applicable. The changes to this patch are minor, but being pedantic I'll hold off on adding your Reviewed-by line until the next revision so you have the opportunity to formally approve it. William Breathitt Gray --H+2x3VvQXXETcoRB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEk5I4PDJ2w1cDf/bghvpINdm7VJIFAmAzNkIACgkQhvpINdm7 VJK9rRAAyu8elp03L+LXeHNMXyjon3ijwzzn9y1RotPVZbIO3A1Ikd8HPRaFB1a2 mveObCiWyOmduF/wqTfzTD0yJ1PlfzyHmqynlw4rqAx5WIc1Tq3vezkl4EoVQCz4 kgaAZrcDNVcRXT2nrmGp7g4LP6hjTlTBD6hYWibN3II8b4iyFO/8VWCJO4U/ipJs wjPNtbh9Zn6Eak6yIbGRGsaZ3g//Bk4I5AQGzCk2fKnh8i8W9FHgNzVvZ5nf2VFf VuAplEmvItTnc4Ua1Qc0YzffEzasDbef0/lVaRyq95DsdJCLLoIxfYXiuvx8P25f O0dR1GkfiFsviq0syAydVjOWvtyEeQZAJbwsuZCVu19ENhNNrk9BGh9WE94vG+Xi 2hFhG1Q6bCDnEQvoqUbBswvdQLtzHRUvfpoo8ZNfwRpjFqsp1bBBebdOO6TKWnH6 +7QvSQF2nEgCT2yxdnv9iu8mrp1wgg8fho+X4uQ+Iqil5lnPu2iG3aud6ooMwWOa YfMwFdHhEotekumCwqXexOkCWOu8wJHrAPcbm+ojv5NBCsFhHvJ7aq5On9+zF+8g BDhWcoRhQhfR6v6u2E52S8KdrQyr1x+mq2rbEy6URexMGlbJL7bPuaYNUHI43hfy pPTwE5lV+R17oNpB0TSDABOVo7Y//VFE3DpwKlsSNx3QYOAhxEE= =oo0o -----END PGP SIGNATURE----- --H+2x3VvQXXETcoRB-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 485F1C433DB for ; Mon, 22 Feb 2021 04:44:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2BDD64EB4 for ; Mon, 22 Feb 2021 04:44:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2BDD64EB4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xP8CzKjV9tKD3fa0/fRvymI/yNCMy7THJD/vewqyK2U=; b=oo1A9cX2XRGC9P5iDQwiZvb1a jdtm5ZRSoofRQhZKADeCZmRAWr+qzW+BqeW77CrUOeKTRvley2C/co5HBPNTAV70zThvfUZDzlYBp zmPBjmT14Rp54GWLxQqWwWtPgDqASJ7pASGLfoeKs4eyvW20l/bGgoTvPMe7iSvEBKcAhUxiysBWI dxvWXYpZgiWMgDq4yUsoQ3O6sCkGpzhugAew/bt6Hxr0WZmkozd+as2YXZmIDxB/J+4iBWag9hI93 f+wLNBXnlBpiWEcLzXhNGN2WR1RCzdURnwwm0mzvLdGziVGru9j3BAVnB/rmNCuxuk/g5/0cHGMNx ueondeVVg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lE33n-0005mv-KG; Mon, 22 Feb 2021 04:43:03 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lE33k-0005mW-UY for linux-arm-kernel@lists.infradead.org; Mon, 22 Feb 2021 04:43:01 +0000 Received: by mail-pj1-x1031.google.com with SMTP id t9so2986463pjl.5 for ; Sun, 21 Feb 2021 20:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nKtPFB1xyx73OQfeVTdioOSSM0I1Aror0iPkO5KBpc0=; b=Re2HcRKTF4oDMZmpesnJOT49BwGsqOQ5KGgusmwalLvCB7TfEYfXSeo69BzwRE689o z58SuWtj9UWQPTrO8Z6Ukn520ek2bdjIgYtTZh+TbOboMuZSsw+36lHU8Ya/QD29l5ki 0giww37q0kTVuFy3iMPRR99RUBLWtg0PPIl+y96/9d0yXJHhCPfjRnXiJXZjBQw36mkp Ok8D7aZp4iitcIBZLJhf+1dLyovaqdm9lQK0Y0yd5hn7JHKWdg4t6aqvUrG3zoic/fqL ZQ4UHyytn1+2ls0uNt/rARQjCI9kM74p5UWoxT7ro7xyVwBBaqNf6JyfIprf7vHvg0K1 YWmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nKtPFB1xyx73OQfeVTdioOSSM0I1Aror0iPkO5KBpc0=; b=A7NqRv3D6+2EqUb01kP5trQ7F0/VUCZXloHtV+W8Dquj4NM/mEZZS8jzep42mqnRZR aJ/X8MeQ2nCAS+maork6FAIFnbYGJZmZVq8J+IAnaJ8rftfXlSs68aVG57DAraHmZydf /fsdpYh7XTJJclRxAcZN1TBB3zYWP7RztNxxEcsdtyDt4OTIcMHqtzuwLY/bZPdSMv9L u6zc+FWItM0zIdYdVQGwcjuBRI9Vk8aQw1gdZCOF9K9E3tQaCACAltukK1QWNF4LH7Bu 5OTqcRdZOrNZL0OwLwEmZa+he+IgEmHAurmww4pxFj3/rzrsjSL41hRw7T6sVGbv9gGG 8+WA== X-Gm-Message-State: AOAM531S1O6i6J4CUOuvI/Y0LzodVf8CIxxa4FcYJFF+w55MncX8gXCD O/5ApQ+Y0gjJsxvyuEtqydo= X-Google-Smtp-Source: ABdhPJx4YWkwy4GkpN7j67wTtgRujttnGXkdr8fmpug5JI4lVDWB4gqo8OpDW5W+tWoXKI3txVZKjw== X-Received: by 2002:a17:90a:6589:: with SMTP id k9mr21210384pjj.100.1613968978881; Sun, 21 Feb 2021 20:42:58 -0800 (PST) Received: from shinobu ([156.146.35.76]) by smtp.gmail.com with ESMTPSA id js15sm8400296pjb.37.2021.02.21.20.42.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Feb 2021 20:42:58 -0800 (PST) Date: Mon, 22 Feb 2021 13:42:51 +0900 From: William Breathitt Gray To: David Lechner Subject: Re: [PATCH v8 09/22] counter: Return error code on invalid modes Message-ID: References: <58e7c59bb7c7bb94c8655903308842d9d9e9907a.1613131238.git.vilhelm.gray@gmail.com> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210221_234300_995919_58B3D327 X-CRM114-Status: GOOD ( 18.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kamel.bouhara@bootlin.com, gwendal@chromium.org, a.fatoum@pengutronix.de, mcoquelin.stm32@gmail.com, linux-iio@vger.kernel.org, patrick.havelange@essensium.com, alexandre.belloni@bootlin.com, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, fabrice.gasnier@st.com, syednwaris@gmail.com, linux-stm32@st-md-mailman.stormreply.com, jic23@kernel.org, alexandre.torgue@st.com Content-Type: multipart/mixed; boundary="===============9001315142732839340==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============9001315142732839340== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="H+2x3VvQXXETcoRB" Content-Disposition: inline --H+2x3VvQXXETcoRB Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 20, 2021 at 10:43:06AM -0600, David Lechner wrote: > On 2/12/21 6:13 AM, William Breathitt Gray wrote: > > Only a select set of modes (function, action, etc.) are valid for a > > given device configuration. This patch ensures that invalid modes result > > in a return -EINVAL. Such a situation should never occur in reality, but > > it's good to define a default switch cases for the sake of making the > > intent of the code clear. > >=20 > > Cc: Syed Nayyar Waris > > Cc: Kamel Bouhara > > Cc: Fabrice Gasnier > > Cc: Maxime Coquelin > > Cc: Alexandre Torgue > > Cc: David Lechner > > Signed-off-by: William Breathitt Gray > > --- >=20 > Reviewed-by: David Lechner >=20 > (In response to Jonathan's comment, I think this is fine rather than > adding more churn to change all of the breaks to returns - but will > keep that in mind for future changes.) Due to some other updates I'm making to this patchset, I went ahead already and updated the breaks to returns in the few places where applicable. The changes to this patch are minor, but being pedantic I'll hold off on adding your Reviewed-by line until the next revision so you have the opportunity to formally approve it. William Breathitt Gray --H+2x3VvQXXETcoRB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEk5I4PDJ2w1cDf/bghvpINdm7VJIFAmAzNkIACgkQhvpINdm7 VJK9rRAAyu8elp03L+LXeHNMXyjon3ijwzzn9y1RotPVZbIO3A1Ikd8HPRaFB1a2 mveObCiWyOmduF/wqTfzTD0yJ1PlfzyHmqynlw4rqAx5WIc1Tq3vezkl4EoVQCz4 kgaAZrcDNVcRXT2nrmGp7g4LP6hjTlTBD6hYWibN3II8b4iyFO/8VWCJO4U/ipJs wjPNtbh9Zn6Eak6yIbGRGsaZ3g//Bk4I5AQGzCk2fKnh8i8W9FHgNzVvZ5nf2VFf VuAplEmvItTnc4Ua1Qc0YzffEzasDbef0/lVaRyq95DsdJCLLoIxfYXiuvx8P25f O0dR1GkfiFsviq0syAydVjOWvtyEeQZAJbwsuZCVu19ENhNNrk9BGh9WE94vG+Xi 2hFhG1Q6bCDnEQvoqUbBswvdQLtzHRUvfpoo8ZNfwRpjFqsp1bBBebdOO6TKWnH6 +7QvSQF2nEgCT2yxdnv9iu8mrp1wgg8fho+X4uQ+Iqil5lnPu2iG3aud6ooMwWOa YfMwFdHhEotekumCwqXexOkCWOu8wJHrAPcbm+ojv5NBCsFhHvJ7aq5On9+zF+8g BDhWcoRhQhfR6v6u2E52S8KdrQyr1x+mq2rbEy6URexMGlbJL7bPuaYNUHI43hfy pPTwE5lV+R17oNpB0TSDABOVo7Y//VFE3DpwKlsSNx3QYOAhxEE= =oo0o -----END PGP SIGNATURE----- --H+2x3VvQXXETcoRB-- --===============9001315142732839340== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============9001315142732839340==--