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: <SG2PR04MB55438F6783F4E91D24938271A102A@SG2PR04MB5543.apcprd04.prod.outlook.com>
Date:   Mon, 24 Jul 2023 02:22:41 +0000
From:   Delphine_CC_Chiu/WYHQ/Wiwynn <Delphine_CC_Chiu@...ynn.com>
To:     Andi Shyti <andi.shyti@...nel.org>
CC:     "patrick@...cx.xyz" <patrick@...cx.xyz>,
        Guenter Roeck <linux@...ck-us.net>,
        Jean Delvare <jdelvare@...e.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
        "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v1 2/2] hwmon: pmbus: Add ltc4286 driver

> -----Original Message-----
> From: Andi Shyti <andi.shyti@...nel.org>
> Sent: Tuesday, April 25, 2023 9:46 PM
> To: Delphine_CC_Chiu/WYHQ/Wiwynn <Delphine_CC_Chiu@...ynn.com>
> Cc: patrick@...cx.xyz; Guenter Roeck <linux@...ck-us.net>; Jean Delvare
> <jdelvare@...e.com>; Rob Herring <robh+dt@...nel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@...aro.org>; linux-i2c@...r.kernel.org;
> linux-hwmon@...r.kernel.org; devicetree@...r.kernel.org;
> linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v1 2/2] hwmon: pmbus: Add ltc4286 driver
> 
>   Security Reminder: Please be aware that this email is sent by an external
> sender.
> 
> Hi Delphine,
> 
> On top of Guenter's comments,
> 
> [...]
> 
> > +config SENSORS_LTC4286
> > +     bool "Linear Technologies LTC4286"
> > +     help
> > +       If you say yes here you get hardware monitoring support for Linear
> > +       Technology LTC4286.
> 
> could you add a couple of words more here?
We will revise as below
       config SENSORS_LTC4286
	        bool "Analog Devices LTC4286"
            help
			  LTC4286 is an integrated solution for hot swap applications that allows 
			  a board to be safely inserted and removed from a live backplane.
			  This chip could be used to monitor voltage, current, ...etc.
              If you say yes here you get hardware monitoring support for Analog
              Devices LTC4286.

> 
> [...]
> 
> > +static int ltc4286_probe(struct i2c_client *client,
> > +                      const struct i2c_device_id *id) {
> > +     int ret;
> > +     u8 block_buffer[I2C_SMBUS_BLOCK_MAX + 1];
> > +     struct device *dev = &client->dev;
> > +     struct pmbus_driver_info *info;
> > +     u32 rsense;
> > +
> > +     ret = i2c_smbus_read_block_data(client, PMBUS_MFR_ID,
> block_buffer);
> > +     if (ret < 0) {
> > +             dev_err(&client->dev, "failed to read manufacturer
> > + id\n");
> 
> you can use dev_err_probe() here:
We will revise as below
dev_err_probe(&client->dev, err, "failed to read manufacturer id\n");

> 
>         return dev_err_probe(&client->dev, err, "failed to read manufacturer
> id\n");
> 
> > +             return ret;
> > +     }
> > +
> > +     /* Refer to ltc4286 datasheet page 20
> > +      * the default manufacturer id is LTC
> > +      */
> > +     if (ret != LTC4286_MFR_ID_SIZE ||
> > +         strncmp(block_buffer, "LTC", LTC4286_MFR_ID_SIZE)) {
> > +             dev_err(&client->dev, "unsupported manufacturer id\n");
> > +             return -ENODEV;
> > +     }
> > +
> > +     ret = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL,
> block_buffer);
> > +     if (ret < 0) {
> > +             dev_err(&client->dev, "failed to read manufacturer
> model\n");
> > +             return ret;
> > +     }
> 
> Is this read really needed?
We use this to check manufacturer model.
And we will add comparison here.
for (mid = ltc4286_id; mid->name[0]; mid++) {
if (!strncasecmp(mid->name, block_buffer, strlen(mid->name)))
	break;
} 

> 
> Andi
> 
> [...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ