Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1773507rwd; Thu, 18 May 2023 17:42:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7fuBjQhcxYYnQgggwpbJTx1xdIcyerkYMIWc1dnz/fbSEwuPHh3DgAkze7ZZ/MgfWbyDnU X-Received: by 2002:a05:6a00:22cc:b0:64b:205:dbf3 with SMTP id f12-20020a056a0022cc00b0064b0205dbf3mr806809pfj.34.1684456954189; Thu, 18 May 2023 17:42:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684456954; cv=none; d=google.com; s=arc-20160816; b=GioeKYHXUkWvT1ktg6oHFN0CqczEyqbl2HGhxKWIgixJqGk4KiEGLVup6aPS2JaLWY 4c3/GOyO8nYWcVj8dRq+NALGN/OjMPe8WYjNO5XtjbuTzWPIHMiSujhPXihgWRjrW/U0 Oqq4BMAF1FwL6olUQ+6eXQ1rhbbOxh2Aib1uhlWoOprTLr7PUVwVmDL9RF3HW4F5JwNm RAwlTyHqvTo196KXB6jdbM4+Q/Nsd8HCjYM5V875+RISiOU609tkMPNThAbLkb3TC3v5 1fdYk2M9yTO2OL4THH6hIdBgjHhApmprslX0IV4q3PLxge/1F1EdLGh5bqnILwDI0KYk FfOw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=X7LSztTgvuTG/1LRG7rLGwi1XpsK273SzAIspcW50Sw=; b=SM3cE7s3vyxq6q/81PjkG0aFyG4GmkKAe9+5qo/cbX52UUbvIo6ziw30w1Asz4becO 6Y4Itdtkr8Z9kmgRoKSwiAo2ilJO4NWHTBPQK/66GhDqkN1AXPD0eEcSdwHd6pzeeimT DhgwSHJTfYMe5AIt+CJ/R6S/RbQSSNmk+FJ7N/qWAV7nXKMjMj1SCuPWHCBO5/V/GvlV FMoHX82+VhkPLXnEbv7t1SA+n6+Fa36cxjvcLQm6ArvkXMUQ57ZyVj+Kh4NKOtayJwNz TztR+bqk7QuPSRBPF7mZrQV9mUTBTUou9F6MrtUuJeWZ96QwS8+c5MfKjeAgBlWlWzXZ NdIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=r5g0rd74; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020aa78f32000000b0064d2b0cc8f2si1410046pfr.150.2023.05.18.17.42.22; Thu, 18 May 2023 17:42:34 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b=r5g0rd74; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230235AbjESAZu (ORCPT + 99 others); Thu, 18 May 2023 20:25:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229643AbjESAZt (ORCPT ); Thu, 18 May 2023 20:25:49 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFDB810FC; Thu, 18 May 2023 17:25:32 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-64d18d772bdso1569052b3a.3; Thu, 18 May 2023 17:25:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684455931; x=1687047931; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=X7LSztTgvuTG/1LRG7rLGwi1XpsK273SzAIspcW50Sw=; b=r5g0rd74gzmwM9IK6Pm4C1P66N8ea4c0hLbvF8+Kw11dnEnGuJjnrsUvV8iXMI1m4E yzkwWbNbBo7IWy7BNZYjdx28A23ZWhbyX1yQPACdK/rfjOxPV+KCiDE1++Lwdf2RPbix P75kxZMOEMr0FsCLspJcxMhIV56lHHfs/pBvBudhO9rzIEsHG0/AMjCAaQaeGLWGmNEL eNe9RQd0lLpHTyDB0XqYRf2Y+/licUOj/P5N8ZiSywTKEUIVfDbl4jOktqFaq+UsJfhK D4ppWsAdYNpQlRttSZhZq04x5eUTNp/rb06JYuQVBXlry3MNG2FqXSF2JFsD22nz5ATo TAqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684455931; x=1687047931; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=X7LSztTgvuTG/1LRG7rLGwi1XpsK273SzAIspcW50Sw=; b=cus/Iv+A8nHoYnSjTZXQH2M46+t2hNXW9k/MRTjH0j/CY+zZLWRSaNnwErWXbYee1+ GGSfFU2e91EWbjvOJIkk/7BAHF052l9fUUuSfGw9AiZ5BVWI5DCQOCxpUyT5Mmr4iDmL 2nRpOFEieG9oX41Ltb1h4UYthHw62ISTOoiXQsJNVE3ZM90kB1TsWGaCSmDP5Bv5ztOq AP2cwxKD96x8g558ioWeQ/1KARcKJSB9C6eFuwSkeyHfveVlIMnMagj1IupM83o7gLiq Qi742rsjIMtUi9czodTud9/1fHDwMfDFg0z1dcI+wDWChgO/4+j/xyKG1YFiqE3OnEUs KUSg== X-Gm-Message-State: AC+VfDxdgWXoPANDYrQj4CWkaz/guZIdF8Xp91TlHBo1noULSKqpviti COVCeXuQ1+bTuUwNEXMv7eI= X-Received: by 2002:a05:6a21:33a6:b0:105:b75e:9e0d with SMTP id yy38-20020a056a2133a600b00105b75e9e0dmr319961pzb.1.1684455931481; Thu, 18 May 2023 17:25:31 -0700 (PDT) Received: from ubuntu777.domain.name (36-228-97-28.dynamic-ip.hinet.net. [36.228.97.28]) by smtp.gmail.com with ESMTPSA id m8-20020aa79008000000b00643889e30c2sm1864056pfo.180.2023.05.18.17.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 17:25:31 -0700 (PDT) From: Min-Hua Chen To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin Cc: Min-Hua Chen , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: stmmac: use le32_to_cpu for p->des0 and p->des1 Date: Fri, 19 May 2023 08:25:21 +0800 Message-Id: <20230519002522.3648-1-minhuadotchen@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org Use le32_to_cpu for p->des0 and p->des1 to fix the following sparse warnings: drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c:110:23: sparse: warning: restricted __le32 degrades to integer drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c:110:50: sparse: warning: restricted __le32 degrades to integer Signed-off-by: Min-Hua Chen --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c index 13c347ee8be9..3d094d83e975 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c @@ -107,7 +107,8 @@ static int dwxgmac2_rx_check_timestamp(void *desc) ts_valid = !(rdes3 & XGMAC_RDES3_TSD) && (rdes3 & XGMAC_RDES3_TSA); if (likely(desc_valid && ts_valid)) { - if ((p->des0 == 0xffffffff) && (p->des1 == 0xffffffff)) + if ((le32_to_cpu(p->des0) == 0xffffffff) && + (le32_to_cpu(p->des1) == 0xffffffff)) return -EINVAL; return 0; } -- 2.34.1