Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3353212rwa; Tue, 23 Aug 2022 03:25:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Ex+aMyD8GlAKr0K0bvD9tArepFnX79GfjI+mPyFUVY9HG41bn7+YtDwQLeQkHGwW0TMHL X-Received: by 2002:a05:6402:298c:b0:446:a97:1800 with SMTP id eq12-20020a056402298c00b004460a971800mr3078145edb.421.1661250306564; Tue, 23 Aug 2022 03:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661250306; cv=none; d=google.com; s=arc-20160816; b=XItHmkrOMNm/yzGfB0XNJMteoV1+aKwDmLXbkKUv8aZIBMAHEz3QjNitc897Rgka4u 1/spr3iz5VK5+5VcTozh6ON6H1tO3jiSLFlhMZvzk51GO5NE2URCalcS3nfa1+WN29TX r6iqpV3OhS+QcGaMso3TUjGVQPJrnEiz8BILRXfj4xwE5d/KY45WDSjf6pMGBU7LRtvE bDAnWeSTq02QfRZjcc9rZkiXm8O1uHx3kXT6rL/ZoiJC+AsZrCOPEj7plUMvXsRFKZhr BWZNaWNR9Ou0ljuJzun14LaL58+SFoGN/unazqzjKqKWPKvXdfnHTiTn9yJcyNgEHvgp qnDQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Fa+HVm7fXkw2QjY5+r9uKj/FO41tdmh8eLqTzhZb1jM=; b=bupu/m/sJoWbVhELuWw9ZUmv0eEhN1NsGpD3aB7eTHPkivYuG+3Kwke7rJ+gAl+BrX 1qooM7ZsqcS+eAzOqj2zDlSOfwsKJm0kzO+i1hZUyGe/Cvy7XG+nYYOxzqnEhmkHIhcw RGsLHFfeLM55X4P7vUSf6l3Zkvsmiu1XU049aY1FiDmzh+/ERhhzFjiAigCCMkRoL4WR cS2ujT8CJM5abslVeMyWlcWPJSmHNrcIb0XFT3T1FGhycJe/x3AAfZun5JEkrkIu8P+3 pl95j7vi5CPltnedJ1ZHqTZmnN5jb8P7CdjG1n7MIJGZ8Ar7Glex+IzdwRs6clMHNC/1 f6gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nJRWiJvr; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e11-20020a17090658cb00b00731868bc6e8si13650791ejs.58.2022.08.23.03.24.40; Tue, 23 Aug 2022 03:25:06 -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=@linuxfoundation.org header.s=korg header.b=nJRWiJvr; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354200AbiHWKUn (ORCPT + 99 others); Tue, 23 Aug 2022 06:20:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352875AbiHWKJY (ORCPT ); Tue, 23 Aug 2022 06:09:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7273C7D7BE; Tue, 23 Aug 2022 01:55:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1210761555; Tue, 23 Aug 2022 08:55:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C3FFC433C1; Tue, 23 Aug 2022 08:55:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244911; bh=YA7qGjAoZ0w68jbN59Y8bWwXYBlkSuhDhVnrXYHcvq8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nJRWiJvrw17Hc26phI9MaJyRzOwUs1omMVkrE77RFXTFsiJ09WGGdcFRDw/LkJpdr HSLsQOqpTIcB0NvRZIGYOS80+gj3S+3NAKkOTn0Uh5qHF66elsWbPeuyggpTBkfngG cyJLVqgJiwErWEk2iSILzNjctP1rB7wpFvJZ1erk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Sai Prakash Ranjan , Arnd Bergmann , Neil Armstrong , Sasha Levin Subject: [PATCH 5.15 171/244] drm/meson: Fix overflow implicit truncation warnings Date: Tue, 23 Aug 2022 10:25:30 +0200 Message-Id: <20220823080104.975324224@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Sai Prakash Ranjan [ Upstream commit 98692f52c588225034cbff458622c2c06dfcb544 ] Fix -Woverflow warnings for drm/meson driver which is a result of moving arm64 custom MMIO accessor macros to asm-generic function implementations giving a bonus type-checking now and uncovering these overflow warnings. drivers/gpu/drm/meson/meson_viu.c: In function ‘meson_viu_init’: drivers/gpu/drm/meson/meson_registers.h:1826:48: error: large integer implicitly truncated to unsigned type [-Werror=overflow] #define VIU_OSD_BLEND_REORDER(dest, src) ((src) << (dest * 4)) ^ drivers/gpu/drm/meson/meson_viu.c:472:18: note: in expansion of macro ‘VIU_OSD_BLEND_REORDER’ writel_relaxed(VIU_OSD_BLEND_REORDER(0, 1) | ^~~~~~~~~~~~~~~~~~~~~ Reported-by: kernel test robot Signed-off-by: Sai Prakash Ranjan Reviewed-by: Arnd Bergmann Cc: Arnd Bergmann Cc: Neil Armstrong Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- drivers/gpu/drm/meson/meson_viu.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_viu.c b/drivers/gpu/drm/meson/meson_viu.c index 259f3e6bec90..bb7e109534de 100644 --- a/drivers/gpu/drm/meson/meson_viu.c +++ b/drivers/gpu/drm/meson/meson_viu.c @@ -469,17 +469,17 @@ void meson_viu_init(struct meson_drm *priv) priv->io_base + _REG(VD2_IF0_LUMA_FIFO_SIZE)); if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) { - writel_relaxed(VIU_OSD_BLEND_REORDER(0, 1) | - VIU_OSD_BLEND_REORDER(1, 0) | - VIU_OSD_BLEND_REORDER(2, 0) | - VIU_OSD_BLEND_REORDER(3, 0) | - VIU_OSD_BLEND_DIN_EN(1) | - VIU_OSD_BLEND1_DIN3_BYPASS_TO_DOUT1 | - VIU_OSD_BLEND1_DOUT_BYPASS_TO_BLEND2 | - VIU_OSD_BLEND_DIN0_BYPASS_TO_DOUT0 | - VIU_OSD_BLEND_BLEN2_PREMULT_EN(1) | - VIU_OSD_BLEND_HOLD_LINES(4), - priv->io_base + _REG(VIU_OSD_BLEND_CTRL)); + u32 val = (u32)VIU_OSD_BLEND_REORDER(0, 1) | + (u32)VIU_OSD_BLEND_REORDER(1, 0) | + (u32)VIU_OSD_BLEND_REORDER(2, 0) | + (u32)VIU_OSD_BLEND_REORDER(3, 0) | + (u32)VIU_OSD_BLEND_DIN_EN(1) | + (u32)VIU_OSD_BLEND1_DIN3_BYPASS_TO_DOUT1 | + (u32)VIU_OSD_BLEND1_DOUT_BYPASS_TO_BLEND2 | + (u32)VIU_OSD_BLEND_DIN0_BYPASS_TO_DOUT0 | + (u32)VIU_OSD_BLEND_BLEN2_PREMULT_EN(1) | + (u32)VIU_OSD_BLEND_HOLD_LINES(4); + writel_relaxed(val, priv->io_base + _REG(VIU_OSD_BLEND_CTRL)); writel_relaxed(OSD_BLEND_PATH_SEL_ENABLE, priv->io_base + _REG(OSD1_BLEND_SRC_CTRL)); -- 2.35.1