From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Date: Thu, 08 Nov 2018 11:20:01 +0000 Subject: Re: [PATCH] media: staging: tegra-vde: print long unsigned using %lu format specifier Message-Id: <20181108112001.GA7793@kroah.com> List-Id: References: <20181108110224.1916-1-colin.king@canonical.com> In-Reply-To: <20181108110224.1916-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Colin King Cc: Dmitry Osipenko , Mauro Carvalho Chehab , Thierry Reding , Jonathan Hunter , linux-media@vger.kernel.org, linux-tegra@vger.kernel.org, devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org On Thu, Nov 08, 2018 at 11:02:24AM +0000, Colin King wrote: > From: Colin Ian King > > The frame.flags & FLAG_B_FRAME is promoted to a long unsigned because > of the use of the BIT() macro when defining FLAG_B_FRAME and causing a > build warning. Fix this by using the %lu format specifer. > > Cleans up warning: > drivers/staging/media/tegra-vde/tegra-vde.c:267:5: warning: format > specifies type 'int' but the argument has type 'unsigned long' [-Wformat] > > Fixes: 42e764d05712 ("staging: tegravde: replace bit assignment with macro") > Cc: Ioannis Valasakis > Reported-by: Stephen Rothwell > Signed-off-by: Colin Ian King > --- > drivers/staging/media/tegra-vde/tegra-vde.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/media/tegra-vde/tegra-vde.c b/drivers/staging/media/tegra-vde/tegra-vde.c > index 6f06061a40d9..66cf14212c14 100644 > --- a/drivers/staging/media/tegra-vde/tegra-vde.c > +++ b/drivers/staging/media/tegra-vde/tegra-vde.c > @@ -262,7 +262,7 @@ static void tegra_vde_setup_iram_tables(struct tegra_vde *vde, > value |= frame->frame_num; > > dev_dbg(vde->miscdev.parent, > - "\tFrame %d: frame_num = %d B_frame = %d\n", > + "\tFrame %d: frame_num = %d B_frame = %lu\n", > i + 1, frame->frame_num, > (frame->flags & FLAG_B_FRAME)); > } else { > -- > 2.19.1 Thanks for this, you beat me too it :) greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH] media: staging: tegra-vde: print long unsigned using %lu format specifier Date: Thu, 8 Nov 2018 03:20:01 -0800 Message-ID: <20181108112001.GA7793@kroah.com> References: <20181108110224.1916-1-colin.king@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20181108110224.1916-1-colin.king@canonical.com> Sender: linux-kernel-owner@vger.kernel.org To: Colin King Cc: Dmitry Osipenko , Mauro Carvalho Chehab , Thierry Reding , Jonathan Hunter , linux-media@vger.kernel.org, linux-tegra@vger.kernel.org, devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-tegra@vger.kernel.org On Thu, Nov 08, 2018 at 11:02:24AM +0000, Colin King wrote: > From: Colin Ian King > > The frame.flags & FLAG_B_FRAME is promoted to a long unsigned because > of the use of the BIT() macro when defining FLAG_B_FRAME and causing a > build warning. Fix this by using the %lu format specifer. > > Cleans up warning: > drivers/staging/media/tegra-vde/tegra-vde.c:267:5: warning: format > specifies type 'int' but the argument has type 'unsigned long' [-Wformat] > > Fixes: 42e764d05712 ("staging: tegravde: replace bit assignment with macro") > Cc: Ioannis Valasakis > Reported-by: Stephen Rothwell > Signed-off-by: Colin Ian King > --- > drivers/staging/media/tegra-vde/tegra-vde.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/media/tegra-vde/tegra-vde.c b/drivers/staging/media/tegra-vde/tegra-vde.c > index 6f06061a40d9..66cf14212c14 100644 > --- a/drivers/staging/media/tegra-vde/tegra-vde.c > +++ b/drivers/staging/media/tegra-vde/tegra-vde.c > @@ -262,7 +262,7 @@ static void tegra_vde_setup_iram_tables(struct tegra_vde *vde, > value |= frame->frame_num; > > dev_dbg(vde->miscdev.parent, > - "\tFrame %d: frame_num = %d B_frame = %d\n", > + "\tFrame %d: frame_num = %d B_frame = %lu\n", > i + 1, frame->frame_num, > (frame->flags & FLAG_B_FRAME)); > } else { > -- > 2.19.1 Thanks for this, you beat me too it :) greg k-h