Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp963965rwb; Sat, 17 Sep 2022 20:17:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7l20QOZwjDRv/gFW9Kbw2CR5WLdeBWEdVMK78w+cQIuDKoCwz3DuT+FM/FFMXi455C3Vvx X-Received: by 2002:a05:6402:c8a:b0:44e:81b3:4b7e with SMTP id cm10-20020a0564020c8a00b0044e81b34b7emr10152765edb.181.1663471037542; Sat, 17 Sep 2022 20:17:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663471037; cv=none; d=google.com; s=arc-20160816; b=L0nIQnetaFk/bYOaLIgRMlcC/ujc9clIMz91s9jf14r69DOXLw3f61KQWZn87ImFKb wkIt7Fg97l+2kfNBZ+oyHkmqKVKfcRtdwJv7zdL0thvW1Oiaf8tVye5vVckOHyd76y6/ CA0y5q3/Ov3qX+Xc+EwnwHgsEymqxXjU74hc8lG13BSGSk1ZQJ21nFfZGLRVIoA4l/gD o3M4eTNfNUEYADyuPtrRbf0T8tqKS+PXkGKYXGQRvYg387mtglSRNXs4U5fSd3miBaKd 2MEHZFbtYWw7DqNtk4ewigKm+KDgYmZHxIW4vzQzToLNJt/uqAlx1w35/3UNyik+3eLp Y2Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=aT/xJUvlS3ZkhinZGJsF7f/pWcb52Vm/+Ih6k0YdT3c=; b=AqrsxFaqHK3+gC0eBRvIM/OwE9cSxHThiyF3KbVqHbGjpBE5W0ojOGcdizfvo6Z6yz wslzA6EbYZEOrDnMuNG8Lm65F3R3JieuCXczh8oUWlrGJchPekXuHXOEJCSxI9G0Nm5s zCoT7vtwHQLIXaqnF2P53AaiM45iHnjdK7BrrUf4SzjUpP2+rDf/RNPExCO561Abfc86 5Olv7M75xor18wmEgPkmOW1YRoHAf2koGBtojY0YYKGfB9Ah8UngAEcgXqxYgCOuBWEQ iS/2RNusQH1QeNvj3Pnso7Jrs+zgLP4g1X3C+ax6/7ZKEXeER/CDKQ9Zmyucuf213ZQv iutg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZC6AiZl5; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m22-20020a056402431600b0044ef7afb9c4si6515127edc.543.2022.09.17.20.16.50; Sat, 17 Sep 2022 20:17:17 -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=@kernel.org header.s=k20201202 header.b=ZC6AiZl5; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229572AbiIRDOO (ORCPT + 99 others); Sat, 17 Sep 2022 23:14:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbiIRDOK (ORCPT ); Sat, 17 Sep 2022 23:14:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1B6413F49 for ; Sat, 17 Sep 2022 20:14:08 -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 ams.source.kernel.org (Postfix) with ESMTPS id 198D0B808BE for ; Sun, 18 Sep 2022 03:14:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0795C433B5 for ; Sun, 18 Sep 2022 03:14:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663470845; bh=Y9FHsBbI7CNPRKhfCvmq4BIFyaa1dC1WylWyfszKy4s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZC6AiZl5zbZmsPoTnRaHmLCF1K78RvN57gFeZD5Y5OkFRyZAHUfVqlnpG8um7Ki+x F45/ngOd69C83qSsvfYTYNT4KW14z0TjlLFYKazYzR/10J4aAUDPBVDXP2Z0cTCpoG +rMmYxW4FuFOHZxC+gaLtnWwZAvEcpiWhSxoHP5UX6JZnm08osBXBUie2qPh7bL0YC ZaF/mrOeRPZreA4aWSMadtG4XkPlEK//6Bkt5C8p1zugh7LmSeFFoyiBO/7y1d6bqn 84IxB2F8jNDnIfb9r4OoZAnLpQwQ/5eiXcIfvpErNgcJr0RfpeRM2fOHfbNJq+tkfJ u0ZPG5n0lySgw== Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-12c8312131fso7334087fac.4 for ; Sat, 17 Sep 2022 20:14:05 -0700 (PDT) X-Gm-Message-State: ACgBeo20QxPfZiGt3HWBTN9nRkH1n+b2fuo9UyhWDPoQ8PUSY7rXOyBJ Hkwa3dRaXAYhLjDPV+4S7X/ClqJrzXh8SBYSCg== X-Received: by 2002:a05:6871:96:b0:11d:ca1b:db19 with SMTP id u22-20020a056871009600b0011dca1bdb19mr12989922oaa.74.1663470844989; Sat, 17 Sep 2022 20:14:04 -0700 (PDT) MIME-Version: 1.0 References: <20220916133821.27980-1-rex-bc.chen@mediatek.com> <20220916133821.27980-4-rex-bc.chen@mediatek.com> In-Reply-To: <20220916133821.27980-4-rex-bc.chen@mediatek.com> From: Chun-Kuang Hu Date: Sun, 18 Sep 2022 11:13:51 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/3] drm/mediatek: dp: Fix warning in mtk_dp_video_mute() To: Bo-Chen Chen Cc: Chun-Kuang Hu , Philipp Zabel , David Airlie , Matthias Brugger , Guillaume Ranquet , Daniel Vetter , Jitao Shi , AngeloGioacchino Del Regno , CK Hu , liangxu.xu@mediatek.com, DRI Development , "moderated list:ARM/Mediatek SoC support" , linux-kernel , Linux ARM , Project_Global_Chrome_Upstream_Group Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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 Hi, Bo-Chen: Bo-Chen Chen =E6=96=BC 2022=E5=B9=B49=E6=9C=8816= =E6=97=A5 =E9=80=B1=E4=BA=94 =E6=99=9A=E4=B8=8A9:38=E5=AF=AB=E9=81=93=EF=BC= =9A > > Warning: > ../drivers/gpu/drm/mediatek/mtk_dp.c: In function =E2=80=98mtk_dp_video_m= ute=E2=80=99: > ../drivers/gpu/drm/mediatek/mtk_dp.c:947:23: warning: format =E2=80=98%x= =E2=80=99 > expects argument of type =E2=80=98unsigned int=E2=80=99, but argument 4 h= as type =E2=80=98long > unsigned int=E2=80=99 [-Wformat=3D] > 947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\= n", > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~ > ../include/linux/dev_printk.h:129:27: note: in definition of macro =E2=80= =98dev_printk=E2=80=99 > 129 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \ > | ^~~ > ../include/linux/dev_printk.h:163:31: note: in expansion of macro =E2=80= =98dev_fmt=E2=80=99 > 163 | dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ > | ^~~~~~~ > ../drivers/gpu/drm/mediatek/mtk_dp.c:947:2: note: in expansion of > macro =E2=80=98dev_dbg=E2=80=99 > 947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\= n", > | ^~~~~~~ > ../drivers/gpu/drm/mediatek/mtk_dp.c:947:36: note: format string is defin= ed here > 947 | dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\= n", > | ~^ > | | > | unsigned int > | %lx > > To fix this issue, we use %s to replace 0x%x. Acked-by: Chun-Kuang Hu > > Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort drive= r") > Reported-by: Chun-Kuang Hu > Signed-off-by: Bo-Chen Chen > Reviewed-by: Matthias Brugger > --- > drivers/gpu/drm/mediatek/mtk_dp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek= /mtk_dp.c > index c72c646e25e9..d58e98b2f83a 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dp.c > +++ b/drivers/gpu/drm/mediatek/mtk_dp.c > @@ -1222,8 +1222,8 @@ static void mtk_dp_video_mute(struct mtk_dp *mtk_dp= , bool enable) > mtk_dp->data->smc_cmd, enable, > 0, 0, 0, 0, 0, &res); > > - dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: 0x%x, ret: 0x%lx-0x%lx\n= ", > - mtk_dp->data->smc_cmd, enable, res.a0, res.a1); > + dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1: %s, ret: 0x%lx-0x%lx\n", > + mtk_dp->data->smc_cmd, enable ? "enable" : "disable", res= .a0, res.a1); > } > > static void mtk_dp_audio_mute(struct mtk_dp *mtk_dp, bool mute) > -- > 2.18.0 >