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>] [day] [month] [year] [list]
Message-ID: <20200824133628.GA192024@roeck-us.net>
Date:   Mon, 24 Aug 2020 06:36:28 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Xiao.MX.Ma 馬驍 <Xiao.MX.Ma@...taww.com>
Cc:     "jdelvare@...e.com" <jdelvare@...e.com>,
        "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [PATCH] hwmon/pmbus/delta:new driver for Delta modules
 Q54SJ108A2 The driver is used for Q54SJ108A2 series of Delta. Signed-off-by:
 xiao.mx.ma <734056705@...com>

On Mon, Aug 24, 2020 at 08:51:38AM +0000, Xiao.MX.Ma 馬驍 wrote:
> The driver is used for Q54SJ108A2 series of Delta.
> Signed-off-by: xiao.mx.ma <xiao.mx.ma@...taww.com>

Submission on top of the previous patch instead of a clean v2,
subject still starting with [PATCH]{PATCH], no change log,
delta_read_word_data() and delta_read_byte_data() still as
unnecessary as before, and, worst of all, "is for the sole use
of the intended recipient(s) and may contain confidential and
privileged information" trailer.

I should not even reply to this e-mail. Please study and follow
Documentation/hwmon/submitting-patches.rst and documents referenced
therein before resubmitting.

Thanks,
Guenter

> ---
>  drivers/hwmon/pmbus/Kconfig                   | 18 +++---
>  drivers/hwmon/pmbus/Makefile                  |  2 +-
>  drivers/hwmon/pmbus/{Q54SJ108A2.c => delta.c} | 57 +------------------
>  3 files changed, 12 insertions(+), 65 deletions(-)
>  rename drivers/hwmon/pmbus/{Q54SJ108A2.c => delta.c} (83%)
> 
> diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
> index b4bd6ac491c8..9057459bc31d 100644
> --- a/drivers/hwmon/pmbus/Kconfig
> +++ b/drivers/hwmon/pmbus/Kconfig
> @@ -45,6 +45,15 @@ config SENSORS_BEL_PFE
>     This driver can also be built as a module. If so, the module will
>     be called bel-pfe.
> 
> +config SENSORS_DELTA
> + tristate "Delta Q54SJ108A2"
> + help
> +   If you say yes here you get hardware monitoring support for Delta modules
> +   Q54SJ108A2.
> +
> +   This driver can also be built as a module. If so, the module will
> +   be called delta.
> +
>  config SENSORS_IBM_CFFPS
>   tristate "IBM Common Form Factor Power Supply"
>   depends on LEDS_CLASS
> @@ -209,15 +218,6 @@ config SENSORS_PXE1610
>     This driver can also be built as a module. If so, the module will
>     be called pxe1610.
> 
> -config SENSORS_Q54SJ108A2
> - tristate "Delta Q54SJ108A2"
> - help
> -   If you say yes here you get hardware monitoring support for Delta modules
> -   Q54SJ108A2.
> -
> -   This driver can also be built as a module. If so, the module will
> -   be called Q54SJ108A2.
> -
>  config SENSORS_TPS40422
>   tristate "TI TPS40422"
>   help
> diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile
> index 4536c57ef1a4..7da971e2143c 100644
> --- a/drivers/hwmon/pmbus/Makefile
> +++ b/drivers/hwmon/pmbus/Makefile
> @@ -30,4 +30,4 @@ obj-$(CONFIG_SENSORS_UCD9000) += ucd9000.o
>  obj-$(CONFIG_SENSORS_UCD9200) += ucd9200.o
>  obj-$(CONFIG_SENSORS_XDPE122) += xdpe12284.o
>  obj-$(CONFIG_SENSORS_ZL6100) += zl6100.o
> -obj-$(CONFIG_SENSORS_Q54SJ108A2) += Q54SJ108A2.o
> +obj-$(CONFIG_SENSORS_DELTA) += delta.o
> diff --git a/drivers/hwmon/pmbus/Q54SJ108A2.c b/drivers/hwmon/pmbus/delta.c
> similarity index 83%
> rename from drivers/hwmon/pmbus/Q54SJ108A2.c
> rename to drivers/hwmon/pmbus/delta.c
> index 67fac5506763..ccef5704920f 100644
> --- a/drivers/hwmon/pmbus/Q54SJ108A2.c
> +++ b/drivers/hwmon/pmbus/delta.c
> @@ -40,13 +40,10 @@ enum chips {
>  static int delta_read_word_data(struct i2c_client *client, int page, int phase, int reg)
>  {
>   int ret = 0;
> - u16 temp;
> -
> - temp = pmbus_read_word_data(client, page, phase, reg);
> 
>   switch (reg) {
>   case PMBUS_STATUS_WORD:
> - ret = temp;
> + ret = pmbus_read_word_data(client, page, phase, reg);
>   break;
>   default:
>   ret = -ENODATA;
> @@ -56,30 +53,9 @@ static int delta_read_word_data(struct i2c_client *client, int page, int phase,
> 
>  }
> 
> -static int delta_write_word_data(struct i2c_client *client, int page, int reg, u16 word)
> -{
> - u8 value;
> -
> - switch (reg) {
> - case PMBUS_OPERATION:
> - case PMBUS_WRITE_PROTECT:
> - case PMBUS_VOUT_OV_FAULT_RESPONSE:
> - case PMBUS_IOUT_OC_FAULT_RESPONSE:
> - value = (u8)word;
> - return pmbus_write_byte_data(client, page, reg, value);
> -
> - default:
> - return -ENODATA;
> - }
> -
> -}
> -
>  static int delta_read_byte_data(struct i2c_client *client, int page, int reg)
>  {
>   int ret = 0;
> - u16 temp;
> -
> - temp = pmbus_read_byte_data(client, page, reg);
> 
>   switch (reg) {
>   case PMBUS_OPERATION:
> @@ -93,7 +69,7 @@ static int delta_read_byte_data(struct i2c_client *client, int page, int reg)
>   case PMBUS_STATUS_TEMPERATURE:
>   case PMBUS_STATUS_CML:
>   case PMBUS_REVISION:
> - ret = temp;
> + ret = pmbus_read_byte_data(client, page, reg);
>   break;
> 
>   default:
> @@ -104,20 +80,6 @@ static int delta_read_byte_data(struct i2c_client *client, int page, int reg)
> 
>  }
> 
> -static int delta_write_byte(struct i2c_client *client, int page, u8 value)
> -{
> - switch (value) {
> - case PMBUS_CLEAR_FAULTS:
> - ret = pmbus_write_byte(client, page, PMBUS_CLEAR_FAULTS);
> - break;
> -
> - default:
> - ret = -ENODATA;
> - break;
> - }
> - return ret;
> -}
> -
>  static const struct pmbus_driver_info delta_info[] = {
> 
>  [Q54SJ108A2] = {
> @@ -126,13 +88,8 @@ static const struct pmbus_driver_info delta_info[] = {
> 
>  .read_word_data = delta_read_word_data,
> 
> -.write_word_data = delta_write_word_data,
> -
>  .read_byte_data = delta_read_byte_data,
> 
> -.write_byte = delta_write_byte,
> -
> -
>  /* Source : Delta Q54SJ108A2 */
> 
>  .format[PSC_TEMPERATURE] = linear,
> @@ -160,13 +117,8 @@ PMBUS_HAVE_STATUS_INPUT,
> 
>  .read_word_data = delta_read_word_data,
> 
> -.write_word_data = delta_write_word_data,
> -
>  .read_byte_data = delta_read_byte_data,
> 
> -.write_byte = delta_write_byte,
> -
> -
>  /* Source : Delta Q50SN12050 */
> 
>  .format[PSC_TEMPERATURE] = linear,
> @@ -195,13 +147,8 @@ PMBUS_HAVE_STATUS_INPUT,
> 
>  .read_word_data = delta_read_word_data,
> 
> -.write_word_data = delta_write_word_data,
> -
>  .read_byte_data = delta_read_byte_data,
> 
> -.write_byte = delta_write_byte,
> -
> -
>  /* Source : Delta Q50SN12072 */
> 
>  .format[PSC_TEMPERATURE] = linear,
> --
> 2.20.1
> 
> *************************************************************************
> This email message, including any attachments, is for the sole
> use of the intended recipient(s) and may contain confidential and
> privileged information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient, please
> contact the sender by reply e-mail and destroy all copies of the original
> message. [Delta Electronics, INC. China]
> *************************************************************************

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ