[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb49332b-876a-0bd6-cefe-863f03903745@redhat.com>
Date: Tue, 12 Apr 2022 14:45:40 +0200
From: Javier Martinez Canillas <javierm@...hat.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Rob Herring <robh@...nel.org>,
DRI Development <dri-devel@...ts.freedesktop.org>,
Neil Armstrong <narmstrong@...libre.com>,
Mark Brown <broonie@...nel.org>,
Chen-Yu Tsai <wens@...nel.org>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>
Subject: Re: [PATCH v2 4/5] drm/solomon: Move device info from ssd130x-i2c to
the core driver
Hello Andy,
Thanks for your feedback.
On 4/12/22 13:21, Andy Shevchenko wrote:
> On Tue, Apr 12, 2022 at 10:07:02AM +0200, Javier Martinez Canillas wrote:
>> On 4/12/22 09:23, Geert Uytterhoeven wrote:
>>> On Mon, Apr 11, 2022 at 11:12 PM Javier Martinez Canillas
>>> <javierm@...hat.com> wrote:
>
> ...
>
>>>> - ssd130x->device_info = device_get_match_data(dev);
>>>> +
>>>> + variant = (enum ssd130x_variants)device_get_match_data(dev);
>>>
>>> (uintptr_t), to avoid a cast from pointer to integer of different
>>> size warning.
>>>
>>
>> Indeed. The kernel test robot reported the same.
>
> Not only because of this, but also with the non-NULL pointers I prefer the old
> style without ugly castings.
>
> Instead, you may export the array (in the driver's namespace) and use
> &info[ID] pointer for the specific device info.
>
That's a great idea! I'll do that in v3.
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat
Powered by blists - more mailing lists