All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH: Simplify hidpp_send_rap_command_sync calls
@ 2022-11-10 14:20 Andreas Bergmeier
  2022-11-10 14:33 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Bergmeier @ 2022-11-10 14:20 UTC (permalink / raw)
  To: USB mailing list, Benjamin Tissoires

Inside function, report_id might get overwritten.
Only REPORT_ID_HIDPP_SHORT is ever passed in.
So there seems to be no point in passing report_id in the first place.
Just directly evaluate which report_id to use in the function itself.


diff --git a/drivers/hid/hid-logitech-hidpp.c
b/drivers/hid/hid-logitech-hidpp.c
index 898691a77a58..20ae7f73ef08 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -360,15 +360,16 @@ static int hidpp_send_fap_command_sync(struct
hidpp_device *hidpp,
 }

 static int hidpp_send_rap_command_sync(struct hidpp_device *hidpp_dev,
-	u8 report_id, u8 sub_id, u8 reg_address, u8 *params, int
param_count,
+	u8 sub_id, u8 reg_address, u8 *params, int param_count,
 	struct hidpp_report *response)
 {
 	struct hidpp_report *message;
 	int ret, max_count;
+	u8 report_id;

-	/* Send as long report if short reports are not supported. */
-	if (report_id == REPORT_ID_HIDPP_SHORT &&
-	    !(hidpp_dev->supported_reports &
HIDPP_REPORT_SHORT_SUPPORTED))
+	if (hidpp_dev->supported_reports & HIDPP_REPORT_SHORT_SUPPORTED)
+		report_id = REPORT_ID_HIDPP_SHORT;
+	else
 		report_id = REPORT_ID_HIDPP_LONG;

 	switch (report_id) {
@@ -549,7 +550,6 @@ static int hidpp10_set_register(struct hidpp_device
*hidpp_dev,
 	u8 params[3] = { 0 };

 	ret = hidpp_send_rap_command_sync(hidpp_dev,
-					  REPORT_ID_HIDPP_SHORT,
 					  HIDPP_GET_REGISTER,
 					  register_address,
 					  NULL, 0, &response);
@@ -562,7 +562,6 @@ static int hidpp10_set_register(struct hidpp_device
*hidpp_dev,
 	params[byte] |= value & mask;

 	return hidpp_send_rap_command_sync(hidpp_dev,
-					   REPORT_ID_HIDPP_SHORT,
 					   HIDPP_SET_REGISTER,
 					   register_address,
 					   params, 3, &response);
@@ -658,7 +657,6 @@ static int hidpp10_query_battery_status(struct
hidpp_device *hidpp)
 	int ret, status;

 	ret = hidpp_send_rap_command_sync(hidpp,
-					REPORT_ID_HIDPP_SHORT,
 					HIDPP_GET_REGISTER,
 					HIDPP_REG_BATTERY_STATUS,
 					NULL, 0, &response);
@@ -710,7 +708,6 @@ static int hidpp10_query_battery_mileage(struct
hidpp_device *hidpp)
 	int ret, status;

 	ret = hidpp_send_rap_command_sync(hidpp,
-					REPORT_ID_HIDPP_SHORT,
 					HIDPP_GET_REGISTER,
 					HIDPP_REG_BATTERY_MILEAGE,
 					NULL, 0, &response);
@@ -782,7 +779,6 @@ static char *hidpp_unifying_get_name(struct
hidpp_device *hidpp_dev)
 	int len;

 	ret = hidpp_send_rap_command_sync(hidpp_dev,
-					REPORT_ID_HIDPP_SHORT,
 					HIDPP_GET_LONG_REGISTER,
 					HIDPP_REG_PAIRING_INFORMATION,
 					params, 1, &response);
@@ -816,7 +812,6 @@ static int hidpp_unifying_get_serial(struct
hidpp_device *hidpp, u32 *serial)
 	u8 params[1] = { HIDPP_EXTENDED_PAIRING };

 	ret = hidpp_send_rap_command_sync(hidpp,
-					REPORT_ID_HIDPP_SHORT,
 					HIDPP_GET_LONG_REGISTER,
 					HIDPP_REG_PAIRING_INFORMATION,
 					params, 1, &response);
@@ -900,7 +895,6 @@ static int hidpp_root_get_protocol_version(struct
hidpp_device *hidpp)
 	int ret;

 	ret = hidpp_send_rap_command_sync(hidpp,
-			REPORT_ID_HIDPP_SHORT,
 			HIDPP_PAGE_ROOT_IDX,
 			CMD_ROOT_GET_PROTOCOL_VERSION,
 			ping_data, sizeof(ping_data), &response);
@@ -3180,7 +3174,6 @@ static int m560_send_config_command(struct
hid_device *hdev, bool connected)

 	return hidpp_send_rap_command_sync(
 		hidpp_dev,
-		REPORT_ID_HIDPP_SHORT,
 		M560_SUB_ID,
 		M560_BUTTON_MODE_REGISTER,
 		(u8 *)m560_config_parameter,
@@ -3719,7 +3712,6 @@ static int hidpp_initialize_hires_scroll(struct
hidpp_device *hidpp)
 		struct hidpp_report response;

 		ret = hidpp_send_rap_command_sync(hidpp,
-						  REPORT_ID_HIDPP_SHORT,
 						  HIDPP_GET_REGISTER,

HIDPP_ENABLE_FAST_SCROLL,
 						  NULL, 0, &response);


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: PATCH: Simplify hidpp_send_rap_command_sync calls
  2022-11-10 14:20 PATCH: Simplify hidpp_send_rap_command_sync calls Andreas Bergmeier
@ 2022-11-10 14:33 ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2022-11-10 14:33 UTC (permalink / raw)
  To: Andreas Bergmeier; +Cc: USB mailing list, Benjamin Tissoires

On Thu, Nov 10, 2022 at 03:20:11PM +0100, Andreas Bergmeier wrote:
> Inside function, report_id might get overwritten.
> Only REPORT_ID_HIDPP_SHORT is ever passed in.
> So there seems to be no point in passing report_id in the first place.
> Just directly evaluate which report_id to use in the function itself.
> 
> 
> diff --git a/drivers/hid/hid-logitech-hidpp.c
> b/drivers/hid/hid-logitech-hidpp.c
> index 898691a77a58..20ae7f73ef08 100644
> --- a/drivers/hid/hid-logitech-hidpp.c
> +++ b/drivers/hid/hid-logitech-hidpp.c
> @@ -360,15 +360,16 @@ static int hidpp_send_fap_command_sync(struct
> hidpp_device *hidpp,
>  }
> 
>  static int hidpp_send_rap_command_sync(struct hidpp_device *hidpp_dev,
> -	u8 report_id, u8 sub_id, u8 reg_address, u8 *params, int
> param_count,
> +	u8 sub_id, u8 reg_address, u8 *params, int param_count,
>  	struct hidpp_report *response)
>  {
>  	struct hidpp_report *message;
>  	int ret, max_count;
> +	u8 report_id;
> 
> -	/* Send as long report if short reports are not supported. */
> -	if (report_id == REPORT_ID_HIDPP_SHORT &&
> -	    !(hidpp_dev->supported_reports &
> HIDPP_REPORT_SHORT_SUPPORTED))
> +	if (hidpp_dev->supported_reports & HIDPP_REPORT_SHORT_SUPPORTED)
> +		report_id = REPORT_ID_HIDPP_SHORT;
> +	else
>  		report_id = REPORT_ID_HIDPP_LONG;
> 
>  	switch (report_id) {
> @@ -549,7 +550,6 @@ static int hidpp10_set_register(struct hidpp_device
> *hidpp_dev,
>  	u8 params[3] = { 0 };
> 
>  	ret = hidpp_send_rap_command_sync(hidpp_dev,
> -					  REPORT_ID_HIDPP_SHORT,
>  					  HIDPP_GET_REGISTER,
>  					  register_address,
>  					  NULL, 0, &response);
> @@ -562,7 +562,6 @@ static int hidpp10_set_register(struct hidpp_device
> *hidpp_dev,
>  	params[byte] |= value & mask;
> 
>  	return hidpp_send_rap_command_sync(hidpp_dev,
> -					   REPORT_ID_HIDPP_SHORT,
>  					   HIDPP_SET_REGISTER,
>  					   register_address,
>  					   params, 3, &response);
> @@ -658,7 +657,6 @@ static int hidpp10_query_battery_status(struct
> hidpp_device *hidpp)
>  	int ret, status;
> 
>  	ret = hidpp_send_rap_command_sync(hidpp,
> -					REPORT_ID_HIDPP_SHORT,
>  					HIDPP_GET_REGISTER,
>  					HIDPP_REG_BATTERY_STATUS,
>  					NULL, 0, &response);
> @@ -710,7 +708,6 @@ static int hidpp10_query_battery_mileage(struct
> hidpp_device *hidpp)
>  	int ret, status;
> 
>  	ret = hidpp_send_rap_command_sync(hidpp,
> -					REPORT_ID_HIDPP_SHORT,
>  					HIDPP_GET_REGISTER,
>  					HIDPP_REG_BATTERY_MILEAGE,
>  					NULL, 0, &response);
> @@ -782,7 +779,6 @@ static char *hidpp_unifying_get_name(struct
> hidpp_device *hidpp_dev)
>  	int len;
> 
>  	ret = hidpp_send_rap_command_sync(hidpp_dev,
> -					REPORT_ID_HIDPP_SHORT,
>  					HIDPP_GET_LONG_REGISTER,
>  					HIDPP_REG_PAIRING_INFORMATION,
>  					params, 1, &response);
> @@ -816,7 +812,6 @@ static int hidpp_unifying_get_serial(struct
> hidpp_device *hidpp, u32 *serial)
>  	u8 params[1] = { HIDPP_EXTENDED_PAIRING };
> 
>  	ret = hidpp_send_rap_command_sync(hidpp,
> -					REPORT_ID_HIDPP_SHORT,
>  					HIDPP_GET_LONG_REGISTER,
>  					HIDPP_REG_PAIRING_INFORMATION,
>  					params, 1, &response);
> @@ -900,7 +895,6 @@ static int hidpp_root_get_protocol_version(struct
> hidpp_device *hidpp)
>  	int ret;
> 
>  	ret = hidpp_send_rap_command_sync(hidpp,
> -			REPORT_ID_HIDPP_SHORT,
>  			HIDPP_PAGE_ROOT_IDX,
>  			CMD_ROOT_GET_PROTOCOL_VERSION,
>  			ping_data, sizeof(ping_data), &response);
> @@ -3180,7 +3174,6 @@ static int m560_send_config_command(struct
> hid_device *hdev, bool connected)
> 
>  	return hidpp_send_rap_command_sync(
>  		hidpp_dev,
> -		REPORT_ID_HIDPP_SHORT,
>  		M560_SUB_ID,
>  		M560_BUTTON_MODE_REGISTER,
>  		(u8 *)m560_config_parameter,
> @@ -3719,7 +3712,6 @@ static int hidpp_initialize_hires_scroll(struct
> hidpp_device *hidpp)
>  		struct hidpp_report response;
> 
>  		ret = hidpp_send_rap_command_sync(hidpp,
> -						  REPORT_ID_HIDPP_SHORT,
>  						  HIDPP_GET_REGISTER,
> 
> HIDPP_ENABLE_FAST_SCROLL,
>  						  NULL, 0, &response);
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch is malformed (tabs converted to spaces, linewrapped, etc.)
  and can not be applied.  Please read the file,
  Documentation/email-clients.txt in order to fix this.

- Your patch does not have a Signed-off-by: line.  Please read the
  kernel file, Documentation/SubmittingPatches and resend it after
  adding that line.  Note, the line needs to be in the body of the
  email, before the patch, not at the bottom of the patch or in the
  email signature.


If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: Simplify hidpp_send_rap_command_sync calls
  2022-11-10 14:47 Andreas Bergmeier
  2022-11-11  6:07 ` Greg KH
@ 2022-11-14 14:20 ` Bastien Nocera
  1 sibling, 0 replies; 5+ messages in thread
From: Bastien Nocera @ 2022-11-14 14:20 UTC (permalink / raw)
  To: Andreas Bergmeier, Benjamin Tissoires, USB mailing list, linux-input

On Thu, 2022-11-10 at 15:47 +0100, Andreas Bergmeier wrote:
> Inside function, report_id might get overwritten.
> Only REPORT_ID_HIDPP_SHORT is ever passed in.
> So there seems to be no point in passing report_id in the first
> place.
> Just directly evaluate which report_id to use in the function itself.

Looks good.

Reviewed-by: Bastien Nocera <hadess@hadess.net>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: Simplify hidpp_send_rap_command_sync calls
  2022-11-10 14:47 Andreas Bergmeier
@ 2022-11-11  6:07 ` Greg KH
  2022-11-14 14:20 ` Bastien Nocera
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2022-11-11  6:07 UTC (permalink / raw)
  To: Andreas Bergmeier; +Cc: Benjamin Tissoires, USB mailing list, linux-input

On Thu, Nov 10, 2022 at 03:47:47PM +0100, Andreas Bergmeier wrote:
> Inside function, report_id might get overwritten.
> Only REPORT_ID_HIDPP_SHORT is ever passed in.
> So there seems to be no point in passing report_id in the first place.
> Just directly evaluate which report_id to use in the function itself.
> 
> Signed-off-by: Andreas Bergmeier <abergmeier@gmx.net>
> 
> diff --git a/drivers/hid/hid-logitech-hidpp.c
> b/drivers/hid/hid-logitech-hidpp.c
> index 898691a77a58..20ae7f73ef08 100644
> --- a/drivers/hid/hid-logitech-hidpp.c
> +++ b/drivers/hid/hid-logitech-hidpp.c
> @@ -360,15 +360,16 @@ static int hidpp_send_fap_command_sync(struct
> hidpp_device *hidpp,
>  }
> 
>  static int hidpp_send_rap_command_sync(struct hidpp_device *hidpp_dev,
> -	u8 report_id, u8 sub_id, u8 reg_address, u8 *params, int
> param_count,
> +	u8 sub_id, u8 reg_address, u8 *params, int param_count,
>  	struct hidpp_report *response)
>  {
>  	struct hidpp_report *message;
>  	int ret, max_count;
> +	u8 report_id;
> 
> -	/* Send as long report if short reports are not supported. */
> -	if (report_id == REPORT_ID_HIDPP_SHORT &&
> -	    !(hidpp_dev->supported_reports &
> HIDPP_REPORT_SHORT_SUPPORTED))
> +	if (hidpp_dev->supported_reports & HIDPP_REPORT_SHORT_SUPPORTED)
> +		report_id = REPORT_ID_HIDPP_SHORT;
> +	else
>  		report_id = REPORT_ID_HIDPP_LONG;
> 
>  	switch (report_id) {
> @@ -549,7 +550,6 @@ static int hidpp10_set_register(struct hidpp_device
> *hidpp_dev,
>  	u8 params[3] = { 0 };
> 
>  	ret = hidpp_send_rap_command_sync(hidpp_dev,
> -					  REPORT_ID_HIDPP_SHORT,
>  					  HIDPP_GET_REGISTER,
>  					  register_address,
>  					  NULL, 0, &response);
> @@ -562,7 +562,6 @@ static int hidpp10_set_register(struct hidpp_device
> *hidpp_dev,
>  	params[byte] |= value & mask;
> 
>  	return hidpp_send_rap_command_sync(hidpp_dev,
> -					   REPORT_ID_HIDPP_SHORT,
>  					   HIDPP_SET_REGISTER,
>  					   register_address,
>  					   params, 3, &response);
> @@ -658,7 +657,6 @@ static int hidpp10_query_battery_status(struct
> hidpp_device *hidpp)
>  	int ret, status;
> 
>  	ret = hidpp_send_rap_command_sync(hidpp,
> -					REPORT_ID_HIDPP_SHORT,
>  					HIDPP_GET_REGISTER,
>  					HIDPP_REG_BATTERY_STATUS,
>  					NULL, 0, &response);
> @@ -710,7 +708,6 @@ static int hidpp10_query_battery_mileage(struct
> hidpp_device *hidpp)
>  	int ret, status;
> 
>  	ret = hidpp_send_rap_command_sync(hidpp,
> -					REPORT_ID_HIDPP_SHORT,
>  					HIDPP_GET_REGISTER,
>  					HIDPP_REG_BATTERY_MILEAGE,
>  					NULL, 0, &response);
> @@ -782,7 +779,6 @@ static char *hidpp_unifying_get_name(struct
> hidpp_device *hidpp_dev)
>  	int len;
> 
>  	ret = hidpp_send_rap_command_sync(hidpp_dev,
> -					REPORT_ID_HIDPP_SHORT,
>  					HIDPP_GET_LONG_REGISTER,
>  					HIDPP_REG_PAIRING_INFORMATION,
>  					params, 1, &response);
> @@ -816,7 +812,6 @@ static int hidpp_unifying_get_serial(struct
> hidpp_device *hidpp, u32 *serial)
>  	u8 params[1] = { HIDPP_EXTENDED_PAIRING };
> 
>  	ret = hidpp_send_rap_command_sync(hidpp,
> -					REPORT_ID_HIDPP_SHORT,
>  					HIDPP_GET_LONG_REGISTER,
>  					HIDPP_REG_PAIRING_INFORMATION,
>  					params, 1, &response);
> @@ -900,7 +895,6 @@ static int hidpp_root_get_protocol_version(struct
> hidpp_device *hidpp)
>  	int ret;
> 
>  	ret = hidpp_send_rap_command_sync(hidpp,
> -			REPORT_ID_HIDPP_SHORT,
>  			HIDPP_PAGE_ROOT_IDX,
>  			CMD_ROOT_GET_PROTOCOL_VERSION,
>  			ping_data, sizeof(ping_data), &response);
> @@ -3180,7 +3174,6 @@ static int m560_send_config_command(struct
> hid_device *hdev, bool connected)
> 
>  	return hidpp_send_rap_command_sync(
>  		hidpp_dev,
> -		REPORT_ID_HIDPP_SHORT,
>  		M560_SUB_ID,
>  		M560_BUTTON_MODE_REGISTER,
>  		(u8 *)m560_config_parameter,
> @@ -3719,7 +3712,6 @@ static int hidpp_initialize_hires_scroll(struct
> hidpp_device *hidpp)
>  		struct hidpp_report response;
> 
>  		ret = hidpp_send_rap_command_sync(hidpp,
> -						  REPORT_ID_HIDPP_SHORT,
>  						  HIDPP_GET_REGISTER,
> 
> HIDPP_ENABLE_FAST_SCROLL,
>  						  NULL, 0, &response);
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch is malformed (tabs converted to spaces, linewrapped, etc.)
  and can not be applied.  Please read the file,
  Documentation/email-clients.txt in order to fix this.

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/SubmittingPatches for what needs to be done
  here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* PATCH: Simplify hidpp_send_rap_command_sync calls
@ 2022-11-10 14:47 Andreas Bergmeier
  2022-11-11  6:07 ` Greg KH
  2022-11-14 14:20 ` Bastien Nocera
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Bergmeier @ 2022-11-10 14:47 UTC (permalink / raw)
  To: Benjamin Tissoires, USB mailing list, linux-input

Inside function, report_id might get overwritten.
Only REPORT_ID_HIDPP_SHORT is ever passed in.
So there seems to be no point in passing report_id in the first place.
Just directly evaluate which report_id to use in the function itself.

Signed-off-by: Andreas Bergmeier <abergmeier@gmx.net>

diff --git a/drivers/hid/hid-logitech-hidpp.c
b/drivers/hid/hid-logitech-hidpp.c
index 898691a77a58..20ae7f73ef08 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -360,15 +360,16 @@ static int hidpp_send_fap_command_sync(struct
hidpp_device *hidpp,
 }

 static int hidpp_send_rap_command_sync(struct hidpp_device *hidpp_dev,
-	u8 report_id, u8 sub_id, u8 reg_address, u8 *params, int
param_count,
+	u8 sub_id, u8 reg_address, u8 *params, int param_count,
 	struct hidpp_report *response)
 {
 	struct hidpp_report *message;
 	int ret, max_count;
+	u8 report_id;

-	/* Send as long report if short reports are not supported. */
-	if (report_id == REPORT_ID_HIDPP_SHORT &&
-	    !(hidpp_dev->supported_reports &
HIDPP_REPORT_SHORT_SUPPORTED))
+	if (hidpp_dev->supported_reports & HIDPP_REPORT_SHORT_SUPPORTED)
+		report_id = REPORT_ID_HIDPP_SHORT;
+	else
 		report_id = REPORT_ID_HIDPP_LONG;

 	switch (report_id) {
@@ -549,7 +550,6 @@ static int hidpp10_set_register(struct hidpp_device
*hidpp_dev,
 	u8 params[3] = { 0 };

 	ret = hidpp_send_rap_command_sync(hidpp_dev,
-					  REPORT_ID_HIDPP_SHORT,
 					  HIDPP_GET_REGISTER,
 					  register_address,
 					  NULL, 0, &response);
@@ -562,7 +562,6 @@ static int hidpp10_set_register(struct hidpp_device
*hidpp_dev,
 	params[byte] |= value & mask;

 	return hidpp_send_rap_command_sync(hidpp_dev,
-					   REPORT_ID_HIDPP_SHORT,
 					   HIDPP_SET_REGISTER,
 					   register_address,
 					   params, 3, &response);
@@ -658,7 +657,6 @@ static int hidpp10_query_battery_status(struct
hidpp_device *hidpp)
 	int ret, status;

 	ret = hidpp_send_rap_command_sync(hidpp,
-					REPORT_ID_HIDPP_SHORT,
 					HIDPP_GET_REGISTER,
 					HIDPP_REG_BATTERY_STATUS,
 					NULL, 0, &response);
@@ -710,7 +708,6 @@ static int hidpp10_query_battery_mileage(struct
hidpp_device *hidpp)
 	int ret, status;

 	ret = hidpp_send_rap_command_sync(hidpp,
-					REPORT_ID_HIDPP_SHORT,
 					HIDPP_GET_REGISTER,
 					HIDPP_REG_BATTERY_MILEAGE,
 					NULL, 0, &response);
@@ -782,7 +779,6 @@ static char *hidpp_unifying_get_name(struct
hidpp_device *hidpp_dev)
 	int len;

 	ret = hidpp_send_rap_command_sync(hidpp_dev,
-					REPORT_ID_HIDPP_SHORT,
 					HIDPP_GET_LONG_REGISTER,
 					HIDPP_REG_PAIRING_INFORMATION,
 					params, 1, &response);
@@ -816,7 +812,6 @@ static int hidpp_unifying_get_serial(struct
hidpp_device *hidpp, u32 *serial)
 	u8 params[1] = { HIDPP_EXTENDED_PAIRING };

 	ret = hidpp_send_rap_command_sync(hidpp,
-					REPORT_ID_HIDPP_SHORT,
 					HIDPP_GET_LONG_REGISTER,
 					HIDPP_REG_PAIRING_INFORMATION,
 					params, 1, &response);
@@ -900,7 +895,6 @@ static int hidpp_root_get_protocol_version(struct
hidpp_device *hidpp)
 	int ret;

 	ret = hidpp_send_rap_command_sync(hidpp,
-			REPORT_ID_HIDPP_SHORT,
 			HIDPP_PAGE_ROOT_IDX,
 			CMD_ROOT_GET_PROTOCOL_VERSION,
 			ping_data, sizeof(ping_data), &response);
@@ -3180,7 +3174,6 @@ static int m560_send_config_command(struct
hid_device *hdev, bool connected)

 	return hidpp_send_rap_command_sync(
 		hidpp_dev,
-		REPORT_ID_HIDPP_SHORT,
 		M560_SUB_ID,
 		M560_BUTTON_MODE_REGISTER,
 		(u8 *)m560_config_parameter,
@@ -3719,7 +3712,6 @@ static int hidpp_initialize_hires_scroll(struct
hidpp_device *hidpp)
 		struct hidpp_report response;

 		ret = hidpp_send_rap_command_sync(hidpp,
-						  REPORT_ID_HIDPP_SHORT,
 						  HIDPP_GET_REGISTER,

HIDPP_ENABLE_FAST_SCROLL,
 						  NULL, 0, &response);


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-14 14:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 14:20 PATCH: Simplify hidpp_send_rap_command_sync calls Andreas Bergmeier
2022-11-10 14:33 ` Greg KH
2022-11-10 14:47 Andreas Bergmeier
2022-11-11  6:07 ` Greg KH
2022-11-14 14:20 ` Bastien Nocera

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.