From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D59BC32751 for ; Wed, 7 Aug 2019 21:03:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D38C7217D9 for ; Wed, 7 Aug 2019 21:03:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dJ56dYMi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D38C7217D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1vSxFDYvtxXdF3sh8avL7LJwL28uLqRABHNk0ikDG7Y=; b=dJ56dYMiQSzaOb pKEx45r9q/qaEIfT3+ooXAY1SsHTnNOw//pD1IUcrj9uBxqQ9bNUDgmfPe2pwBwNCCxmx06GPBFZm 0ao+3xYSn706D83ZCBe3f0MD0OfyBEJnCKvHzzRV8NXjjcGGxREwhd50NUnq8V+5/usFcSelPKEJ6 /IH61G4XED1lGQkxwu4wK1wG0bVUPN/hOGjqjlBx2Ye/f3LYVrS3LAvLd6e/VwimD3ztaxT8hX8TI uD5ZI9jmyc7ASdIacb4UvyzzxXKoFWH4zK+ZKyph4Vgk+VgiZFHUdnOy38hkMgC2OQtUuibbx5COo Kh5h+HJ7g12mumfZqneg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvT5X-0002kJ-C5; Wed, 07 Aug 2019 21:03:15 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvT5R-0002jW-09; Wed, 07 Aug 2019 21:03:10 +0000 Received: from ip5f5a6044.dynamic.kabel-deutschland.de ([95.90.96.68] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hvT5G-0003Vr-GS; Wed, 07 Aug 2019 23:02:58 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Nathan Chancellor , Kishon Vijay Abraham I Subject: Re: [PATCH] phy-rockchip-inno-hdmi: Fix RK3328_TERM_RESISTOR_CALIB_SPEED_7_0's third value Date: Wed, 07 Aug 2019 23:02:57 +0200 Message-ID: <5866399.zOWMQKR7fF@diego> In-Reply-To: <20190807192305.6604-1-natechancellor@gmail.com> References: <20190807192305.6604-1-natechancellor@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190807_140309_195862_07C4CC6E X-CRM114-Status: GOOD ( 16.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "kernelci . org bot" , Andrzej Hajda , Naresh Kamboju , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Robin Murphy , Guenter Roeck Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Mittwoch, 7. August 2019, 21:23:05 CEST schrieb Nathan Chancellor: > After commit "linux/bits.h: Add compile time sanity check of GENMASK > inputs" [1], arm64 defconfig builds started failing: > > In file included from ../include/linux/bits.h:22, > from ../include/linux/bitops.h:5, > from ../include/linux/kernel.h:12, > from ../include/linux/clk.h:13, > from ../drivers/phy/rockchip/phy-rockchip-inno-hdmi.c:9: > ../drivers/phy/rockchip/phy-rockchip-inno-hdmi.c: In function 'inno_hdmi_phy_rk3328_power_on': > ../include/linux/build_bug.h:16:45: error: negative width in bit-field '' > 16 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); })) > | ^ > ../include/linux/bits.h:24:18: note: in expansion of macro 'BUILD_BUG_ON_ZERO' > 24 | ((unsigned long)BUILD_BUG_ON_ZERO(__builtin_choose_expr( \ > | ^~~~~~~~~~~~~~~~~ > ../include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK' > 39 | (GENMASK_INPUT_CHECK(high, low) + __GENMASK(high, low)) > | ^~~~~~~~~~~~~~~~~~~ > ../drivers/phy/rockchip/phy-rockchip-inno-hdmi.c:24:42: note: in expansion of macro 'GENMASK' > 24 | #define UPDATE(x, h, l) (((x) << (l)) & GENMASK((h), (l))) > | ^~~~~~~ > ../drivers/phy/rockchip/phy-rockchip-inno-hdmi.c:201:50: note: in expansion of macro 'UPDATE' > 201 | #define RK3328_TERM_RESISTOR_CALIB_SPEED_7_0(x) UPDATE(x, 7, 9) > | ^~~~~~ > ../drivers/phy/rockchip/phy-rockchip-inno-hdmi.c:1046:26: note: in expansion of macro 'RK3328_TERM_RESISTOR_CALIB_SPEED_7_0' > 1046 | inno_write(inno, 0xc6, RK3328_TERM_RESISTOR_CALIB_SPEED_7_0(v)); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > As pointed out by Robin and Guenter, inno_write's val argument is an > 8-bit value so having a mask larger than that doesn't make sense. This > also matches the rest of the *_7_0 macros in this driver. > > [1]: https://lore.kernel.org/lkml/20190801230358.4193-2-rikard.falkeborn@gmail.com/ > > Reported-by: Andrzej Hajda > Reported-by: Guenter Roeck > Reported-by: kernelci.org bot > Reported-by: Naresh Kamboju > Suggested-by: Guenter Roeck > Suggested-by: Robin Murphy > Signed-off-by: Nathan Chancellor > --- Reviewed-by: Heiko Stuebner on a rk3328-rock64 hdmi output still works Tested-by: Heiko Stuebner @Kishon: Would probably be good to get this fast into 5.3-rc. Heiko > drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c > index b10a84cab4a7..2b97fb1185a0 100644 > --- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c > +++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c > @@ -198,7 +198,7 @@ > #define RK3328_BYPASS_TERM_RESISTOR_CALIB BIT(7) > #define RK3328_TERM_RESISTOR_CALIB_SPEED_14_8(x) UPDATE((x) >> 8, 6, 0) > /* REG:0xc6 */ > -#define RK3328_TERM_RESISTOR_CALIB_SPEED_7_0(x) UPDATE(x, 7, 9) > +#define RK3328_TERM_RESISTOR_CALIB_SPEED_7_0(x) UPDATE(x, 7, 0) > /* REG:0xc7 */ > #define RK3328_TERM_RESISTOR_50 UPDATE(0, 2, 1) > #define RK3328_TERM_RESISTOR_62_5 UPDATE(1, 2, 1) > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel