Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb2e1976 authored by Jiri Kosina's avatar Jiri Kosina
Browse files

HID: explain the signed/unsigned handling in hid_add_field()



Put a comment that clarifies the condition that handles both signed
and unsigned case for logical min/max in hid_add_field().

Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 0cd516c2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign
		return -1;
	}

	/* Handle both signed and unsigned cases properly */
	if ((parser->global.logical_minimum < 0 &&
		parser->global.logical_maximum <
		parser->global.logical_minimum) ||