mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Ba Jing <bajing@cmss.chinamobile.com>
Cc: jdelvare@suse.com, linux@roeck-us.net,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: abituguru: Remove unused ABITUGURU_TEMP_NAMES_LENGTH macro
Date: Fri, 20 Sep 2024 14:10:32 +0200	[thread overview]
Message-ID: <e893f91f-6f78-46ac-b28d-1e45fab892e2@redhat.com> (raw)
In-Reply-To: <20240903025037.9711-1-bajing@cmss.chinamobile.com>

Hi,

On 3-Sep-24 4:50 AM, Ba Jing wrote:
> The macro ABITUGURU_TEMP_NAMES_LENGTH is never referenced in the code. Remove it.
> 
> Signed-off-by: Ba Jing <bajing@cmss.chinamobile.com>
> ---
>  drivers/hwmon/abituguru.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/hwmon/abituguru.c b/drivers/hwmon/abituguru.c
> index 93653ea05430..58072af4676b 100644
> --- a/drivers/hwmon/abituguru.c
> +++ b/drivers/hwmon/abituguru.c
> @@ -95,11 +95,6 @@
>   * in??_{min,max}_alarm_enable\0, in??_beep\0, in??_shutdown\0
>   */
>  #define ABITUGURU_IN_NAMES_LENGTH	(11 + 2 * 9 + 2 * 15 + 2 * 22 + 10 + 14)
> -/*
> - * sum of strlen of: temp??_input\0, temp??_max\0, temp??_crit\0,
> - * temp??_alarm\0, temp??_alarm_enable\0, temp??_beep\0, temp??_shutdown\0
> - */
> -#define ABITUGURU_TEMP_NAMES_LENGTH	(13 + 11 + 12 + 13 + 20 + 12 + 16)
>  /*
>   * sum of strlen of: fan?_input\0, fan?_min\0, fan?_alarm\0,
>   * fan?_alarm_enable\0, fan?_beep\0, fan?_shutdown\0

ABITUGURU_TEMP_NAMES_LENGTH is used further down buy only in a comment:

/* IN_NAMES_LENGTH > TEMP_NAMES_LENGTH so assume all bank1 sensors are in */
#define ABITUGURU_SYSFS_NAMES_LENGTH    ( \
        ABIT_UGURU_MAX_BANK1_SENSORS * ABITUGURU_IN_NAMES_LENGTH + \
        ABIT_UGURU_MAX_BANK2_SENSORS * ABITUGURU_FAN_NAMES_LENGTH + \
        ABIT_UGURU_MAX_PWMS * ABITUGURU_PWM_NAMES_LENGTH)

So IMHO ABITUGURU_TEMP_NAMES_LENGTH should stay so that someone
reading the comment will actually be able to understand things,
removing ABITUGURU_TEMP_NAMES_LENGTH makes the comment very
hard to understand and we want to keep the comment.

So NACK from me for this change.

Regards,

Hans



  reply	other threads:[~2024-09-20 12:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03  2:50 Ba Jing
2024-09-20 12:10 ` Hans de Goede [this message]
2024-09-20 13:27   ` Guenter Roeck

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=e893f91f-6f78-46ac-b28d-1e45fab892e2@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=bajing@cmss.chinamobile.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome