Linux Media Controller development
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Sakari Ailus <sakari.ailus@iki.fi>, <linux-media@vger.kernel.org>,
	Benoit Parrot <bparrot@ti.com>
Subject: Re: [PATCH] media: ti-vpe: cal: Fix compilation on 32-bit ARM
Date: Tue, 25 Aug 2020 15:51:51 +0300	[thread overview]
Message-ID: <36f1f9d1-4817-a5f8-e3c8-5eb01a384dea@ti.com> (raw)
In-Reply-To: <20200825121916.GD6767@pendragon.ideasonboard.com>

On 25/08/2020 15:19, Laurent Pinchart wrote:
> Hi Tomi,
> 
> On Tue, Aug 25, 2020 at 03:11:24PM +0300, Tomi Valkeinen wrote:
>> On 24/08/2020 13:54, Laurent Pinchart wrote:
>>> On Mon, Aug 24, 2020 at 12:23:04PM +0300, Sakari Ailus wrote:
>>>> On Sun, Aug 23, 2020 at 08:02:57AM +0300, Laurent Pinchart wrote:
>>>>> When compiled on 32-bit ARM, the CAL driver fails with the FIELD_PREP()
>>>>> macro complaining that the mask is not constant. While all callers of
>>>>> the inline cal_write_field() function pass a constant mask, the mask
>>>>> parameter itself is a variable, which likely doesn't please the
>>>>> compiler.
>>>>>
>>>>> Fix it by replacing FIELD_PREP() with a manual implementation.
>>>>>
>>>>> Fixes: 50797fb30b95 ("media: ti-vpe: cal: Turn reg_(read|write)_field() into inline functions")
>>>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>>>>
>>>> Thanks!
>>>>
>>>> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>>>
>>> And I forgot to add
>>>
>>> Reported-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>>>
>>> Tomi, will you handle this patch ? Could you add the tags ?
>>
>> I don't see this when compiling. Which compiler version is it?
> 
> arm-buildroot-linux-uclibcgnueabihf-gcc.br_real (Buildroot 2020.05.1) 9.3.0


> Kernel defconfig attached, for v5.9-rc1.

Ok. It's something in the defconfig. And identical cal_write_field() call in another function works.
I guess it depends on whether the compiler happens to inline or not inline cal_write_field().

I don't see much harm in changing this, so looks good to me. Although I believe cal_read_field() may
also start failing at some point, but we can fix it then.

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Hans or Mauro, can you pick up this fix for 5.9-rc?

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

      reply	other threads:[~2020-08-25 12:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-23  5:02 [PATCH] media: ti-vpe: cal: Fix compilation on 32-bit ARM Laurent Pinchart
2020-08-24  9:23 ` Sakari Ailus
2020-08-24 10:54   ` Laurent Pinchart
2020-08-25 12:11     ` Tomi Valkeinen
2020-08-25 12:19       ` Laurent Pinchart
2020-08-25 12:51         ` Tomi Valkeinen [this message]

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=36f1f9d1-4817-a5f8-e3c8-5eb01a384dea@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=bparrot@ti.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@iki.fi \
    /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