Skip to contentSkip to conversation

drm/tests: Include helpers header

PATCH In review Maxime Ripard 3 participants 10 messages Nov 16, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/tests: Include helpers header

The kunit helpers code weren't including its header, leading to a warning that no previous prototype had been defined for public functions.

Include the matching header to fix the warning.

Fixes 44a3928324e9 ("drm/tests: Add Kunit Helpers")
---
 drivers/gpu/drm/tests/drm_kunit_helpers.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/tests/drm_kunit_helpers.c +2 -0
index d3f0d681b685..dbd8ec24d4be 100644
@@ -5,6 +5,8 @@
 
 #include <linux/device.h>
 
+#include "drm_kunit_helpers.h"
+
 struct kunit_dev {
 	struct drm_device base;
 };
Signature · 1 line
2.38.1
#1 lore raw

PATCH 2/3 drm/tests: helpers: Add module infos

The MODULE_LICENSE macro is missing from the kunit helpers file, thus leading to a build error.

Let's introduce it along with MODULE_AUTHOR.

Fixes 44a3928324e9 ("drm/tests: Add Kunit Helpers")
---
 drivers/gpu/drm/tests/drm_kunit_helpers.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/tests/drm_kunit_helpers.c +3 -0
index dbd8ec24d4be..eea450de7de8 100644
@@ -64,3 +64,6 @@ struct drm_device *drm_kunit_device_init(struct kunit *test, u32 features, char
 
 	return drm;
 }
+
+MODULE_AUTHOR("Maxime Ripard <[email protected]>");
+MODULE_LICENSE("GPL");
Signature · 1 line
2.38.1
Reviewed-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] drm/tests: helpers: Add module infos

Hi Maxime,

Quoted 8 lines · Maxime Ripard

The MODULE_LICENSE macro is missing from the kunit helpers file, thus leading to a build error.

Let's introduce it along with MODULE_AUTHOR.

Fixes 44a3928324e9 ("drm/tests: Add Kunit Helpers")

It would be nice to add the SPDX-License-Identifier tag in the source file as well. Besides that,

Best Regards,
- Maíra Canal

Quoted 15 lines
---
 drivers/gpu/drm/tests/drm_kunit_helpers.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/tests/drm_kunit_helpers.c +3 -0
index dbd8ec24d4be..eea450de7de8 100644
@@ -64,3 +64,6 @@ struct drm_device *drm_kunit_device_init(struct kunit *test, u32 features, char
 
 	return drm;
 }
+
+MODULE_AUTHOR("Maxime Ripard <[email protected]>");
+MODULE_LICENSE("GPL");
#3 lore raw

Re: [PATCH 2/3] drm/tests: helpers: Add module infos

Quoted 6 lines · Maíra Canal

Hi Maxime,

Quoted 3 lines · Maxime Ripard

The MODULE_LICENSE macro is missing from the kunit helpers file, thus leading to a build error.

Quoted 8 lines
Quoted 5 lines

Let's introduce it along with MODULE_AUTHOR.

Fixes 44a3928324e9 ("drm/tests: Add Kunit Helpers")

It would be nice to add the SPDX-License-Identifier tag in the source file as well. Besides that,

It's not just nice, it's basically mandatory to add license boilerplate.

Checkpatch would've warned about this. And actually about a lot of stuff in the series.

(And our CI checkpatch did too, although we don't send the replies to the world, just intel-gfx [1].)

BR,
Jani.

[1] https://lore.kernel.org/r/[email protected]

Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#4 lore raw

Re: [PATCH 2/3] drm/tests: helpers: Add module infos

Quoted 13 lines · Jani Nikula
Quoted 12 lines · Maíra Canal

Hi Maxime,

Quoted 8 lines · Maxime Ripard

The MODULE_LICENSE macro is missing from the kunit helpers file, thus leading to a build error.

Let's introduce it along with MODULE_AUTHOR.

Fixes 44a3928324e9 ("drm/tests: Add Kunit Helpers")
Quoted 7 lines
Quoted 2 lines

It would be nice to add the SPDX-License-Identifier tag in the source file as well. Besides that,

It's not just nice, it's basically mandatory to add license boilerplate.

Checkpatch would've warned about this. And actually about a lot of stuff in the series.

Right, sorry about that. I'll send additional patches to address the issues already in.

Quoted 2 lines

(And our CI checkpatch did too, although we don't send the replies to the world, just intel-gfx [1].)

I'm not sure how helpful it is though if the author is not a recipient of the report

Maxime

#5 lore raw

Re: [PATCH 2/3] drm/tests: helpers: Add module infos

Quoted 22 lines · Maxime Ripard
Quoted 13 lines · Jani Nikula
Quoted 12 lines · Maíra Canal

Hi Maxime,

Quoted 8 lines · Maxime Ripard

The MODULE_LICENSE macro is missing from the kunit helpers file, thus leading to a build error.

Let's introduce it along with MODULE_AUTHOR.

Fixes 44a3928324e9 ("drm/tests: Add Kunit Helpers")
Quoted 7 lines
Quoted 2 lines

It would be nice to add the SPDX-License-Identifier tag in the source file as well. Besides that,

It's not just nice, it's basically mandatory to add license boilerplate.

Checkpatch would've warned about this. And actually about a lot of stuff in the series.

Quoted 8 lines

Right, sorry about that. I'll send additional patches to address the issues already in.

Quoted 2 lines

(And our CI checkpatch did too, although we don't send the replies to the world, just intel-gfx [1].)

I'm not sure how helpful it is though if the author is not a recipient of the report

It actually should be, but I have absolutely no idea why in this case it decided to do

To: "Mateusz Kwiatkowski" <[email protected]>

instead of you. Baffled.

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#6 lore raw

Re: (subset) [PATCH 2/3] drm/tests: helpers: Add module infos

In reply to Maxime Ripard
Quoted 6 lines · Maxime Ripard

The MODULE_LICENSE macro is missing from the kunit helpers file, thus leading to a build error.

Let's introduce it along with MODULE_AUTHOR.

Applied to local tree (tmp).

Thanks!
Maxime

#7 lore raw

PATCH 3/3 firmware: raspberrypi: Fix type assignment

In reply to Maxime Ripard

We silently cast an unsigned int into a __le32 which makes sparse complain. Moreover, we never actually convert endianness between the CPU's and the expected little-endian value. Fix both at once by calling cpu_to_le32().

Fixes 40c31955e4e9 ("firmware: raspberrypi: Provide a helper to query a clock max rate")
---
 include/soc/bcm2835/raspberrypi-firmware.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/soc/bcm2835/raspberrypi-firmware.h +1 -1
index ab955591cb72..73cac8d0287e 100644
@@ -170,7 +170,7 @@ struct rpi_firmware_clk_rate_request {
 
 #define RPI_FIRMWARE_CLK_RATE_REQUEST(_id)	\
 	{					\
-		.id = _id,			\
+		.id = cpu_to_le32(_id),		\
 	}
 
 #if IS_ENABLED(CONFIG_RASPBERRYPI_FIRMWARE)
Signature · 1 line
2.38.1
Reviewed-by on v1 1/3
#8 lore raw
In reply to Maxime Ripard

Hi Maxime,

Quoted 9 lines · Maxime Ripard

The kunit helpers code weren't including its header, leading to a warning that no previous prototype had been defined for public functions.

Include the matching header to fix the warning.

Fixes 44a3928324e9 ("drm/tests: Add Kunit Helpers")

Best Regards,
- Maíra Canal

Quoted 17 lines
---
 drivers/gpu/drm/tests/drm_kunit_helpers.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/tests/drm_kunit_helpers.c +2 -0
index d3f0d681b685..dbd8ec24d4be 100644
@@ -5,6 +5,8 @@
 
 #include <linux/device.h>
 
+#include "drm_kunit_helpers.h"
+
 struct kunit_dev {
 	struct drm_device base;
 };
#9 lore raw

Re: (subset) [PATCH 1/3] drm/tests: Include helpers header

In reply to Maxime Ripard
Quoted 8 lines · Maxime Ripard

The kunit helpers code weren't including its header, leading to a warning that no previous prototype had been defined for public functions.

Include the matching header to fix the warning.

[...]

Applied to local tree (tmp).

Thanks!
Maxime