Thread (7 messages) 7 messages, 4 authors, 2021-07-26

Re: [PATCH v8 2/3] media: imx: add a driver for i.MX8MQ mipi csi rx phy and controller

flat view

From: Dan Carpenter <hidden>
Date: 2021-07-26 11:38:01
Also in: linux-devicetree, linux-media, linux-staging, lkml, phone-devel

On Sat, Jul 24, 2021 at 02:14:08AM +0300, Laurent Pinchart wrote:
quoted
+static int imx8mq_mipi_csi_calc_hs_settle(struct csi_state *state)
+{
+	s64 link_freq;
+	u32 lane_rate;
+	u32 esc_clk_rate = 0;
This should be an unsigned long.
I have created a Smatch check for this.

regards,
dan carpenter

#include "smatch.h"
#include "smatch_slist.h"

static int my_id;

static void check_type(struct expression *expr, const char *name, struct symbol *sym, void *data)
{
	struct symbol *type = data;
	int bits;

	if (!expr || expr->type != EXPR_ASSIGNMENT)
		return;

	bits = type_bits(get_type(expr->left));
	if (bits >= type_bits(type))
		return;
	sm_msg("wrong type for '%s' (should be '%s')", name, type_to_str(type));
}

void check_clk_get_rate_returns_ul(int id)
{
	my_id = id;

	add_function_param_key_hook("clk_get_rate", &check_type, -1, "$", &ulong_ctype);
}


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help