Skip to contentSkip to conversation

iio: magnetometer: hid-sensor-magn-3d: prefer 'unsigned int'

PATCH Superseded Joshua Crofts 3 participants 4 messages Apr 19 – Apr 20

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 iio: magnetometer: hid-sensor-magn-3d: prefer 'unsigned int'

Use 'u32' instead of bare 'unsigned' to resolve checkpatch.pl warnings and correct type use as defined in the hid_sensor_hub_callbacks struct.

No functional change.

---
v2:
- changed 'unsigned int' to 'u32' per struct definition

 drivers/iio/magnetometer/hid-sensor-magn-3d.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/magnetometer/hid-sensor-magn-3d.c +3 -3
index c673f9323e..b01dd53eb1 100644
@@ -280,7 +280,7 @@ static const struct iio_info magn_3d_info = {
 
 /* Callback handler to send event after all samples are received and captured */
 static int magn_3d_proc_event(struct hid_sensor_hub_device *hsdev,
-				unsigned usage_id,
+				u32 usage_id,
 				void *priv)
 {
 	struct iio_dev *indio_dev = platform_get_drvdata(priv);
@@ -302,7 +302,7 @@ static int magn_3d_proc_event(struct hid_sensor_hub_device *hsdev,
 
 /* Capture samples in local storage */
 static int magn_3d_capture_sample(struct hid_sensor_hub_device *hsdev,
-				unsigned usage_id,
+				u32 usage_id,
 				size_t raw_len, char *raw_data,
 				void *priv)
 {
@@ -350,7 +350,7 @@ static int magn_3d_parse_report(struct platform_device *pdev,
 				struct hid_sensor_hub_device *hsdev,
 				struct iio_chan_spec **channels,
 				int *chan_count,
-				unsigned usage_id,
+				u32 usage_id,
 				struct magn_3d_state *st)
 {
 	int i;
Signature · 1 line
2.34.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 2 lines · Joshua Crofts

Use 'u32' instead of bare 'unsigned' to resolve checkpatch.pl warnings and correct type use as defined in the hid_sensor_hub_callbacks struct.

"...in the struct hid_sensor_hub_callbacks."

Quoted 1 line

No functional change.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Acked-by on v2 1/1
#2 lore raw
In reply to Joshua Crofts
Quoted 8 lines · Joshua Crofts

Use 'u32' instead of bare 'unsigned' to resolve checkpatch.pl warnings
and correct type use as defined in the hid_sensor_hub_callbacks struct.

No functional change.

Quoted 43 lines

---
v2:
 - changed 'unsigned int' to 'u32' per struct definition

 drivers/iio/magnetometer/hid-sensor-magn-3d.c | 6 +++---

 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/magnetometer/hid-sensor-magn-3d.c +0 -0
index c673f9323e..b01dd53eb1 100644
@@ -280,7 +280,7 @@ static const struct iio_info magn_3d_info = {


 /* Callback handler to send event after all samples are received and captured */
 static int magn_3d_proc_event(struct hid_sensor_hub_device *hsdev,

drivers/iio/magnetometer/hid-sensor-magn-3d.c +1 -1
-				unsigned usage_id,
+				u32 usage_id,

  void *priv)
 {
  struct iio_dev *indio_dev = platform_get_drvdata(priv);

drivers/iio/magnetometer/hid-sensor-magn-3d.c +0 -0
@@ -302,7 +302,7 @@ static int magn_3d_proc_event(struct
 hid_sensor_hub_device *hsdev,


 /* Capture samples in local storage */
 static int magn_3d_capture_sample(struct hid_sensor_hub_device *hsdev,

drivers/iio/magnetometer/hid-sensor-magn-3d.c +1 -1
-				unsigned usage_id,
+				u32 usage_id,

  size_t raw_len, char *raw_data, void *priv)
 {

drivers/iio/magnetometer/hid-sensor-magn-3d.c +1 -1
@@ -350,7 +350,7 @@ static int magn_3d_parse_report(struct
 platform_device *pdev,
  				struct hid_sensor_hub_device *hsdev,
  				struct iio_chan_spec **channels,
  				int *chan_count,
-				unsigned usage_id,
+				u32 usage_id,
  				struct magn_3d_state *st)
  {

  int i;

#3 lore raw
Quoted 11 lines · srinivas pandruvada
Quoted 8 lines · Joshua Crofts

Use 'u32' instead of bare 'unsigned' to resolve checkpatch.pl warnings
and correct type use as defined in the hid_sensor_hub_callbacks struct.

No functional change.

The Subject needs to be adjusted as well.

Quoted 3 lines
Quoted 3 lines

---
v2:
 - changed 'unsigned int' to 'u32' per struct definition

Signature · 2 lines
With Best Regards,
Andy Shevchenko