Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp34844rdb; Wed, 18 Oct 2023 17:12:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHXCv5a+9hTpZRyB/O4Hn+qoEyFm5bH/C7nnMTNPi6F9PQR5zkmAQu5g30HAaLFAkalnmXD X-Received: by 2002:a17:902:e80d:b0:1c6:117b:7086 with SMTP id u13-20020a170902e80d00b001c6117b7086mr967665plg.5.1697674333450; Wed, 18 Oct 2023 17:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697674333; cv=none; d=google.com; s=arc-20160816; b=tGRQoD2zNSTJpLe85ZIHjOO22TvSmGtrc3CeyGJcE/5Gp+16+OdrYcmlR8iFzJ8G04 6x+Iva7oQasgnM0aPR4IC75u3Gr0+3WyhmudU+07sl0D1kNNDoY1s0YU2zIPOgx3d9Wg 7PnJ6GBA2uln9wJLbTAqtY/P+2pDhLSxIFsNikR9jz5ix3/HPLBNO49lR4d16E22xV2m xwPETmVCbGX5SuRgDsCAID0yi1echyuoz4EWhoTVVvAsdsjSahYypBWkuYETC+6/EKz7 d8wdIkcs0lptyddTfn6pIIkMLJOTkALGGMf9AfwxVNDpSobgCbiU2/yisrNtgx+1I/rC rJGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kK9awD/yENPF2mFkqIozyNQFqbNaD+6RpGN2eRNobyI=; fh=XrLCEk3qon76/BSe/tvmJNNmcbB7r1Sm5KJUPmVA1uU=; b=VKci0a/mm1Pmdqg+FEoQ78w+i7vyt4Hc7MFDoGi104kbYXM3AHcmpXofGEwitGgCZI kAqMeFMW4c10cGeqEGFtFszIfYco3GbdRX3oBH2s7CekvVHv+0+Jz9aEnjJ0t/S2tmTs H2Etyf6vXBdI3p4IqFU7iTNDHAf2J5SnFdOWheMEKhboF3F+P8r5AqETHZHa4Aw8/OYb /cTfqR5Ph1w4WDypqn1oVNFPtxVXUyXPi2TyH4cyvE9m7/ZPWHleaqc3rPttfdXElk3n e4pFzail4ZPikmV2a0vbBpt5GRwwPpQnZm1uZ0Ietb4CRlA6HlLV8PEHmqsG6ifSna33 A0fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P7cOSq46; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id f11-20020a17090274cb00b001c62ca6d540si980434plt.77.2023.10.18.17.12.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 17:12:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P7cOSq46; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 31C5F8215C1D; Wed, 18 Oct 2023 17:12:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231349AbjJSALn (ORCPT + 99 others); Wed, 18 Oct 2023 20:11:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbjJSALm (ORCPT ); Wed, 18 Oct 2023 20:11:42 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BCEFFA; Wed, 18 Oct 2023 17:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697674300; x=1729210300; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=lfHfhXx4PmjARlwECHoOSOd7MwM+0A7zoQb6TM0qST4=; b=P7cOSq46U9jQDcDzdAkjTM6PMs6iCttj9igkzFFwKEtvMNGj/LIyHRlr dCtEfjxoK/yV2N9ZEdVybZFbVt1Fjhr0cKHffQgSWDaR89ojhAchEnJ5B uV8KGoTgSlgYNPMqTL00HV41TZlE4GGi5yUWzr6sE9XblHiZtXepPOqNx 1+BLaJMLr32Fmuu9qhphYMD2BaR3GjYWfverSRUylCu4AWX+iIcjnTPAm 49IlBrIoBSd4BD1wHVWJfaU2QmADZ8z/4qzGaRKTXAbk2PNG5PCDlJxoK 82FVx9vL9JQdnvko5hdxEwM1cRijzY4UoQ9Eo4vad2Jn+0+Wd1nRBBY1D w==; X-IronPort-AV: E=McAfee;i="6600,9927,10867"; a="389002345" X-IronPort-AV: E=Sophos;i="6.03,236,1694761200"; d="scan'208";a="389002345" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2023 17:11:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10867"; a="756799691" X-IronPort-AV: E=Sophos;i="6.03,236,1694761200"; d="scan'208";a="756799691" Received: from lkp-server01.sh.intel.com (HELO 8917679a5d3e) ([10.239.97.150]) by orsmga002.jf.intel.com with ESMTP; 18 Oct 2023 17:11:36 -0700 Received: from kbuild by 8917679a5d3e with local (Exim 4.96) (envelope-from ) id 1qtGdR-0001JG-2c; Thu, 19 Oct 2023 00:11:33 +0000 Date: Thu, 19 Oct 2023 08:10:54 +0800 From: kernel test robot To: Anshul Dalal , linux-input@vger.kernel.org, devicetree@vger.kernel.org Cc: oe-kbuild-all@lists.linux.dev, Anshul Dalal , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Shuah Khan , linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/2] input: joystick: driver for Adafruit Seesaw Gamepad Message-ID: <202310190852.BCw4Ry7D-lkp@intel.com> References: <20231017034356.1436677-2-anshulusr@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231017034356.1436677-2-anshulusr@gmail.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 18 Oct 2023 17:12:06 -0700 (PDT) Hi Anshul, kernel test robot noticed the following build warnings: [auto build test WARNING on dtor-input/next] [also build test WARNING on dtor-input/for-linus hid/for-next linus/master v6.6-rc6 next-20231018] [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/Anshul-Dalal/input-joystick-driver-for-Adafruit-Seesaw-Gamepad/20231017-160635 base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next patch link: https://lore.kernel.org/r/20231017034356.1436677-2-anshulusr%40gmail.com patch subject: [PATCH v5 2/2] input: joystick: driver for Adafruit Seesaw Gamepad config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20231019/202310190852.BCw4Ry7D-lkp@intel.com/config) compiler: sparc64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231019/202310190852.BCw4Ry7D-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202310190852.BCw4Ry7D-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/thread_info.h:27, from arch/sparc/include/asm/current.h:15, from include/linux/sched.h:12, from include/linux/delay.h:23, from drivers/input/joystick/adafruit-seesaw.c:17: drivers/input/joystick/adafruit-seesaw.c: In function 'seesaw_read_data': >> include/linux/bitops.h:52:11: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Warray-bounds=] 52 | __builtin_constant_p(*(const unsigned long *)(addr))) ? \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/bitops.h:61:41: note: in expansion of macro 'bitop' 61 | #define test_bit(nr, addr) bitop(_test_bit, nr, addr) | ^~~~~ drivers/input/joystick/adafruit-seesaw.c:89:27: note: in expansion of macro 'test_bit' 89 | data->button_a = !test_bit(BUTTON_A, (long *)&result); | ^~~~~~~~ drivers/input/joystick/adafruit-seesaw.c:87:13: note: object 'result' of size 4 87 | u32 result = get_unaligned_be32(&read_buf); | ^~~~~~ In file included from include/linux/bitops.h:34: In function 'generic_test_bit', inlined from 'seesaw_read_data' at drivers/input/joystick/adafruit-seesaw.c:89:20: >> include/asm-generic/bitops/generic-non-atomic.h:128:27: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Warray-bounds=] 128 | return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); | ~~~~^~~~~~~~~~~~~~ drivers/input/joystick/adafruit-seesaw.c: In function 'seesaw_read_data': drivers/input/joystick/adafruit-seesaw.c:87:13: note: object 'result' of size 4 87 | u32 result = get_unaligned_be32(&read_buf); | ^~~~~~ In function 'generic_test_bit', inlined from 'seesaw_read_data' at drivers/input/joystick/adafruit-seesaw.c:90:20: >> include/asm-generic/bitops/generic-non-atomic.h:128:27: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Warray-bounds=] 128 | return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); | ~~~~^~~~~~~~~~~~~~ drivers/input/joystick/adafruit-seesaw.c: In function 'seesaw_read_data': drivers/input/joystick/adafruit-seesaw.c:87:13: note: object 'result' of size 4 87 | u32 result = get_unaligned_be32(&read_buf); | ^~~~~~ In function 'generic_test_bit', inlined from 'seesaw_read_data' at drivers/input/joystick/adafruit-seesaw.c:91:20: >> include/asm-generic/bitops/generic-non-atomic.h:128:27: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Warray-bounds=] 128 | return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); | ~~~~^~~~~~~~~~~~~~ drivers/input/joystick/adafruit-seesaw.c: In function 'seesaw_read_data': drivers/input/joystick/adafruit-seesaw.c:87:13: note: object 'result' of size 4 87 | u32 result = get_unaligned_be32(&read_buf); | ^~~~~~ In function 'generic_test_bit', inlined from 'seesaw_read_data' at drivers/input/joystick/adafruit-seesaw.c:92:20: >> include/asm-generic/bitops/generic-non-atomic.h:128:27: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Warray-bounds=] 128 | return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); | ~~~~^~~~~~~~~~~~~~ drivers/input/joystick/adafruit-seesaw.c: In function 'seesaw_read_data': drivers/input/joystick/adafruit-seesaw.c:87:13: note: object 'result' of size 4 87 | u32 result = get_unaligned_be32(&read_buf); | ^~~~~~ In function 'generic_test_bit', inlined from 'seesaw_read_data' at drivers/input/joystick/adafruit-seesaw.c:93:24: >> include/asm-generic/bitops/generic-non-atomic.h:128:27: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Warray-bounds=] 128 | return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); | ~~~~^~~~~~~~~~~~~~ drivers/input/joystick/adafruit-seesaw.c: In function 'seesaw_read_data': drivers/input/joystick/adafruit-seesaw.c:87:13: note: object 'result' of size 4 87 | u32 result = get_unaligned_be32(&read_buf); | ^~~~~~ In function 'generic_test_bit', inlined from 'seesaw_read_data' at drivers/input/joystick/adafruit-seesaw.c:94:25: >> include/asm-generic/bitops/generic-non-atomic.h:128:27: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Warray-bounds=] 128 | return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); | ~~~~^~~~~~~~~~~~~~ drivers/input/joystick/adafruit-seesaw.c: In function 'seesaw_read_data': drivers/input/joystick/adafruit-seesaw.c:87:13: note: object 'result' of size 4 87 | u32 result = get_unaligned_be32(&read_buf); | ^~~~~~ vim +52 include/linux/bitops.h 0e862838f29014 Alexander Lobakin 2022-06-24 35 b03fc1173c0c2b Alexander Lobakin 2022-06-24 36 /* b03fc1173c0c2b Alexander Lobakin 2022-06-24 37 * Many architecture-specific non-atomic bitops contain inline asm code and due b03fc1173c0c2b Alexander Lobakin 2022-06-24 38 * to that the compiler can't optimize them to compile-time expressions or b03fc1173c0c2b Alexander Lobakin 2022-06-24 39 * constants. In contrary, generic_*() helpers are defined in pure C and b03fc1173c0c2b Alexander Lobakin 2022-06-24 40 * compilers optimize them just well. b03fc1173c0c2b Alexander Lobakin 2022-06-24 41 * Therefore, to make `unsigned long foo = 0; __set_bit(BAR, &foo)` effectively b03fc1173c0c2b Alexander Lobakin 2022-06-24 42 * equal to `unsigned long foo = BIT(BAR)`, pick the generic C alternative when b03fc1173c0c2b Alexander Lobakin 2022-06-24 43 * the arguments can be resolved at compile time. That expression itself is a b03fc1173c0c2b Alexander Lobakin 2022-06-24 44 * constant and doesn't bring any functional changes to the rest of cases. b03fc1173c0c2b Alexander Lobakin 2022-06-24 45 * The casts to `uintptr_t` are needed to mitigate `-Waddress` warnings when b03fc1173c0c2b Alexander Lobakin 2022-06-24 46 * passing a bitmap from .bss or .data (-> `!!addr` is always true). b03fc1173c0c2b Alexander Lobakin 2022-06-24 47 */ e69eb9c460f128 Alexander Lobakin 2022-06-24 48 #define bitop(op, nr, addr) \ b03fc1173c0c2b Alexander Lobakin 2022-06-24 49 ((__builtin_constant_p(nr) && \ b03fc1173c0c2b Alexander Lobakin 2022-06-24 50 __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \ b03fc1173c0c2b Alexander Lobakin 2022-06-24 51 (uintptr_t)(addr) != (uintptr_t)NULL && \ b03fc1173c0c2b Alexander Lobakin 2022-06-24 @52 __builtin_constant_p(*(const unsigned long *)(addr))) ? \ b03fc1173c0c2b Alexander Lobakin 2022-06-24 53 const##op(nr, addr) : op(nr, addr)) e69eb9c460f128 Alexander Lobakin 2022-06-24 54 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki