lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1201202f1205c32b435952f1b1618eea6e93fd5c.camel@mediatek.com>
Date: Tue, 27 Feb 2024 02:41:06 +0000
From: Zhi Mao (毛智) <zhi.mao@...iatek.com>
To: "andy.shevchenko@...il.com" <andy.shevchenko@...il.com>
CC: "heiko@...ech.de" <heiko@...ech.de>, "tomi.valkeinen@...asonboard.com"
	<tomi.valkeinen@...asonboard.com>, "robh+dt@...nel.org" <robh+dt@...nel.org>,
	"yunkec@...omium.org" <yunkec@...omium.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "dan.scally@...asonboard.com"
	<dan.scally@...asonboard.com>, "gerald.loacker@...fvision.net"
	<gerald.loacker@...fvision.net>,
	Shengnan Wang (王圣男)
	<shengnan.wang@...iatek.com>, "hdegoede@...hat.com" <hdegoede@...hat.com>,
	"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
	"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>,
	Yaya Chang (張雅清) <Yaya.Chang@...iatek.com>,
	"mchehab@...nel.org" <mchehab@...nel.org>, "jacopo.mondi@...asonboard.com"
	<jacopo.mondi@...asonboard.com>, "jernej.skrabec@...il.com"
	<jernej.skrabec@...il.com>, "linux-mediatek@...ts.infradead.org"
	<linux-mediatek@...ts.infradead.org>, "bingbu.cao@...el.com"
	<bingbu.cao@...el.com>, "sakari.ailus@...ux.intel.com"
	<sakari.ailus@...ux.intel.com>, Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@...iatek.com>, "10572168@...com"
	<10572168@...com>, "conor+dt@...nel.org" <conor+dt@...nel.org>,
	"hverkuil-cisco@...all.nl" <hverkuil-cisco@...all.nl>,
	"krzysztof.kozlowski+dt@...aro.org" <krzysztof.kozlowski+dt@...aro.org>,
	"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
	"laurent.pinchart@...asonboard.com" <laurent.pinchart@...asonboard.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"angelogioacchino.delregno@...labora.com"
	<angelogioacchino.delregno@...labora.com>, "macromorgan@...mail.com"
	<macromorgan@...mail.com>
Subject: Re: [PATCH v5 2/2] media: i2c: Add GC08A3 image sensor driver

Hi Andy,

Thanks for your review.

On Tue, 2024-02-20 at 17:19 +0200, Andy Shevchenko wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  On Tue, Feb 20, 2024 at 3:47 AM Zhi Mao <zhi.mao@...iatek.com>
> wrote:
> >
> > Add a V4L2 sub-device driver for Galaxycore GC08A3 image sensor.
> 
> ...
> 
> > +#include <asm/unaligned.h>
> 
> Usually asm/* go after linux/*
> 
> > +#include <linux/clk.h>
> > +#include <linux/delay.h>
> > +#include <linux/gpio/consumer.h>
> > +#include <linux/i2c.h>
> > +#include <linux/module.h>
> > +#include <linux/pm_runtime.h>
> > +#include <linux/regulator/consumer.h>
> 
> This looks semi-random.
> For example, _at least_ the array_size.h, bits.h, container_of.h,
> device.h, err.h, mod_devicetable.h, property.h, types.h are missing,
> Please, use IWYU principle.
> 
I have remove some useless header file, refer to some others sensor
driver code(such as gc0a08/gc2145 and imx/ov sensor driver).
As these header files which mentioned above, are included by some other
header files, for example "container_of.h" is included by "media-
entity.h", while "media-entity.h" is inculded by "v4l2-subdev.h", so we
just need include "v4l2-subdev.h" in sensor driver code.

> ...
> 
> > +#define GC08A3_DEFAULT_CLK_FREQ 24000000
> 
> HZ_PER_MHZ ?
> 
fixed in patch:v6
> ...
> 
> > +#define GC08A3_SLEEP_US  2000
> 
> USEC_PER_MSEC ?
> 
fixed in patch:v6
> ...
> 
> > +static const s64 gc08a3_link_freq_menu_items[] = {
> > +       336000000ULL,
> > +       207000000ULL,
> 
> HZ_PER_MHZ ?
> 
fixed in patch:v6
> > +};
> 
> ...
> 
> > +static const struct dev_pm_ops gc08a3_pm_ops = {
> > +       SET_RUNTIME_PM_OPS(gc08a3_power_off, gc08a3_power_on, NULL)
> > +};
> 
> > +               .pm = &gc08a3_pm_ops,
> 
> Use new PM macros (pm_ptr() and friends).
> 
fixed in patch:v6
> -- 
> With Best Regards,
> Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ