From: Imre Deak <imre.deak@intel.com>
To: David Laight <David.Laight@aculab.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>
Subject: Re: Build fail in drivers/gpu/drm/i915/display/intel_tc.c
Date: Fri, 10 Nov 2023 01:34:29 +0200 [thread overview]
Message-ID: <ZU1shQH64ryxp/l5@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <4df68c74c4da46ac943ac21578e9b084@AcuMS.aculab.com>
On Thu, Nov 09, 2023 at 10:55:38PM +0000, David Laight wrote:
> I'm seeing a build fail at line 1878 of intel_tc.c
>
> gcc is being a bit over-enthusiastic about snprintf() formats
> and reports that "%c/TC#%d", xxx, tc_port + 1 might not fit
> in the 8 bytes available.
> 'tc_port' is an enum with values -1 to 5.
> I guess it is either allowing for the full 'int' value of
> the enum.
> Changing to '(tc_port & 7) + 1' stops the compiler bleating.
>
> The code isn't new, so I guess the compiler flags have changed?
>
> It might depend on the gcc version as well.
> I'm using gcc 7.5.0 from Ubuntu 18.04.
The compiler warn should be fixed/suppressed by:
https://lore.kernel.org/all/20231026125636.5080-1-nirmoy.das@intel.com
--Imre
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>
next prev parent reply other threads:[~2023-11-09 23:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 22:55 Build fail in drivers/gpu/drm/i915/display/intel_tc.c David Laight
2023-11-09 23:34 ` Imre Deak [this message]
2023-11-10 0:51 ` Linus Torvalds
2023-11-10 9:00 ` David Laight
2023-11-14 19:07 ` Imre Deak
2023-11-15 9:26 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZU1shQH64ryxp/l5@ideak-desk.fi.intel.com \
--to=imre.deak@intel.com \
--cc=David.Laight@aculab.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox