From patchwork Tue Jan 23 12:24:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10180509 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 285BB6037F for ; Tue, 23 Jan 2018 15:24:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21BB7284FF for ; Tue, 23 Jan 2018 15:24:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16782285C8; Tue, 23 Jan 2018 15:24:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 656F3284FF for ; Tue, 23 Jan 2018 15:24:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751125AbeAWPYx (ORCPT ); Tue, 23 Jan 2018 10:24:53 -0500 Received: from mail-cys01nam02on0056.outbound.protection.outlook.com ([104.47.37.56]:28608 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750937AbeAWPYw (ORCPT ); Tue, 23 Jan 2018 10:24:52 -0500 Received: from CY4PR03CA0015.namprd03.prod.outlook.com (2603:10b6:903:33::25) by DM2PR03MB479.namprd03.prod.outlook.com (2a01:111:e400:2420::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Tue, 23 Jan 2018 15:24:50 +0000 Received: from BL2FFO11FD027.protection.gbl (2a01:111:f400:7c09::156) by CY4PR03CA0015.outlook.office365.com (2603:10b6:903:33::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Tue, 23 Jan 2018 15:24:50 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD027.mail.protection.outlook.com (10.173.161.106) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Tue, 23 Jan 2018 15:24:50 +0000 Received: from b29396-OptiPlex-7040.ap.freescale.net (b29396-OptiPlex-7040.ap.freescale.net [10.192.242.1]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0NCPDun025479; Tue, 23 Jan 2018 05:25:14 -0700 From: Dong Aisheng To: CC: , , , , Dong Aisheng , Stephen Boyd Subject: [PATCH 1/1] clk: add more __must_check for bulk APIs Date: Tue, 23 Jan 2018 20:24:45 +0800 Message-ID: <1516710285-23683-1-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131611946906940031; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(396003)(39860400002)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(36756003)(316002)(97736004)(104016004)(68736007)(498600001)(53936002)(2351001)(48376002)(106466001)(105606002)(50466002)(16586007)(54906003)(305945005)(4326008)(6666003)(8676002)(86362001)(6916009)(5660300001)(107886003)(356003)(47776003)(81156014)(8936002)(81166006)(50226002)(51416003)(26005)(450100002)(336011)(2906002)(77096007)(85426001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR03MB479; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD027; 1:EDppY0Q2aiBNPngQGaTkB2iNNevEYfT8LnuNBYP9uCyO2q7e1oIZcwrPqz6sH4fvQgUmjiDAzZN81har7zp/dqkf0h3tXsrg8uhA9mYumpKeahEMi4DOyWjBXZ6NhyBX MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7b21f9bb-5c8d-4511-911e-08d56275720a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:DM2PR03MB479; X-Microsoft-Exchange-Diagnostics: 1; DM2PR03MB479; 3:hu4o/eVemQla+sj2pGIgHWARkhsK/TmzUHCQqbyxAk8aw0slAewTS9YYQ9wUjGAhMlggPNdGbd5HQ12PG+4SoUoqrx5Y8goMAsXPkReKaCLAzlgkv2A1F/7PvHTMkKsL+U3S9F4QTraenD3aiXDuqU6PL74LQHm3njzb4K18Sf650QoQiyLUacR1G06NF5FT1lVDhp7kgKtsQVseMZigwtsmm0r1nNTkXkF23vSo/dlE0KRjSmCRDLxyQQe0NfJ0TYJ2KjdIayREKYgIPe0PDwHkTpq1urabqG3jqU4oFFCE84mIATfHzZGYkhe1R3mdbyVYE2Zky46tzaeKKMEXFTsIlAdaSxmQsbQ+akGT6LU=; 25:zkm8h+j48ZH0N/MLO/NuLLdlsRTA1Da5ZEkFMgdArGu8ITK7U1Ni6f8jVvTxT6htvog+YrmRWKFAwlUNzskBUW6gJ3LhfLB/igD6TbOwt53LX5c9LuaBV4KlgxJ4h3aAfFEQq36KmaOYIG0qgiZEGf1pYsy0VY8WLtI+bybo9AzN9wpJB0yKMYSe0sdE/Ae3yZHXa8XGAnWzIr8AJ2GkqWMasds4RxoEMFgVFKR39fEaJwDrIuhDZlhP5+/4/ieTY0xmXrQur7bu9mTv1KupldNLR7/Dl7rSSSpsGHh+W4ffe3wWB9F/3KIOjVMLg9pSBD20LRC9k8Y/J7+kSAa5jA== X-MS-TrafficTypeDiagnostic: DM2PR03MB479: X-Microsoft-Exchange-Diagnostics: 1; DM2PR03MB479; 31:xcP7sdtQUKPE0Jh/Q6eVjGpYk2ErMCrz5/VEnxlj8ycUj91MwnTvawMTbPsumr2ul6bc3+XHdZZr+t3MQs4QnaUJZ0XkOomUsJHXdYOZeCqRftEpQdk3NsSEYSIdYffGxYo1L7NfFjZmJWPggLxQTbLccZ/Q+Z2Eo9IKR/z3rrQFRlLnKwJ0XFtRe2pzWGi4ccM4kblkzkPELId7zfK/PwOBnWdH+hxZEOScSz3QlOo=; 4:aIuY+faCedoc1fmkXG1HNC+S/GgGdfJuoaCQyP1vyRayZbETU7CI+kY35XWE/H3SgR97by5RktSTPVJi+EIYhy644ZsivQOacsLSg/ESZtVr/kqtA3Hb2n1aHDnKXRX1odP06N4i6HxebzTBrdGLkPoGOgRVsPgGh8ABXFDey7+oQFF3FN0aq3eOOy3gyDvLPWy+ag04fj0nzmWfHoLN7jOE8AqtybDGx6A/H6ftkZGY1kJWyOyZujsjCzn7BTA499MtW4lDrEO01w4smVhqWqQ3hQthrNH4VudS6DnxxnSPCdaDLF+dEAJu8ScoSygI X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3231023)(2400081)(944501161)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(20161123556025)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(20161123563025)(20161123561025)(20161123565025)(20161123559100)(201708071742011); SRVR:DM2PR03MB479; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:DM2PR03MB479; X-Forefront-PRVS: 05610E64EE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR03MB479; 23:hCrhd13aLngHLRYN3onntDZjKOP9JImr1du0IKaVwB?= =?us-ascii?Q?VvlkeGsHqyrOkG34AnIK56Z04MnWXRgcc8nQNxdw3kjsjfFa6ewARBjWsUyI?= =?us-ascii?Q?YKr4qEX3le1hZEyTBKAUTynDbhdcfyFma+DC7yTZVw76vGs1uhz9s+lIoJyv?= =?us-ascii?Q?f5vmg2PgQb+wGmlKfQvFDtHKnbfZ0I/rEZSCLJx9E81Zs5ZCbxtN/rLN32lH?= =?us-ascii?Q?pDMcmlhxSOE141+azNqhOVgu8UEV6Q66eVgwyvhQdvD0MvzGpJLz6e1AZoKP?= =?us-ascii?Q?wfm/ySl1fsjQaAdpICzqHFWJCXzCXPSpKkSlOKH7MQymOK005ljrujzkYcGZ?= =?us-ascii?Q?sZAni5dNSMt3ZNjxN50mYhE8nvjo7+hiTDwQOn5xqHNzUXEnVW0LVibEs/86?= =?us-ascii?Q?SNZGAaczWNupflDzELDgvd0/M2FE5VfZpEaNFmW/LS38mLGgsfy+OGpCG1+g?= =?us-ascii?Q?0C9nlV5Zq/gWXYNSFzGzt/LAEfZPaRj4csYHfs9u1oDKfqtpq53XnV8+zUZc?= =?us-ascii?Q?ThtN27hDsFXSDAgouf9DdlNw8fYrJz9SHxVdyWuZVwfIoO+f2Mt3c4Z/aJNY?= =?us-ascii?Q?HTmSoi0czSMlx0IYHFDCAUmZKjX8kPiWm8tdk3l7TZZ95p8QXr2UYgZfxVeO?= =?us-ascii?Q?EWVPSNgIJj7rMSoAfumgDmZqAXBfsjBFK5fpHG3+Abl9NRoz1W42jyTXORyA?= =?us-ascii?Q?jpefE4RHfXHxtNnEtxtycZ5+h7Of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aAef1jKOEa8GI+WWSk2lOHeYXBHHQjuxX6Q6pNha74mPPSkA=; 7:cVIcSKWrX/bnpjc9X2FIDqp5RVrrsblbBb6j13YadmkIbab5sz12kECBwXAv3XUd4et7fLwGDNbwKnMNFBVoerc5wDESvU0p7ZECskGSN7+0sCTAFfdbPGqzwZcTR78kIWlnasPKtuSJDKLb/IOLTGGz9E8jy/6jzlNmxLOkSUAj+AHy4YlXux3UyfMIaLxxTpbF5AfuagR7TI2p+secu7gwolxNdzAGwxSXq/rRxufXactZDYcEJQqKpbUhsZZg SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2018 15:24:50.4912 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b21f9bb-5c8d-4511-911e-08d56275720a X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR03MB479 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP we need it even when !CONFIG_HAVE_CLK because it allows us to catch missing checking return values in the non-clk compile configurations too. More test coverage. Cc: Stephen Boyd Suggested-by: Stephen Boyd Signed-off-by: Dong Aisheng --- include/linux/clk.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/linux/clk.h b/include/linux/clk.h index 4c4ef9f..0dbd088 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -209,7 +209,7 @@ static inline int clk_prepare(struct clk *clk) return 0; } -static inline int clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks) +static inline int __must_check clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks) { might_sleep(); return 0; @@ -603,8 +603,8 @@ static inline struct clk *clk_get(struct device *dev, const char *id) return NULL; } -static inline int clk_bulk_get(struct device *dev, int num_clks, - struct clk_bulk_data *clks) +static inline int __must_check clk_bulk_get(struct device *dev, int num_clks, + struct clk_bulk_data *clks) { return 0; } @@ -614,8 +614,8 @@ static inline struct clk *devm_clk_get(struct device *dev, const char *id) return NULL; } -static inline int devm_clk_bulk_get(struct device *dev, int num_clks, - struct clk_bulk_data *clks) +static inline int __must_check devm_clk_bulk_get(struct device *dev, int num_clks, + struct clk_bulk_data *clks) { return 0; } @@ -645,7 +645,7 @@ static inline int clk_enable(struct clk *clk) return 0; } -static inline int clk_bulk_enable(int num_clks, struct clk_bulk_data *clks) +static inline int __must_check clk_bulk_enable(int num_clks, struct clk_bulk_data *clks) { return 0; } @@ -719,8 +719,8 @@ static inline void clk_disable_unprepare(struct clk *clk) clk_unprepare(clk); } -static inline int clk_bulk_prepare_enable(int num_clks, - struct clk_bulk_data *clks) +static inline int __must_check clk_bulk_prepare_enable(int num_clks, + struct clk_bulk_data *clks) { int ret;