Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3324936rwa; Tue, 23 Aug 2022 02:52:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR4nEl9l4TzQFT+Yw9nueeyneM5u5HYv0q6ysptO+YkAEDQIt9Jg1DTVR1AriUEY9Mkh0qGO X-Received: by 2002:a17:906:5d07:b0:739:8df9:3c1e with SMTP id g7-20020a1709065d0700b007398df93c1emr15691718ejt.345.1661248359629; Tue, 23 Aug 2022 02:52:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661248359; cv=none; d=google.com; s=arc-20160816; b=ZxxFI1vnCy+qA1dsUlqz4hsDYBgNFnbxNXJ7k+Akc3LXfPtJ4J6dJS+ocZzcH651MV AEN/qRA4CrIXcJXPV9SNUhCxBXAkMQlyeYthnIWL+lNODWwKOc2c6P7qFd+R7zqq5rMM V8h9Qi5VlUcmAkPiUZE1hxOtQyM969y5lwkAYVEeKFxxXbD4qj1B+m0BekmSGFwmUjpZ EcDk/SYlq0gSVohN0gqKpVBhtXb/82LhfYqpED+iT7KXUQhc7A0kqJLvW+xZQf8HILLv aHX9fPkCQkEx9BoRj4+Fo3/Fh4zMJyEd0sDIau/u+RzWJ0tWxbtq724nPwv/SC4bONTT V7TQ== 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=o8r9CLAiD09jW+MVp9LkHyhoA1EgPcGijo3SCgeG5z4gMsjeCwKMPlxImHKxn6KdCX 0ggeeH8RtSBB1krLPJn0RCweT6/a60PiYYc6ajFWP4G/cT+J6WO1EyHkZQwb1/FslB8Z UUbaqx1/GN4X7+9AH6CTTnlH/EsJtleZelAVmWtLBQv25429We9MAa24zJk0veIBMS5m DLQ8pizfBNp2TQAMTPJI4ENHfB/iZB7fqkMSf4q/WqVir6P0G8OgImjLWHinaLCJo8C6 17404m9i4bzP9PECBC6FfI4vtxKOY8rBgLJ1ZKa1qpYjYduVLEiQys3vzaBLcZoGVpZo 6TPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YnHrqg8j; 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 v20-20020a056402349400b00442785a4226si2091249edc.258.2022.08.23.02.52.11; Tue, 23 Aug 2022 02:52:39 -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=YnHrqg8j; 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 S1343711AbiHWJRE (ORCPT + 99 others); Tue, 23 Aug 2022 05:17:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348949AbiHWJNh (ORCPT ); Tue, 23 Aug 2022 05:13:37 -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 3B8E56D574; Tue, 23 Aug 2022 01:31:55 -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 DC81B61360; Tue, 23 Aug 2022 08:31:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3EA9C433D6; Tue, 23 Aug 2022 08:31:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243514; bh=YA7qGjAoZ0w68jbN59Y8bWwXYBlkSuhDhVnrXYHcvq8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YnHrqg8jfIThdZ8EQOpb+IlCuFJ5p5/mBxIhHrYAZGI6g7QknJ/CvXNr2MY59zo49 hX47iiTadTe7SNPIQpsXoZJiO4FJtG3fQwx1bhP/aEoar9CFEK1JZgieC47lv/E5u2 j4NnZ19eOIzO4NRenTRlgKDHPwLDshPcOOwp2pEM= 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.19 271/365] drm/meson: Fix overflow implicit truncation warnings Date: Tue, 23 Aug 2022 10:02:52 +0200 Message-Id: <20220823080129.509616916@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@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