Re: [PATCH 2/7] firmware: add offset to request_firmware_into_buf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luis,

On 2019-08-22 12:47 p.m., Luis Chamberlain wrote:
On Thu, Aug 22, 2019 at 12:24:46PM -0700, Scott Branden wrote:
@@ -923,16 +936,22 @@ EXPORT_SYMBOL_GPL(firmware_request_cache);
   */
  int
  request_firmware_into_buf(const struct firmware **firmware_p, const char *name,
-			  struct device *device, void *buf, size_t size)
+			  struct device *device, void *buf, size_t size,
+			  size_t offset, unsigned int pread_flags)
This implies you having to change the other callers, and while currently
our list of drivers is small,

Yes, the list is small, very small.

There is a single driver making a call to the existing API.

And, the existing API was never tested until I submitted a test case.

And, the maintainer of that driver wanted

to start utilizing my enhanced API instead of the current API.

As such I think it is very reasonable to update the API right now.

following the history of the firmware API
and the long history of debate of *how* we should evolve its API, its
preferred we add yet another new caller for this functionality. So
please add a new caller, and use EXPORT_SYMBOL_GPL().

And while at it, pleaase use firmware_request_*() as the prefix, as we
have want to use that as the instilled prefix. We have yet to complete
the rename of the others older callers but its just a matter of time.

So something like: firmware_request_into_buf_offset()

I would prefer to rename the API at this time given there is only a single user.

Otherwise I would need to duplicate quite a bit in the test code to support testing

the single user of the old api and then enhanced API.

Or, I can leave existing API in place and change the test case to

just test the enhanced API to keep things simpler in the test code?


And thanks for adding a test case!

   Luis

Regards,

 Scott




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux