From: Dan Carpenter <dan.carpenter@linaro.org>
To: Jorge Lopez <jorgealtxwork@gmail.com>
Cc: hdegoede@redhat.com, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, thomas@t-8ch.de,
ilpo.jarvinen@linux.intel.com
Subject: Re: [PATCH 2/5] hp-bioscfg: Fix memory leaks in ordered_list_elements_from_package
Date: Tue, 1 Aug 2023 08:54:34 +0300 [thread overview]
Message-ID: <0f8c1b87-e211-4ca7-bf92-8fde5bb77cd2@kadam.mountain> (raw)
In-Reply-To: <CAOOmCE_p_QgV0QJZKtYZD+t7Y9MzNOQ9sEkfSM88VoHDUCwdCw@mail.gmail.com>
On Mon, Jul 31, 2023 at 11:35:35AM -0500, Jorge Lopez wrote:
> On Mon, Jul 31, 2023 at 11:16 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> >
> > On Mon, Jul 31, 2023 at 11:03:42AM -0500, Jorge Lopez wrote:
> > > On Thu, Jul 27, 2023 at 1:21 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> > > > 134 int value_len = 0;
> > > > 135 int ret;
> > > > 136 u32 size;
> > > > 137 u32 int_value = 0;
> > > >
> > > > It confused me that it's called int_value when it's not an int. Just
> > > > call it "u32 value = 0;".
> > >
> > > The variable is named int_value when it is not an int because it
> > > stores the value reported by ACPI_TYPE_INTEGER package.
> > > The variable will be renamed to type_int_value;
> >
> > Eep! That's even worse! Just leave it as-is then.
>
> Oops! just send a new patch using type_int_value. Should I change it back?
In order of preference for me, it's "value", "int_value", and
"type_int_value". But it doesn't really matter. I feel there were a
couple bugs like the size vs value_len and re-using the iterator. You
have addressed the real problems so lets not worry about variable names.
Whatever you pick is fine.
regards,
dan carpenter
next prev parent reply other threads:[~2023-08-01 5:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 22:00 [PATCH 0/5] hp-bioscfg: Address memory leaks and uninitialized variable errors Jorge Lopez
2023-07-25 22:00 ` [PATCH 1/5] hp-bioscfg: Fix memory leaks in string_elements_from_package() Jorge Lopez
2023-07-25 22:00 ` [PATCH 2/5] hp-bioscfg: Fix memory leaks in ordered_list_elements_from_package Jorge Lopez
2023-07-27 6:21 ` Dan Carpenter
2023-07-31 16:03 ` Jorge Lopez
2023-07-31 16:16 ` Dan Carpenter
2023-07-31 16:35 ` Jorge Lopez
2023-08-01 5:54 ` Dan Carpenter [this message]
2023-08-01 13:24 ` Jorge Lopez
2023-07-25 22:00 ` [PATCH 3/5] hp-bioscfg: Fix memory leaks in integer_elements_from_package Jorge Lopez
2023-07-25 22:00 ` [PATCH 4/5] hp-bioscfg: Fix memory leaks in enumeration_elements_from_package() Jorge Lopez
2023-07-25 22:00 ` [PATCH 5/5] hp-bioscfg: Fix memory leaks in password_elements_from_package() Jorge Lopez
2023-07-26 14:28 ` [PATCH 0/5] hp-bioscfg: Address memory leaks and uninitialized variable errors Hans de Goede
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=0f8c1b87-e211-4ca7-bf92-8fde5bb77cd2@kadam.mountain \
--to=dan.carpenter@linaro.org \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jorgealtxwork@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=thomas@t-8ch.de \
/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
all inboxes | Powered by JetHome®