Re: [PATCH 1/3] Allow resizing and replacing report descriptors

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

 



On 10.08.2010 09:16, Nikolai Kondrashov wrote:
> On 08/10/2010 03:03 AM, Robert Schedel wrote:
>> Would not it make sense to declare the returned buffer from report_fixup
>> const? With the desired new definition (no buffer copy/return private
>> reference) you should never want anyone to change the returned buffer
>> content afterwards. Of course, const would propagate a bit into hid-core.c
>> (hid_parse_report, fetch_item).
> Sorry for the late response, I managed to overlook your message somehow.

My email was late.
> Yes, I thought about it too. However, as this is my first patch, I'm still
> unsure about const policy in the kernel (some people don't like it) and I
> wanted to make the patch footprint as little as possible to minimize the
> errors and thus rejection possibility.

It is not only const-cleanness. Those static descriptor arrays in your new driver (approx. 200 bytes, I guess) are currently also non-const, due to this. They should probably also have a chance to be "rodata".

> I could make an additional patch, I think, since the original one is already
> applied.

Jiri should decide what he prefers as I am not aware of const guidelines either -- only wanted to point it out.

Regards,
Robert Schedel
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux