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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200615112250.GU16711@paasikivi.fi.intel.com>
Date:   Mon, 15 Jun 2020 14:22:50 +0300
From:   Sakari Ailus <sakari.ailus@...ux.intel.com>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     Bingbu Cao <bingbu.cao@...el.com>, linux-media@...r.kernel.org,
        linux-kernel@...r.kernel.org, tfiga@...omium.org,
        bingbu.cao@...ux.intel.com
Subject: Re: [PATCH] media: ov2740: add NVMEM interface to read customized
 OTP data

Hi Srinivas,

On Mon, Jun 15, 2020 at 10:46:20AM +0100, Srinivas Kandagatla wrote:
> 
> 
> On 15/06/2020 10:29, Sakari Ailus wrote:
> > > +	ret = ov2740_register_nvmem(client);
> > > +	if (ret)
> > > +		dev_err(&client->dev, "register nvmem failed, ret %d\n", ret);
> > > +
> > >   	/*
> > >   	 * Device is already turned on by i2c-core with ACPI domain PM.
> > >   	 * Enable runtime PM and turn off the device.
> > Could you add #ifdefs for CONFIG_NVMEM so this compiles when it's disabled?
> 
> NVMEM already has dummy functions. IMO its better to report an error to user
> as the current code does. This will atleast alert the users of existing
> nvmem provider that has been disabled!
> 
> However with ifdef users have to really look into code to be able to
> understand that there is nvmem provider as part of this driver.

Right, I somehow missed there already were dummy functions for this.

The driver is a camera sensor driver that contains an EEPROM. I'd presume
that not all (or even many) users would care about the EEPROM content so
therefore requiring NVMEM to compile the driver seems unjustified.

Therefore the patch is fine as-is IMO.

-- 
Kind regards,

Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ