From patchwork Fri Mar 10 07:39:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 67252 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp736498wrd; Thu, 9 Mar 2023 23:46:36 -0800 (PST) X-Google-Smtp-Source: AK7set+EN3jvJ1RtBb0g/19TT3D+sccfaevkIbdFPqUd411u4v43JzoxNfSk3JzwfoI1UaGX0ytJ X-Received: by 2002:a17:90b:1891:b0:234:a9df:db9b with SMTP id mn17-20020a17090b189100b00234a9dfdb9bmr1459972pjb.13.1678434395762; Thu, 09 Mar 2023 23:46:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678434395; cv=none; d=google.com; s=arc-20160816; b=JKg8IhyIORzZZkqMFbEqjLe0XqEzpnRKFgHji6CRnuQdxvqqdLCnQEyfFdKF23xhCK 6rUZ4lb0PC1UNV/ct+u+iIv0BfF9W9X9H2WsT+BMvOf33H/u7YNFuCks+mnaiM1xtF0+ UgzMBkI4+MzkRjIbRZpXsLG4HB1JxH4RkjJ+zUtrv6EpUcROABhlZvABtW9bFQ0Ww1Hd og2VFQZkcWnT7or5877tB9sPLE1rDsywnAIpfdJklMZwMDf3ud1cF85duZzWsQLrWUAf bjjaZsOBIqv+BxKOzwzGfNJcp7P1zedh9s2pnznOkOpcFFZoBqM5oL/wcZ0vukmyTj07 X3Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=2rW9oMWvY+NquKDnF5bLOq8e5GEMLalpiu7hkMsEjBo=; b=D4wLK24wXRJVaf2qDRkRYctUPi5li/+1alXXue3ZFjdJLvS8uAxI5VJhNqNsun4iIT 6PppNo0Y5Q1t7Rkk7K165HBouUsLWF8g9+UeX29htenBuqlQOCEcqLNaJb8706QLjz8B q+WhQu0xfTDVWiOoU2vWLCH5xdVmfyrlrRh/KJ5P4i+vQGlyKmQIupbLRUfg7CuX1zcn jJIiWUvQZ4I9r4f3WgOswBboaR4UQfJszjJAxSGVbrT9oPeBneHbBk7Ruy4f76+bazpY TQ9ILj7jxMWdeo78ob0fkQ13oMEY7BfiDE86rL7feuy5eyv6oW9duG4gBNcrtyOQCqvk Qp6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=YAUb3NyW; dkim=pass header.i=@tq-group.com header.s=key1 header.b=SIBj3YJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v5-20020a17090abb8500b00225c981fee5si2022209pjr.112.2023.03.09.23.46.21; Thu, 09 Mar 2023 23:46:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=YAUb3NyW; dkim=pass header.i=@tq-group.com header.s=key1 header.b=SIBj3YJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230201AbjCJHjm (ORCPT + 99 others); Fri, 10 Mar 2023 02:39:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230126AbjCJHjd (ORCPT ); Fri, 10 Mar 2023 02:39:33 -0500 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3F84F31F1 for ; Thu, 9 Mar 2023 23:39:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1678433962; x=1709969962; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2rW9oMWvY+NquKDnF5bLOq8e5GEMLalpiu7hkMsEjBo=; b=YAUb3NyWooQ+Vd/AvUw1iFoWUUTzk9L2Xu+1OioGmfCOg6pUwsn2V4z/ 3SsNzCVyfZOPlDycwZlhVbiYm0aGbwHvMoKdZRyJpm9EjrrWSoIgLLBCG OfvCcv+jEg7XVw8fQT3QXglYx3vp4wZRgAA113JwKIen75aPVx5UIMSFA HyxJY0MboXYCEOR1jSysq7QhS3UhcpjPECCvIM4eVYTGeJRcGKBIlSf6P T7+ADdyHHMd7Tb0LD4JqgPh/AnHqpwe3Sn2Zbr5kgZ63xP3RK0JoJIL4v wjZcm2HTMOodYxxmH4NvPSzi8yleF3F9mKeaI9GpQBLNWlR7SMsM6PGHR g==; X-IronPort-AV: E=Sophos;i="5.98,249,1673910000"; d="scan'208";a="29596581" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 10 Mar 2023 08:39:17 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 10 Mar 2023 08:39:17 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 10 Mar 2023 08:39:17 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1678433957; x=1709969957; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2rW9oMWvY+NquKDnF5bLOq8e5GEMLalpiu7hkMsEjBo=; b=SIBj3YJi06VcVu0A2UxJudDjWg6BIt+nAcCugGlvS7a3WVzAvmecpR06 iek8vpUKKQZaE2TpjpXKxYK9zThKulMnwA2sVUy4+47TMFj4poa39hHek DrwPg6Isn9N7bOLt3qF0nmUP5r2GK38PJjIRufvwzuUtgMDxGeValG2fS BYeThnSXyXrbFkxs54o0DfLjOoaU4NOx0k7mE+HN0ReU9i7wFb3Q5AZMH 3WXSvNEF47GT/HSTpZoTF3kC3vQ6+CqpCZ8aUviEFibGeHVtBJkyOVsZN eZELXPP3H1xm9e2cR5Kx1DV7ycfAWDhSo8tKcVju2Dx3iPKRkpi913Q1C w==; X-IronPort-AV: E=Sophos;i="5.98,249,1673910000"; d="scan'208";a="29596579" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 10 Mar 2023 08:39:17 +0100 Received: from steina-w.tq-net.de (unknown [10.123.53.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 33D7D280072; Fri, 10 Mar 2023 08:39:17 +0100 (CET) From: Alexander Stein To: Mark Brown , Greg Kroah-Hartman , "Rafael J . Wysocki" Cc: Alexander Stein , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] regmap: cache: Fix return value Date: Fri, 10 Mar 2023 08:39:11 +0100 Message-Id: <20230310073911.3470892-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230310073911.3470892-1-alexander.stein@ew.tq-group.com> References: <20230310073911.3470892-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759966025105502627?= X-GMAIL-MSGID: =?utf-8?q?1759966025105502627?= checkpatch.pl warned: WARNING: ENOSYS means 'invalid syscall nr' and nothing else Align the return value to regcache_drop_region(). Signed-off-by: Alexander Stein --- This warning popped up while initially returning ENOSYS in patch 1. But I'm wondering if returning 0 for regcache_write is correct or not. This might be a follow-up patch though. drivers/base/regmap/regcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index b61763dbfc68..c13f5f8872ac 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -242,7 +242,7 @@ int regcache_read(struct regmap *map, int ret; if (map->cache_type == REGCACHE_NONE) - return -ENOSYS; + return -EINVAL; BUG_ON(!map->cache_ops);