lkml.org 
[lkml]   [2020]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 6/7] misc: bcm-vk: add Broadcom VK driver
From
Date
Hi Luis,

On 2020-05-12 5:38 p.m., Luis Chamberlain wrote:
> On Thu, May 07, 2020 at 05:27:38PM -0700, Scott Branden wrote:
>> +#if defined(CONFIG_REQ_FW_INTO_BUF_PRIV)
>> +
>> +#define KERNEL_PREAD_FLAG_PART 0x0001 /* Allow reading part of file */
>> +#define REQUEST_FIRMWARE_INTO_BUF request_firmware_into_buf_priv
>> +int request_firmware_into_buf_priv(const struct firmware **firmware_p,
>> + const char *name, struct device *device,
>> + void *buf, size_t size,
>> + size_t offset, unsigned int pread_flags);
>> +
>> +#else
>> +
>> +#define REQUEST_FIRMWARE_INTO_BUF request_firmware_into_buf
>> +
>> +#endif
>> +
>> +#endif
> Please clean this up, the code must reflect only the code upstream. No
> config stuff like this should be used on the driver. I had to stop my
> review here.
The CONFIG_ prefix shouldn't have been there as there is no Kconfig
option to select this.
Would like to just change it to a normal define without CONFIG_ prefix
instead?
This code is here to allow a limited version of the driver to run on
older kernels which do not have the necessary partial file read support.
By having it in the upstream codebase we don't need to maintain an
internal version of the driver.  User can take the upstream kernel
module and compile it against an old version of the kernel by via the
define.
> Luis
Regards,
Scott

\
 
 \ /
  Last update: 2020-05-13 08:32    [W:0.103 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site