Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2159679rdb; Sun, 4 Feb 2024 18:42:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7kW/ll1yaMy5nWDOQ42NGgCup7JBuwHOvUFX1EYquPU35pyUHBkZULoVB+PbfCdEAALMw X-Received: by 2002:a17:903:11cc:b0:1d8:ebdf:183a with SMTP id q12-20020a17090311cc00b001d8ebdf183amr20251778plh.6.1707100964584; Sun, 04 Feb 2024 18:42:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707100964; cv=pass; d=google.com; s=arc-20160816; b=iuZ+BHnxPTvqI47FkakqKHN8XQ/II3KNcrFb0zHHyH2HR/Iw0/q4fh7/fB/gOOFDL6 4k/Lcs+LSBrt1NW0J8ofaYogAKo06KgR5BO1B1gL92iTXbc09HdKwF03v6JHe9h/1GRQ EdZOYPk/fJJ3sicme4TsNYLV9cxlFLgs7AkIsz3to9oYOIyMLaHTEdILr1k9hWH2Zwqu IiG3AJNpFEtPsXr82f092oVTG7QeBE+syQNiq5+MaY2ehj7NE0qPbtbVGpR3OsFWZbaQ 89XpuXNegePENYqTsEtBMKZbgNVz2H6Wna1ifhRyoN4ZLn7eYi8+z12sOxpGWuiIJ+uO rGMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=ERt2ZeKx11x/8wnSg6l89nWOc2nv01arPG98OgBospI=; fh=ASrn0nVG/ztC2Upg58GRJRsvWaPnXN/EE2uV7AzEYtQ=; b=wB3bg2Y4nYBHgtlu7aY2PSag/gJguM6r+OuUPtZCJKAfoW4yzQHHyJms/4vmmaClss 5BlolmXDGyT399UOF6siYtY6jZTPQZYfanhO10897AgqF2dPZ4+1FItok2/eJh3KuWYn YW0A8pBFyD3SszbIQ9GswxoaF/d1Y7T03aAapVFiKOXPKAYFFy1U4nOPJbX9p5I6hN8d wAgt4gJ/g2pb5lR/dMvElKX1oL3eXhmtL/QxJXZoNfTrmMkeMu2lxpyjcwI8TDCa/G00 ZE96bAu+9XVvUiKrMACI/wLMC9Kwdhv5BWweP8F1pP1LRq11PvEdUzZbzefWdKJbYpBU 6rfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-51995-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51995-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn X-Forwarded-Encrypted: i=1; AJvYcCVfI5OvwCRK2w9ASw8iZMtMu4/kfvYcHrnvVXjJRQDyiU9vMpKAAsXhkQU2I9MFZ66UuhXA4ZqtIIN2xvrmdSNuy8tOElfR8uaDg3zw1g== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jb12-20020a170903258c00b001d8aeeeb292si5370505plb.279.2024.02.04.18.42.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 18:42:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51995-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-51995-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51995-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 412DC28317B for ; Mon, 5 Feb 2024 02:42:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84EAF944D; Mon, 5 Feb 2024 02:42:36 +0000 (UTC) Received: from bg1.exmail.qq.com (bg1.exmail.qq.com [114.132.62.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F334BB641; Mon, 5 Feb 2024 02:42:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=114.132.62.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707100956; cv=none; b=FYPQ8rr3zaz4gnpWBe1Ytyi8iuW4sJGwldozjGE66nkntPuR7HDVEIlv3wQ0evjKQKmCU6VM3+BWMzpdkTh2fxIsSaTSFcbVMLrDR/fDOEQ/lGe4wikdKx4IvhhLX3KgjNbHejBpKYV2o9oz+VXhho5bURxn+5T/ZcNBuMeBFBw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707100956; c=relaxed/simple; bh=HLOV5juc9V21oxs5QlKgUfEkMeIEqmDHRV557PeYu5c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ul7PuYKExvfovABrvNsi1BgxDp2b3kQU86/DVOvdNtt8NPTkdl2aNEwoYgpLR3hqZXoATyLsSLjYImq34gJnoDngOUCMeK5gQr1OlbNTlX8VwnqXLhl6KJwM7FSZtn0QaymSUJyfsFPyn+d5jKG5U9BKFUQ7hXAlm9RelCOW8Hw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn; spf=pass smtp.mailfrom=shingroup.cn; arc=none smtp.client-ip=114.132.62.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shingroup.cn X-QQ-mid: bizesmtp71t1707100845t33pzhpj X-QQ-Originating-IP: tEmptkO3RX7FmDcpxkDieLOniV0tL5NFvlU0xAeyXd0= Received: from localhost ( [183.209.108.228]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 05 Feb 2024 10:40:44 +0800 (CST) X-QQ-SSF: 01400000000000504000000A0000000 X-QQ-FEAT: q+EIYT+FhZrcpAw8J2l7WYvl1nkWUiMk5YKYvT/b9Yt7WT9Ef3sSYNzREBFwn gfqNy+umEk8UOTLeVLbEYL49fYXZ8WvfbX9v7vsGiGxNF/c7na+ZIQxjRURnp4WpzmK8ecM Af9captGYMnaoI1MxWe+IgV7UisapmLsv7QgGRookv0v6EzH3n7Kmq4MZ7pNxUtxr0V5b6Y xzwvPq+CBgupPWnqqfCMZyrgw0rAksl9UTMQfyspbiL8FSUbma74JDxoYvg0R4JEBjRW7ce UzeNk3xSIMjQu3kZ4qHcLpE5W2XRvaAKAT6LVBjpm24S7ZXoGxfPVIUtYPsPsXgeWOof9P0 7x1A3x7GMb6Hk1NeKxNCm4eQ2TndP92FbXtLDdYM+68BG0J/lin+0Zv/RMUkRQUoUU1EovZ X-QQ-GoodBg: 2 X-BIZMAIL-ID: 1361134515028198652 From: Dawei Li To: robh+dt@kernel.org, frowand.list@gmail.com, lkp@intel.com Cc: stephen.boyd@linaro.org, oe-kbuild-all@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dawei Li Subject: [PATCH] of: Make explicit cpu_to_be32 conversion to mute sparse warning Date: Mon, 5 Feb 2024 10:40:33 +0800 Message-Id: <20240205024033.3572617-1-dawei.li@shingroup.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <202402042134.GEb3Bgwl-lkp@intel.com> References: <202402042134.GEb3Bgwl-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 Kernel test robot reports sparse warning: sparse warnings: (new ones prefixed by >>) >> drivers/of/base.c:1337:73: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __be32 @@ got int @@ drivers/of/base.c:1337:73: sparse: expected restricted __be32 drivers/of/base.c:1337:73: sparse: got int Thus, Make explicit conversions to mute warning(Although BE and LE are exactly same in binary representation for 0/~0). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402042134.GEb3Bgwl-lkp@intel.com/ Signed-off-by: Dawei Li --- drivers/of/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index b0ad8fc06e80..f71cda9ac09d 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1345,8 +1345,8 @@ int of_parse_phandle_with_args_map(const struct device_node *np, char *pass_name = NULL; struct device_node *cur, *new = NULL; const __be32 *map, *mask, *pass; - static const __be32 dummy_mask[] = { [0 ... MAX_PHANDLE_ARGS] = ~0 }; - static const __be32 dummy_pass[] = { [0 ... MAX_PHANDLE_ARGS] = 0 }; + static const __be32 dummy_mask[] = { [0 ... MAX_PHANDLE_ARGS] = cpu_to_be32(~0) }; + static const __be32 dummy_pass[] = { [0 ... MAX_PHANDLE_ARGS] = cpu_to_be32(0) }; __be32 initial_match_array[MAX_PHANDLE_ARGS]; const __be32 *match_array = initial_match_array; int i, ret, map_len, match; -- 2.27.0