Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1645112pxp; Thu, 17 Mar 2022 13:29:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAEkRx81S64Vkg/ifGn1qu9KdwWltLqdGvynkgKJ2ysdJQU8TzMUuRRnnTSCQZgdvDfKXe X-Received: by 2002:a17:902:ccd2:b0:14f:8182:96c4 with SMTP id z18-20020a170902ccd200b0014f818296c4mr6750077ple.67.1647548959539; Thu, 17 Mar 2022 13:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647548959; cv=none; d=google.com; s=arc-20160816; b=Tpur+rQjYDAMDUf5/dzt+3qy/0PDbLI5fUsMOVelVFB0FR7Ia+ChtLQaIweQvXFs1B FUBiF0aNxHCxhtTYzvlx/1JiAE8wtuSYmPCq7crIcDoS4osjOcToEKWheT7rTd3mjMm2 yMHL4KNDREtE/z9UuLPiR9nYfYSfwEhxS+2HmPKMOs8MqTTR2XerX1hwiRAlIseIPory qKbzLmvFTFcOG9vskTd1lRc286Tn23L2aWkXo0PNHTbxIA1TeLkC90n+Vs5XcZkfijTf UunuD2FcqGD3jb29f74vQ+mHNSnwFPVeS3nRmhkIwaP37/rQySCk90Mjuxk31wNyMq21 77NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=AmXJz1T+DxTQ8cL3dWsBE4Euit10u/N4HtWuky6pYRE=; b=o7U1ucZTAXUmfWn6+k69I8uU2Fp93EMVDnbjBFoJaYwVvp/3bqYHAukHDyE24zT2BU GUi7n2p2QFa6ofAd3mXhYBNW/ZnTy4XD1J1DWcRbQnaxOo0NufwYn4TNcn/xl82UcqvL o15qYmM4sUd5taXWefBYpOGmEq+Jkc5CpE9V78F3c/gSr3zebTppumbNoDuuX9R6KuHB pHFsw+q94qHwLebum+n6uR5uNSeNpQVne4myq+Acm1a6rg8Uj5gXl7uBF33gZIQpJgXX WUmbf6T4DB1YOgWKIjb7Rv7Cx3+lEVQQIGzYFxYL7hcotmpieeUNMFunrxRr8m9T9nbi S5+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=V3L1f0Op; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x89-20020a17090a6c6200b001bf2784b66csi3471342pjj.93.2022.03.17.13.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 13:29:19 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=V3L1f0Op; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 82CB72C69FE; Thu, 17 Mar 2022 13:04:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234700AbiCQODZ (ORCPT + 99 others); Thu, 17 Mar 2022 10:03:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234928AbiCQOCq (ORCPT ); Thu, 17 Mar 2022 10:02:46 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2DA11E5A48 for ; Thu, 17 Mar 2022 07:01:22 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id x8-20020a17090a788800b001c662c78b4fso2450275pjk.5 for ; Thu, 17 Mar 2022 07:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=AmXJz1T+DxTQ8cL3dWsBE4Euit10u/N4HtWuky6pYRE=; b=V3L1f0OpwlX27SXl8xzlUHsJrCaxgwXpjZ+thrxdmTARlLRSDFFBJ+xnGGLhlQsqqr tbkJyFaGSVmhVw5j9pAG34Rz8abgBSa0naQxCePa/cLUQx3nRMu9coTIGQ4vldyONv2K CMCnM93OSf6m0LNZ8U8XdMEZoOuwaLPvngsPbxN4Uxw/Tb/OW4209S1m0e9ri3orbvU/ lAvYKhGN8KXNAv1FpIFUv/VOJSK3nG1Nx19pmWs7x5bECEHXR2C7f822KvYKqD5zP0M3 UaNy/efqhy+qXYIxgLxHYB/ZbLn/li1zjGa9muAEbrTmPYtEZKC3/t2JySghT+nFOyXe LU9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=AmXJz1T+DxTQ8cL3dWsBE4Euit10u/N4HtWuky6pYRE=; b=jdU1FCDLmbiHExhsnzLGhuOvowZC9sijmmmhYV9IV03oXIe1+orEwX/YwoCzERHRIF r/shFD/IaOUJch1+nQfLkI4qnk6v8X/5QjxldZBn9yP/MsIwTrt2a73ZF4Ul2ldB9vwg 78Js1LuDymUrhWsQ/rk9A1EMPcFlpr5/LCJ0wLd39u1aXbabE39wiiXs5CPUrAnKm2bH foZvhGZRN/Se3Rt3PUclxR1FQcI/0XOGXmZHuvlSi5LeqwYSLrQkQa+Tt13ywSTnnMM/ OvHPn98DyP5Wsg68yxNIRYpBZRb+EmC663madPEREKwAADCRNVK8iKaYZLxMIi5Mvozw 80mg== X-Gm-Message-State: AOAM531mR4RE9Irnu4cOyyaciB9vyW5ZhTLZJPaF4HHPZxqsjIAUDxvg YfK51zoM+ZwlQ2lnAQzg5IVj5jsTs5D2 X-Received: from ezekiel.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:108e]) (user=shraash job=sendgmr) by 2002:a62:3896:0:b0:4f7:87dc:de5b with SMTP id f144-20020a623896000000b004f787dcde5bmr5201915pfa.49.1647525681892; Thu, 17 Mar 2022 07:01:21 -0700 (PDT) Date: Thu, 17 Mar 2022 19:31:15 +0530 Message-Id: <20220317140115.541007-1-shraash@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.35.1.723.g4982287a31-goog Subject: [PATCH] drm/amd/display: Fixed the unused-but-set-variable warning From: Aashish Sharma To: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , Pan Xinhui , David Airlie , Nicholas Kazlauskas , Meenakshikumar Somasundaram , Jake Wang , Anson Jacob , Guenter Roeck Cc: Daniel Vetter , Anthony Koo , Wayne Lin , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Aashish Sharma Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no 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 Fixed this kernel test robot warning: drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2893:12: warning: variable 'temp' set but not used [-Wunused-but-set-variable] Replaced the assignment to the unused temp variable with READ_ONCE() macro to flush the writes. Signed-off-by: Aashish Sharma --- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h index 873ecd04e01d..b7981a781701 100644 --- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h @@ -2913,13 +2913,12 @@ static inline void dmub_rb_flush_pending(const struct dmub_rb *rb) uint32_t wptr = rb->wrpt; while (rptr != wptr) { - uint64_t volatile *data = (uint64_t volatile *)((uint8_t *)(rb->base_address) + rptr); + uint64_t *data = (uint64_t volatile *)((uint8_t *)(rb->base_address) + rptr); //uint64_t volatile *p = (uint64_t volatile *)data; - uint64_t temp; uint8_t i; for (i = 0; i < DMUB_RB_CMD_SIZE / sizeof(uint64_t); i++) - temp = *data++; + (void)READ_ONCE(*data++); rptr += DMUB_RB_CMD_SIZE; if (rptr >= rb->capacity) -- 2.35.1.723.g4982287a31-goog