lkml.org 
[lkml]   [2021]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 2/3] media: imx: add a driver for i.MX8MQ mipi csi rx phy and controller
On Sat, Jul 24, 2021 at 02:14:08AM +0300, Laurent Pinchart wrote:
> > +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);
}

\
 
 \ /
  Last update: 2021-07-26 13:38    [W:0.055 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site