From: Jani Nikula <jani.nikula@linux.intel.com>
To: Robert Tarasov <tutankhamen@chromium.org>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Dave Airlie <airlied@redhat.com>,
Maling list - DRI developers <dri-devel@lists.freedesktop.org>,
Hans de Goede <hdegoede@redhat.com>
Subject: Re: [PATCH] drm/udl: Refactor edid retreiving in UDL driver
Date: Thu, 14 Mar 2019 12:00:47 +0200 [thread overview]
Message-ID: <87ftrpixm8.fsf@intel.com> (raw)
In-Reply-To: <CAGnhOiWB7rQZ2vs_Q+aw6-Vptyx9=QFYgY3aQLuzvmxUiVK3Rg@mail.gmail.com>
On Wed, 13 Mar 2019, Robert Tarasov <tutankhamen@chromium.org> wrote:
> On Wed, Mar 13, 2019 at 2:26 AM Jani Nikula <jani.nikula@linux.intel.com>
> wrote:
> read_buff = kmalloc(2, GFP_KERNEL);
>>
>> A follow-up cleanup might be to switch to using "u8 read_buff[2];"
>> instead of kmallocing it.
>>
>> I don't claim to understand how the usb stuff works, but otherwise the
>> patch looks good to me. Nice refactoring!
>>
>>
> "The buffer passed to usb_control_msg may end up in scatter-gather list,
> and may thus not be on the stack. Having it on the stack usually works on
> x86, but not on other archs. "
Apparently you're referring to commit 242187b36255 ("udldrmfb:
udl_get_edid: usb_control_msg buffer must not be on the stack"). Cc:
Hans.
Mind blows. Not a word on this anywhere in usb_control_msg()
documentation. Nothing. I found this patch [1] that never go applied,
which doesn't actually say anything about stack, only alignment and
padding. Cc: Mauro.
I think with this usb_control_msg() goes to negative levels in Rusty's
API design manifesto.
BR,
Jani.
[1] http://mid.mail-archive.com/ee3ea6944e095fa3b2383697a967f4bc9e2d9631.1490813422.git.mchehab@s-opensource.com
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-03-14 9:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-13 1:04 [PATCH] drm/udl: Refactor edid retreiving in UDL driver Robert Tarasov
2019-03-13 9:27 ` Jani Nikula
2019-03-13 18:36 ` Robert Tarasov
2019-03-14 10:00 ` Jani Nikula [this message]
2019-03-14 10:46 ` Hans de Goede
-- strict thread matches above, loose matches on Subject: below --
2019-03-13 18:38 Robert Tarasov
2019-03-15 2:04 ` Dave Airlie
2019-03-15 9:55 ` Jani Nikula
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=87ftrpixm8.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=mchehab+samsung@kernel.org \
--cc=tutankhamen@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.