From patchwork Mon Feb 5 02:40:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dawei Li X-Patchwork-Id: 196618 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp633301dyb; Sun, 4 Feb 2024 18:42:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IENSAc3NrW4hKevh+PEeuYDXCbXgffFEpwkx9NUN5DuBJgzAaDrq3iWHeGKk0oWcHagvtfL X-Received: by 2002:a05:620a:2288:b0:785:43f2:9409 with SMTP id o8-20020a05620a228800b0078543f29409mr11031632qkh.52.1707100973635; Sun, 04 Feb 2024 18:42:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707100973; cv=pass; d=google.com; s=arc-20160816; b=xyThzmiviwwf4PC3JFzk42Vvh4bieVuJUvG8+8QpNuMioNYDQkrjt8itoL3upUKthR dy+Y4yYKAsIWyqr4ma0YsASaDY8ynwjWuPFAVruDF1/tVjYdpAwkz3P0lWHV3gt++VbP mtb9oLc5+vhcOOXyuJeJ91+EFUUvE30FSPfALsyTIDrs17p5iiMjfsCrnwJhr4n43o23 lyzFhg5OMmXITv9DPJxnTdXW4n9mRnREycIz+iy4k0KDyWf8D70zy4Kcv/7VMAX9/q5R hzmfARCHoLYpTaruJqXDYtG3T1Ljz7QMZRtSeperifSqLZOm0oLL/KXvdfPX4+5drkWR ziPQ== 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=RTRSFXeG2Ib/scIhhbm3ACFvbsTwCS6oiMC5lDDgb/4=; b=CPBrXsROPDuLMl6JovCj8V4yaCeMF1qKr23JrFhb9dsFcnOAh5Nt26KVBUUZ0O1jZa 1kiBxJDhUPMdVcfp0Zw5O29VEl8tJSzyFAsdZ2/4scky99v91ZXHdstU33HJtNVui1ap f3zq2Pmu92CvY426LTyTFg9phzKNX5QkhMhgKtj7kJjSUXfSrryKvACteQAuYjKB8swv F9cCOvoY4vM49Q05OVziSPZoDwMmPHkGzA6TsSDJCdevGXfNOOFudTnKXYBpUc5KmKCc Voklul6YzbiAe5EP4uFTweyBbQCYF7ZRDFFO8N8PcIomrz/2f9dD/g5hZLVFafBjYhyw RUxQ==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51995-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn X-Forwarded-Encrypted: i=1; AJvYcCVLdgF6kZdbaaqEZKzHrel2ISlgM98AgMTF4qvZkwgLuFwk928m73Pm4uvXoKTD7uskr7kXBzzB45AnNLde+HxWS0rS1g== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c26-20020a05620a11ba00b007838dcd6c25si7591563qkk.399.2024.02.04.18.42.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 18:42:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51995-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51995-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6C1491C22014 for ; Mon, 5 Feb 2024 02:42:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 89DA7AD35; Mon, 5 Feb 2024 02:42:37 +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 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790025110738437119 X-GMAIL-MSGID: 1790025110738437119 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;