Message ID | 167081320421.387937.4259807348852421112.stgit@devnote3 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2013067wrr; Sun, 11 Dec 2022 18:48:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf5yHjarR6xWjTrPKCGYAYuPtYBzZTRRDmb+4djwOsyTRg3tsW3pfdX9cO1Gf7w6bonl4Wag X-Received: by 2002:a17:903:515:b0:189:bcf7:1ec0 with SMTP id jn21-20020a170903051500b00189bcf71ec0mr14678819plb.30.1670813312410; Sun, 11 Dec 2022 18:48:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670813312; cv=none; d=google.com; s=arc-20160816; b=0ePtM+yuuR4HdSNuIO5D86TfHe7iyTWSsbzxbvvw9U9UsAeBa3DcPqTLgmjafu/Ny5 MdC45ZNZ4Iisa1ILultIVq0PPw5+sPsW5di3omzVZFwkiFIctz/HN+m2ygUspdujp/C/ Bv21oRzw7j2ZXCpIbMM850xSZTgcewGJvZoK1F0f647QmELYWvY8l2L147Ng6sAC64rt JqJalfpIFEgXihlc35Ly3IRZ0ciEYYgD5aCNHAaKqAb7z4+xqVfpBRTarZPgQJHZXM0W 3NJbEYC+7yfiU0Z5cv4P/aGhy8vcHX0t4zd7uF4vdlJQo+1f3dtpYrWJWF1/zEYuAzeH J4aA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+R2LQSkFONM7ixsSQcLicPmdDH1WrGBwUw8tLHbhcnM=; b=jr77vNHSWGCwdMruP3P0h7lPF6mNEEplGZQOitrSIFuHFmRCe7ZP5QtxEItmvx/MI/ L3BYQcZNmkju/PYg9xjWuUW+134Tatu1mw+4GBAAJOXM1HwUi/jm2vTrpO8ejQblY4qp EnxQI+4bV9JU46x5zJo2Qkl8+uzjOkeg5Jy8AteEGF44EBr1DJYRlHS42e3cYCCpMs1q HVcLYB+5fsGTzW5xswnUhmyZ3W8uib1jhWqZTYbAyUfpDDF2U2SbpHZKyWRtncfFv26Y 5ClP7xcEiiYoRWE3seqC/6S+1+d/ibAur2hrsqRqZDAqUH+IOfdC3YpW4uH1nx1PU5Ee gJ7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aqZzqCO4; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x18-20020a17090300d200b00189b36a5427si7675871plc.16.2022.12.11.18.48.19; Sun, 11 Dec 2022 18:48:32 -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=@kernel.org header.s=k20201202 header.b=aqZzqCO4; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230457AbiLLCrD (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Sun, 11 Dec 2022 21:47:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231176AbiLLCqy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 11 Dec 2022 21:46:54 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54F6CDEFC; Sun, 11 Dec 2022 18:46:49 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 87D9260ECB; Mon, 12 Dec 2022 02:46:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38587C433F1; Mon, 12 Dec 2022 02:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670813209; bh=p9sKnd8jvAp0+7aHcpBSpZt7PeyVZOq2wnu/bgXhOAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aqZzqCO4IO/LXXuJBlq967d9RhgLMTOvSEALksDzf0H52/LxJt4PS6rv+5kWH7DJA FWJ71pKwdnueowZoYw1/0pTPoeWi/AA78nrNqBPoTq4uSzjWWpY6CwARbNbeHrT1Id PELHVCjhkLm/6TxLICjLubRMsAfOP0KLLRE4/ZyeBUNFgvz+9MDhva7JIyAGYS6xxY 6kk6Sgk7asE565Zbo/Q6dMCOxkgHS0yEFq9Jo5afVf3mHAeShf72iasWG7da/0IB0X a2ZY6QOxPaISJ1ybQF6vfDEOTX+mPfrSFifX3XqpLw8TQt2GLZOPtZmTLeFA+QQIBu yPV2ruy5aeW2A== From: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> To: LKML <linux-kernel@vger.kernel.org> Cc: bpf@vger.kernel.org, Borislav Petkov <bp@alien8.de>, Alexei Starovoitov <alexei.starovoitov@gmail.com>, Steven Rostedt <rostedt@goodmis.org>, Linus Torvalds <torvalds@linux-foundation.org>, Masami Hiramatsu <mhiramat@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, Peter Zijlstra <peterz@infradead.org>, Kees Cook <keescook@chromium.org>, Josh Poimboeuf <jpoimboe@redhat.com>, KP Singh <kpsingh@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Florent Revest <revest@chromium.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Christoph Hellwig <hch@infradead.org>, Chris Mason <clm@meta.com>, Jonathan Corbet <corbet@lwn.net>, linux-doc@vger.kernel.org Subject: [PATCH 1/2] error-injection: Remove EI_ETYPE_NONE Date: Mon, 12 Dec 2022 11:46:44 +0900 Message-Id: <167081320421.387937.4259807348852421112.stgit@devnote3> X-Mailer: git-send-email 2.39.0.rc1.256.g54fd8350bd-goog In-Reply-To: <167081319306.387937.10079195394503045678.stgit@devnote3> References: <167081319306.387937.10079195394503045678.stgit@devnote3> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751974739758215061?= X-GMAIL-MSGID: =?utf-8?q?1751974739758215061?= |
Series |
error-injection: Clarify the requirements of error injectable functions
|
|
Commit Message
Masami Hiramatsu (Google)
Dec. 12, 2022, 2:46 a.m. UTC
From: Masami Hiramatsu (Google) <mhiramat@kernel.org> Since the EI_ETYPE_NONE is confusing type, replace it with appropriate errno. The EI_ETYPE_NONE has been introduced for a dummy (error) value, but it can mislead people that they can use ALLOW_ERROR_INJECTION(func, NONE). So remove it from the EI_ETYPE and use appropriate errno instead. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Fixes: 663faf9f7bee ("error-injection: Add injectable error types") --- include/asm-generic/error-injection.h | 1 - include/linux/error-injection.h | 2 +- lib/error-inject.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-)
Comments
Hi Masami, Thank you for the patch! Yet something to improve: [auto build test ERROR on arnd-asm-generic/master] [also build test ERROR on linus/master v6.1 next-20221208] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Masami-Hiramatsu-Google/error-injection-Clarify-the-requirements-of-error-injectable-functions/20221212-104859 base: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master patch link: https://lore.kernel.org/r/167081320421.387937.4259807348852421112.stgit%40devnote3 patch subject: [PATCH 1/2] error-injection: Remove EI_ETYPE_NONE config: hexagon-randconfig-r045-20221211 compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 6e4cea55f0d1104408b26ac574566a0e4de48036) 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://github.com/intel-lab-lkp/linux/commit/ffd600c8d5c881bc0e58401c24c7457a566f6207 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Masami-Hiramatsu-Google/error-injection-Clarify-the-requirements-of-error-injectable-functions/20221212-104859 git checkout ffd600c8d5c881bc0e58401c24c7457a566f6207 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/btrfs/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): In file included from fs/btrfs/tree-checker.c:20: >> include/linux/error-injection.h:22:10: error: use of undeclared identifier 'EOPNOTSUPP' return -EOPNOTSUPP; ^ In file included from fs/btrfs/tree-checker.c:21: In file included from fs/btrfs/ctree.h:9: In file included from include/linux/mm.h:737: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds] return (set->sig[3] | set->sig[2] | ^ ~ include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from fs/btrfs/tree-checker.c:21: In file included from fs/btrfs/ctree.h:9: In file included from include/linux/mm.h:737: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds] return (set->sig[3] | set->sig[2] | ^ ~ include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from fs/btrfs/tree-checker.c:21: In file included from fs/btrfs/ctree.h:9: In file included from include/linux/mm.h:737: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] return (set1->sig[3] == set2->sig[3]) && ^ ~ include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from fs/btrfs/tree-checker.c:21: In file included from fs/btrfs/ctree.h:9: In file included from include/linux/mm.h:737: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] return (set1->sig[3] == set2->sig[3]) && ^ ~ include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from fs/btrfs/tree-checker.c:21: In file included from fs/btrfs/ctree.h:9: In file included from include/linux/mm.h:737: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:114:5: warning: array index 2 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] (set1->sig[2] == set2->sig[2]) && ^ ~ include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from fs/btrfs/tree-checker.c:21: In file included from fs/btrfs/ctree.h:9: In file included from include/linux/mm.h:737: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:114:21: warning: array index 2 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] (set1->sig[2] == set2->sig[2]) && ^ ~ include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from fs/btrfs/tree-checker.c:21: In file included from fs/btrfs/ctree.h:9: In file included from include/linux/mm.h:737: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:156:1: warning: array index 3 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] _SIG_SET_BINOP(sigorsets, _sig_or) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/signal.h:137:8: note: expanded from macro '_SIG_SET_BINOP' a3 = a->sig[3]; a2 = a->sig[2]; \ ^ ~ vim +/EOPNOTSUPP +22 include/linux/error-injection.h 19 20 static inline int get_injectable_error_type(unsigned long addr) 21 { > 22 return -EOPNOTSUPP; 23 } 24
Hi Masami, Thank you for the patch! Yet something to improve: [auto build test ERROR on arnd-asm-generic/master] [also build test ERROR on linus/master v6.1 next-20221208] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Masami-Hiramatsu-Google/error-injection-Clarify-the-requirements-of-error-injectable-functions/20221212-104859 base: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master patch link: https://lore.kernel.org/r/167081320421.387937.4259807348852421112.stgit%40devnote3 patch subject: [PATCH 1/2] error-injection: Remove EI_ETYPE_NONE config: arc-randconfig-r005-20221211 compiler: arc-elf-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://github.com/intel-lab-lkp/linux/commit/ffd600c8d5c881bc0e58401c24c7457a566f6207 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Masami-Hiramatsu-Google/error-injection-Clarify-the-requirements-of-error-injectable-functions/20221212-104859 git checkout ffd600c8d5c881bc0e58401c24c7457a566f6207 # 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=arc SHELL=/bin/bash fs/btrfs/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): In file included from fs/btrfs/tree-checker.c:20: include/linux/error-injection.h: In function 'get_injectable_error_type': >> include/linux/error-injection.h:22:17: error: 'EOPNOTSUPP' undeclared (first use in this function) 22 | return -EOPNOTSUPP; | ^~~~~~~~~~ include/linux/error-injection.h:22:17: note: each undeclared identifier is reported only once for each function it appears in vim +/EOPNOTSUPP +22 include/linux/error-injection.h 19 20 static inline int get_injectable_error_type(unsigned long addr) 21 { > 22 return -EOPNOTSUPP; 23 } 24
On Mon, 12 Dec 2022 12:55:24 +0800 kernel test robot <lkp@intel.com> wrote: > Hi Masami, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on arnd-asm-generic/master] > [also build test ERROR on linus/master v6.1 next-20221208] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Masami-Hiramatsu-Google/error-injection-Clarify-the-requirements-of-error-injectable-functions/20221212-104859 > base: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master > patch link: https://lore.kernel.org/r/167081320421.387937.4259807348852421112.stgit%40devnote3 > patch subject: [PATCH 1/2] error-injection: Remove EI_ETYPE_NONE > config: hexagon-randconfig-r045-20221211 > compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 6e4cea55f0d1104408b26ac574566a0e4de48036) > 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://github.com/intel-lab-lkp/linux/commit/ffd600c8d5c881bc0e58401c24c7457a566f6207 > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Masami-Hiramatsu-Google/error-injection-Clarify-the-requirements-of-error-injectable-functions/20221212-104859 > git checkout ffd600c8d5c881bc0e58401c24c7457a566f6207 > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/btrfs/ > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot <lkp@intel.com> > > All errors (new ones prefixed by >>): > > In file included from fs/btrfs/tree-checker.c:20: > >> include/linux/error-injection.h:22:10: error: use of undeclared identifier 'EOPNOTSUPP' > return -EOPNOTSUPP; Oops, I need to include linux/errno.h. Let me update it. Thanks! > ^ > In file included from fs/btrfs/tree-checker.c:21: > In file included from fs/btrfs/ctree.h:9: > In file included from include/linux/mm.h:737: > In file included from include/linux/huge_mm.h:8: > In file included from include/linux/fs.h:33: > In file included from include/linux/percpu-rwsem.h:7: > In file included from include/linux/rcuwait.h:6: > In file included from include/linux/sched/signal.h:6: > include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds] > return (set->sig[3] | set->sig[2] | > ^ ~ > include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here > unsigned long sig[_NSIG_WORDS]; > ^ > In file included from fs/btrfs/tree-checker.c:21: > In file included from fs/btrfs/ctree.h:9: > In file included from include/linux/mm.h:737: > In file included from include/linux/huge_mm.h:8: > In file included from include/linux/fs.h:33: > In file included from include/linux/percpu-rwsem.h:7: > In file included from include/linux/rcuwait.h:6: > In file included from include/linux/sched/signal.h:6: > include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds] > return (set->sig[3] | set->sig[2] | > ^ ~ > include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here > unsigned long sig[_NSIG_WORDS]; > ^ > In file included from fs/btrfs/tree-checker.c:21: > In file included from fs/btrfs/ctree.h:9: > In file included from include/linux/mm.h:737: > In file included from include/linux/huge_mm.h:8: > In file included from include/linux/fs.h:33: > In file included from include/linux/percpu-rwsem.h:7: > In file included from include/linux/rcuwait.h:6: > In file included from include/linux/sched/signal.h:6: > include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] > return (set1->sig[3] == set2->sig[3]) && > ^ ~ > include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here > unsigned long sig[_NSIG_WORDS]; > ^ > In file included from fs/btrfs/tree-checker.c:21: > In file included from fs/btrfs/ctree.h:9: > In file included from include/linux/mm.h:737: > In file included from include/linux/huge_mm.h:8: > In file included from include/linux/fs.h:33: > In file included from include/linux/percpu-rwsem.h:7: > In file included from include/linux/rcuwait.h:6: > In file included from include/linux/sched/signal.h:6: > include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] > return (set1->sig[3] == set2->sig[3]) && > ^ ~ > include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here > unsigned long sig[_NSIG_WORDS]; > ^ > In file included from fs/btrfs/tree-checker.c:21: > In file included from fs/btrfs/ctree.h:9: > In file included from include/linux/mm.h:737: > In file included from include/linux/huge_mm.h:8: > In file included from include/linux/fs.h:33: > In file included from include/linux/percpu-rwsem.h:7: > In file included from include/linux/rcuwait.h:6: > In file included from include/linux/sched/signal.h:6: > include/linux/signal.h:114:5: warning: array index 2 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] > (set1->sig[2] == set2->sig[2]) && > ^ ~ > include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here > unsigned long sig[_NSIG_WORDS]; > ^ > In file included from fs/btrfs/tree-checker.c:21: > In file included from fs/btrfs/ctree.h:9: > In file included from include/linux/mm.h:737: > In file included from include/linux/huge_mm.h:8: > In file included from include/linux/fs.h:33: > In file included from include/linux/percpu-rwsem.h:7: > In file included from include/linux/rcuwait.h:6: > In file included from include/linux/sched/signal.h:6: > include/linux/signal.h:114:21: warning: array index 2 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] > (set1->sig[2] == set2->sig[2]) && > ^ ~ > include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here > unsigned long sig[_NSIG_WORDS]; > ^ > In file included from fs/btrfs/tree-checker.c:21: > In file included from fs/btrfs/ctree.h:9: > In file included from include/linux/mm.h:737: > In file included from include/linux/huge_mm.h:8: > In file included from include/linux/fs.h:33: > In file included from include/linux/percpu-rwsem.h:7: > In file included from include/linux/rcuwait.h:6: > In file included from include/linux/sched/signal.h:6: > include/linux/signal.h:156:1: warning: array index 3 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds] > _SIG_SET_BINOP(sigorsets, _sig_or) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/signal.h:137:8: note: expanded from macro '_SIG_SET_BINOP' > a3 = a->sig[3]; a2 = a->sig[2]; \ > ^ ~ > > > vim +/EOPNOTSUPP +22 include/linux/error-injection.h > > 19 > 20 static inline int get_injectable_error_type(unsigned long addr) > 21 { > > 22 return -EOPNOTSUPP; > 23 } > 24 > > -- > 0-DAY CI Kernel Test Service > https://01.org/lkp
diff --git a/include/asm-generic/error-injection.h b/include/asm-generic/error-injection.h index fbca56bd9cbc..c0b9d3217ed9 100644 --- a/include/asm-generic/error-injection.h +++ b/include/asm-generic/error-injection.h @@ -4,7 +4,6 @@ #if defined(__KERNEL__) && !defined(__ASSEMBLY__) enum { - EI_ETYPE_NONE, /* Dummy value for undefined case */ EI_ETYPE_NULL, /* Return NULL if failure */ EI_ETYPE_ERRNO, /* Return -ERRNO if failure */ EI_ETYPE_ERRNO_NULL, /* Return -ERRNO or NULL if failure */ diff --git a/include/linux/error-injection.h b/include/linux/error-injection.h index 635a95caf29f..268fecfc1e82 100644 --- a/include/linux/error-injection.h +++ b/include/linux/error-injection.h @@ -19,7 +19,7 @@ static inline bool within_error_injection_list(unsigned long addr) static inline int get_injectable_error_type(unsigned long addr) { - return EI_ETYPE_NONE; + return -EOPNOTSUPP; } #endif diff --git a/lib/error-inject.c b/lib/error-inject.c index 1afca1b1cdea..32c14770508e 100644 --- a/lib/error-inject.c +++ b/lib/error-inject.c @@ -40,7 +40,7 @@ bool within_error_injection_list(unsigned long addr) int get_injectable_error_type(unsigned long addr) { struct ei_entry *ent; - int ei_type = EI_ETYPE_NONE; + int ei_type = -EINVAL; mutex_lock(&ei_mutex); list_for_each_entry(ent, &error_injection_list, list) {