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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AEB4ECAAD1 for ; Thu, 1 Sep 2022 03:20:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 72D838D0001; Wed, 31 Aug 2022 23:20:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6DB9C6B0073; Wed, 31 Aug 2022 23:20:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57CE78D0001; Wed, 31 Aug 2022 23:20:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 45BFC6B0072 for ; Wed, 31 Aug 2022 23:20:32 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1AFA71208A1 for ; Thu, 1 Sep 2022 03:20:32 +0000 (UTC) X-FDA: 79862063904.25.2584822 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by imf05.hostedemail.com (Postfix) with ESMTP id 3DB92100045 for ; Thu, 1 Sep 2022 03:20:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662002431; x=1693538431; h=date:from:to:cc:subject:message-id:mime-version; bh=kh3q1whhec9iQaOr1qWRk25cOupcHOjgyW8Uz0wxqa8=; b=CuzLgH/QDHGkrmCjERvPwEZFZIe4ZtnJlMsq9Rxy05MvjAn2WuB7L4mc XaqbbmvHh/lfnJ0zipwpgV9ENDiiovjvmbAPEFOFzYO7mdnOFOywFAyD2 MMsW1T/OppKGNXn8vDP/2vZf7J/Q5gJRCQZLOC+L4TmkwGKrdqnVn2bvp ckvpHcLHkh1nSAr+TXVtVWv4sY7/Qxg1F1wAOGUybqWTNtLBAIQ4/XGks SS9OT4Y/mYMrxbX7DfQ526IF3XOyWkDnws2WDJrPYigP6Q1UpBwu3Wjy2 dHODyB1G77+bKjluc8lTJvwTDOUVcy3XvAcXBGoe+Hl8Pa5OGDxcNzQgS Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10456"; a="275352913" X-IronPort-AV: E=Sophos;i="5.93,280,1654585200"; d="scan'208";a="275352913" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2022 20:20:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,280,1654585200"; d="scan'208";a="563278632" Received: from lkp-server02.sh.intel.com (HELO 811e2ceaf0e5) ([10.239.97.151]) by orsmga003.jf.intel.com with ESMTP; 31 Aug 2022 20:20:27 -0700 Received: from kbuild by 811e2ceaf0e5 with local (Exim 4.96) (envelope-from ) id 1oTakl-00012k-00; Thu, 01 Sep 2022 03:20:27 +0000 Date: Thu, 1 Sep 2022 11:19:56 +0800 From: kernel test robot To: Martin =?utf-8?Q?Povi=C5=A1er?= Cc: kbuild-all@lists.01.org, Linux Memory Management List , Mark Brown Subject: [linux-next:master 2514/4430] drivers/clk/clk.c:867:6: error: redefinition of 'clk_unprepare' Message-ID: <202209011158.y3NxLR81-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662002431; a=rsa-sha256; cv=none; b=LR+Z/+QQsAnKOXZweEGY5vyz7dYyvKSyHlgSM+mnqPyPdxV87aGPwrOCSqgo5dOSyx/f1H 1ZTz2lv25mh53ypquFLDDJqoxiO684/FcjBIuBHgtKbJ3NI+12egbm7wTGuGjVip7eoZsJ Top/RGdrvLLf6gD5QStH/KO4Yu85nZ8= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b="CuzLgH/Q"; dmarc=fail reason="No valid SPF" header.from=intel.com (policy=none); spf=softfail (imf05.hostedemail.com: 192.55.52.136 is neither permitted nor denied by domain of lkp@intel.com) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662002431; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=vflZA3ontxYeyJlfoei5gsE6fkgI5Kw83DoyR0v6GqA=; b=tA/hhbCg7S3hTbLw6f2zeXHitU4FiK8IRPOBTGe+deZErfHHNDEV06pYlwB0JGlHpTP/ZR z03fPIbsQhKsEe87pxgwwlYr/dm3dN10kSy17I3Qp9xUn6itsFNGdQVBGMWCXFbkG+0XyT nFQeSQzC+TJWjvb6lJm0QsbGGKFOhIA= X-Rspamd-Queue-Id: 3DB92100045 Authentication-Results: imf05.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b="CuzLgH/Q"; dmarc=fail reason="No valid SPF" header.from=intel.com (policy=none); spf=softfail (imf05.hostedemail.com: 192.55.52.136 is neither permitted nor denied by domain of lkp@intel.com) smtp.mailfrom=lkp@intel.com X-Rspam-User: X-Rspamd-Server: rspam06 X-Stat-Signature: cuk41dpw3c989jnw6uq3syco88znm71d X-HE-Tag: 1662002431-742048 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Martin, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 7fd22855300e693668c3397771b3a2b3948f827a commit: 3df5d0d972893d3c0df5aead8152fe1ad48ef45c [2514/4430] ASoC: apple: mca: Start new platform driver config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220901/202209011158.y3NxLR81-lkp@intel.com/config) compiler: sh4-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3df5d0d972893d3c0df5aead8152fe1ad48ef45c git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 3df5d0d972893d3c0df5aead8152fe1ad48ef45c # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/clk/clk.c:867:6: error: redefinition of 'clk_unprepare' 867 | void clk_unprepare(struct clk *clk) | ^~~~~~~~~~~~~ In file included from drivers/clk/clk.c:9: include/linux/clk.h:303:20: note: previous definition of 'clk_unprepare' with type 'void(struct clk *)' 303 | static inline void clk_unprepare(struct clk *clk) | ^~~~~~~~~~~~~ >> drivers/clk/clk.c:948:5: error: redefinition of 'clk_prepare' 948 | int clk_prepare(struct clk *clk) | ^~~~~~~~~~~ include/linux/clk.h:271:19: note: previous definition of 'clk_prepare' with type 'int(struct clk *)' 271 | static inline int clk_prepare(struct clk *clk) | ^~~~~~~~~~~ >> drivers/clk/clk.c:1194:6: error: redefinition of 'clk_is_enabled_when_prepared' 1194 | bool clk_is_enabled_when_prepared(struct clk *clk) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/clk.h:284:20: note: previous definition of 'clk_is_enabled_when_prepared' with type 'bool(struct clk *)' {aka '_Bool(struct clk *)'} 284 | static inline bool clk_is_enabled_when_prepared(struct clk *clk) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for COMMON_CLK Depends on [n]: !HAVE_LEGACY_CLK [=y] Selected by [m]: - SND_SOC_APPLE_MCA [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && (ARCH_APPLE || COMPILE_TEST [=y]) vim +/clk_unprepare +867 drivers/clk/clk.c a6adc30ba7bef8 Dong Aisheng 2016-06-30 855 4dff95dc9477a3 Stephen Boyd 2015-04-30 856 /** 4dff95dc9477a3 Stephen Boyd 2015-04-30 857 * clk_unprepare - undo preparation of a clock source 4dff95dc9477a3 Stephen Boyd 2015-04-30 858 * @clk: the clk being unprepared 4dff95dc9477a3 Stephen Boyd 2015-04-30 859 * 4dff95dc9477a3 Stephen Boyd 2015-04-30 860 * clk_unprepare may sleep, which differentiates it from clk_disable. In a 4dff95dc9477a3 Stephen Boyd 2015-04-30 861 * simple case, clk_unprepare can be used instead of clk_disable to gate a clk 4dff95dc9477a3 Stephen Boyd 2015-04-30 862 * if the operation may sleep. One example is a clk which is accessed over 4dff95dc9477a3 Stephen Boyd 2015-04-30 863 * I2c. In the complex case a clk gate operation may require a fast and a slow 4dff95dc9477a3 Stephen Boyd 2015-04-30 864 * part. It is this reason that clk_unprepare and clk_disable are not mutually 4dff95dc9477a3 Stephen Boyd 2015-04-30 865 * exclusive. In fact clk_disable must be called before clk_unprepare. 4dff95dc9477a3 Stephen Boyd 2015-04-30 866 */ 4dff95dc9477a3 Stephen Boyd 2015-04-30 @867 void clk_unprepare(struct clk *clk) b2476490ef1113 Mike Turquette 2012-03-15 868 { 4dff95dc9477a3 Stephen Boyd 2015-04-30 869 if (IS_ERR_OR_NULL(clk)) 4dff95dc9477a3 Stephen Boyd 2015-04-30 870 return; b2476490ef1113 Mike Turquette 2012-03-15 871 a6adc30ba7bef8 Dong Aisheng 2016-06-30 872 clk_core_unprepare_lock(clk->core); 1e435256d625c2 Olof Johansson 2013-04-27 873 } 4dff95dc9477a3 Stephen Boyd 2015-04-30 874 EXPORT_SYMBOL_GPL(clk_unprepare); 1e435256d625c2 Olof Johansson 2013-04-27 875 4dff95dc9477a3 Stephen Boyd 2015-04-30 876 static int clk_core_prepare(struct clk_core *core) 4dff95dc9477a3 Stephen Boyd 2015-04-30 877 { 4dff95dc9477a3 Stephen Boyd 2015-04-30 878 int ret = 0; b2476490ef1113 Mike Turquette 2012-03-15 879 a63347251907d7 Stephen Boyd 2015-05-06 880 lockdep_assert_held(&prepare_lock); a63347251907d7 Stephen Boyd 2015-05-06 881 4dff95dc9477a3 Stephen Boyd 2015-04-30 882 if (!core) 4dff95dc9477a3 Stephen Boyd 2015-04-30 883 return 0; b2476490ef1113 Mike Turquette 2012-03-15 884 4dff95dc9477a3 Stephen Boyd 2015-04-30 885 if (core->prepare_count == 0) { 9a34b45397e5a3 Marek Szyprowski 2017-08-21 886 ret = clk_pm_runtime_get(core); 4dff95dc9477a3 Stephen Boyd 2015-04-30 887 if (ret) 4dff95dc9477a3 Stephen Boyd 2015-04-30 888 return ret; b2476490ef1113 Mike Turquette 2012-03-15 889 9a34b45397e5a3 Marek Szyprowski 2017-08-21 890 ret = clk_core_prepare(core->parent); 9a34b45397e5a3 Marek Szyprowski 2017-08-21 891 if (ret) 9a34b45397e5a3 Marek Szyprowski 2017-08-21 892 goto runtime_put; 9a34b45397e5a3 Marek Szyprowski 2017-08-21 893 4dff95dc9477a3 Stephen Boyd 2015-04-30 894 trace_clk_prepare(core); 1c155b3dfe0835 Ulf Hansson 2013-03-12 895 4dff95dc9477a3 Stephen Boyd 2015-04-30 896 if (core->ops->prepare) 4dff95dc9477a3 Stephen Boyd 2015-04-30 897 ret = core->ops->prepare(core->hw); 1c155b3dfe0835 Ulf Hansson 2013-03-12 898 4dff95dc9477a3 Stephen Boyd 2015-04-30 899 trace_clk_prepare_complete(core); b2476490ef1113 Mike Turquette 2012-03-15 900 9a34b45397e5a3 Marek Szyprowski 2017-08-21 901 if (ret) 9a34b45397e5a3 Marek Szyprowski 2017-08-21 902 goto unprepare; b2476490ef1113 Mike Turquette 2012-03-15 903 } b2476490ef1113 Mike Turquette 2012-03-15 904 4dff95dc9477a3 Stephen Boyd 2015-04-30 905 core->prepare_count++; b2476490ef1113 Mike Turquette 2012-03-15 906 9461f7b33d11cb Jerome Brunet 2018-06-19 907 /* 9461f7b33d11cb Jerome Brunet 2018-06-19 908 * CLK_SET_RATE_GATE is a special case of clock protection 9461f7b33d11cb Jerome Brunet 2018-06-19 909 * Instead of a consumer claiming exclusive rate control, it is 9461f7b33d11cb Jerome Brunet 2018-06-19 910 * actually the provider which prevents any consumer from making any 9461f7b33d11cb Jerome Brunet 2018-06-19 911 * operation which could result in a rate change or rate glitch while 9461f7b33d11cb Jerome Brunet 2018-06-19 912 * the clock is prepared. 9461f7b33d11cb Jerome Brunet 2018-06-19 913 */ 9461f7b33d11cb Jerome Brunet 2018-06-19 914 if (core->flags & CLK_SET_RATE_GATE) 9461f7b33d11cb Jerome Brunet 2018-06-19 915 clk_core_rate_protect(core); 9461f7b33d11cb Jerome Brunet 2018-06-19 916 4dff95dc9477a3 Stephen Boyd 2015-04-30 917 return 0; 9a34b45397e5a3 Marek Szyprowski 2017-08-21 918 unprepare: 9a34b45397e5a3 Marek Szyprowski 2017-08-21 919 clk_core_unprepare(core->parent); 9a34b45397e5a3 Marek Szyprowski 2017-08-21 920 runtime_put: 9a34b45397e5a3 Marek Szyprowski 2017-08-21 921 clk_pm_runtime_put(core); 9a34b45397e5a3 Marek Szyprowski 2017-08-21 922 return ret; b2476490ef1113 Mike Turquette 2012-03-15 923 } b2476490ef1113 Mike Turquette 2012-03-15 924 a6adc30ba7bef8 Dong Aisheng 2016-06-30 925 static int clk_core_prepare_lock(struct clk_core *core) a6adc30ba7bef8 Dong Aisheng 2016-06-30 926 { a6adc30ba7bef8 Dong Aisheng 2016-06-30 927 int ret; a6adc30ba7bef8 Dong Aisheng 2016-06-30 928 a6adc30ba7bef8 Dong Aisheng 2016-06-30 929 clk_prepare_lock(); a6adc30ba7bef8 Dong Aisheng 2016-06-30 930 ret = clk_core_prepare(core); a6adc30ba7bef8 Dong Aisheng 2016-06-30 931 clk_prepare_unlock(); a6adc30ba7bef8 Dong Aisheng 2016-06-30 932 a6adc30ba7bef8 Dong Aisheng 2016-06-30 933 return ret; a6adc30ba7bef8 Dong Aisheng 2016-06-30 934 } a6adc30ba7bef8 Dong Aisheng 2016-06-30 935 4dff95dc9477a3 Stephen Boyd 2015-04-30 936 /** 4dff95dc9477a3 Stephen Boyd 2015-04-30 937 * clk_prepare - prepare a clock source 4dff95dc9477a3 Stephen Boyd 2015-04-30 938 * @clk: the clk being prepared 4dff95dc9477a3 Stephen Boyd 2015-04-30 939 * 4dff95dc9477a3 Stephen Boyd 2015-04-30 940 * clk_prepare may sleep, which differentiates it from clk_enable. In a simple 4dff95dc9477a3 Stephen Boyd 2015-04-30 941 * case, clk_prepare can be used instead of clk_enable to ungate a clk if the 4dff95dc9477a3 Stephen Boyd 2015-04-30 942 * operation may sleep. One example is a clk which is accessed over I2c. In 4dff95dc9477a3 Stephen Boyd 2015-04-30 943 * the complex case a clk ungate operation may require a fast and a slow part. 4dff95dc9477a3 Stephen Boyd 2015-04-30 944 * It is this reason that clk_prepare and clk_enable are not mutually 4dff95dc9477a3 Stephen Boyd 2015-04-30 945 * exclusive. In fact clk_prepare must be called before clk_enable. 4dff95dc9477a3 Stephen Boyd 2015-04-30 946 * Returns 0 on success, -EERROR otherwise. 4dff95dc9477a3 Stephen Boyd 2015-04-30 947 */ 4dff95dc9477a3 Stephen Boyd 2015-04-30 @948 int clk_prepare(struct clk *clk) b2476490ef1113 Mike Turquette 2012-03-15 949 { 035a61c314eb3d Tomeu Vizoso 2015-01-23 950 if (!clk) 4dff95dc9477a3 Stephen Boyd 2015-04-30 951 return 0; 035a61c314eb3d Tomeu Vizoso 2015-01-23 952 a6adc30ba7bef8 Dong Aisheng 2016-06-30 953 return clk_core_prepare_lock(clk->core); 7ef3dcc8145263 James Hogan 2013-07-29 954 } 4dff95dc9477a3 Stephen Boyd 2015-04-30 955 EXPORT_SYMBOL_GPL(clk_prepare); 035a61c314eb3d Tomeu Vizoso 2015-01-23 956 :::::: The code at line 867 was first introduced by commit :::::: 4dff95dc9477a34de77d24c59dcf1dc593687fcf clk: Remove forward declared function prototypes :::::: TO: Stephen Boyd :::::: CC: Stephen Boyd -- 0-DAY CI Kernel Test Service https://01.org/lkp