From: Dan Carpenter <dan.carpenter@oracle.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Martin Kepplinger <martin.kepplinger@puri.sm>,
shawnguo@kernel.org, devicetree@vger.kernel.org,
festevam@gmail.com, kernel@pengutronix.de, kernel@puri.sm,
krzk@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-imx@nxp.com, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
m.felsch@pengutronix.de, mchehab@kernel.org,
phone-devel@vger.kernel.org, robh@kernel.org,
slongerbeam@gmail.com
Subject: Re: [PATCH v8 2/3] media: imx: add a driver for i.MX8MQ mipi csi rx phy and controller
Date: Mon, 26 Jul 2021 14:37:11 +0300 [thread overview]
Message-ID: <20210726113711.GI1931@kadam> (raw)
In-Reply-To: <YPtNQG8/+O+OfoU6@pendragon.ideasonboard.com>
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);
}
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Martin Kepplinger <martin.kepplinger@puri.sm>,
shawnguo@kernel.org, devicetree@vger.kernel.org,
festevam@gmail.com, kernel@pengutronix.de, kernel@puri.sm,
krzk@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-imx@nxp.com, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
m.felsch@pengutronix.de, mchehab@kernel.org,
phone-devel@vger.kernel.org, robh@kernel.org,
slongerbeam@gmail.com
Subject: Re: [PATCH v8 2/3] media: imx: add a driver for i.MX8MQ mipi csi rx phy and controller
Date: Mon, 26 Jul 2021 14:37:11 +0300 [thread overview]
Message-ID: <20210726113711.GI1931@kadam> (raw)
In-Reply-To: <YPtNQG8/+O+OfoU6@pendragon.ideasonboard.com>
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);
}
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-07-26 11:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-23 10:12 [PATCH v8 0/3] media: imx: add support for imx8mq MIPI RX Martin Kepplinger
2021-07-23 10:12 ` Martin Kepplinger
2021-07-23 10:12 ` [PATCH v8 1/3] dt-bindings: media: document the nxp,imx8mq-mipi-csi2 receiver phy and controller Martin Kepplinger
2021-07-23 10:12 ` [PATCH v8 1/3] dt-bindings: media: document the nxp, imx8mq-mipi-csi2 " Martin Kepplinger
2021-07-23 10:12 ` [PATCH v8 2/3] media: imx: add a driver for i.MX8MQ mipi csi rx " Martin Kepplinger
2021-07-23 10:12 ` Martin Kepplinger
2021-07-23 22:50 ` kernel test robot
2021-07-23 22:50 ` kernel test robot
2021-07-23 22:50 ` kernel test robot
2021-07-23 23:14 ` Laurent Pinchart
2021-07-23 23:14 ` Laurent Pinchart
2021-07-26 11:37 ` Dan Carpenter [this message]
2021-07-26 11:37 ` Dan Carpenter
2021-07-23 10:12 ` [PATCH v8 3/3] arm64: dts: imx8mq: add mipi csi phy and csi bridge descriptions Martin Kepplinger
2021-07-23 10:12 ` Martin Kepplinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210726113711.GI1931@kadam \
--to=dan.carpenter@oracle.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kernel@puri.sm \
--cc=krzk@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=m.felsch@pengutronix.de \
--cc=martin.kepplinger@puri.sm \
--cc=mchehab@kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=shawnguo@kernel.org \
--cc=slongerbeam@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.