X86 platform drivers
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <thomas@t-8ch.de>
To: Jorge Lopez <jorgealtxwork@gmail.com>
Cc: hdegoede@redhat.com, platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v6 1/4] Introduction of HP-BIOSCFG driver
Date: Fri, 14 Apr 2023 17:19:50 +0200	[thread overview]
Message-ID: <f87fb773-1dd0-47fb-aa86-e0d4cd0d274d@t-8ch.de> (raw)
In-Reply-To: <CAOOmCE-=cprrpzEz5EOs00K7B=bp1rnrnZY7Ee0a245piioiJQ@mail.gmail.com>

Hi Jorge,

On 2023-04-12 14:37:45-0500, Jorge Lopez wrote:
> On Sun, Apr 2, 2023 at 11:28 AM Thomas Weißschuh <thomas@t-8ch.de> wrote:
> > Instead of passing around integer ids, that all the callees are using to
> > look up some global data, it would be nicer to pass a pointer to the
> > concrete instance struct to work on.
> >
> 
> validate_string_input is part of the defined function
> ATTRIBUTE_PROPERTY_STORE in bioscfg.h (line 457).
> 
> > This makes the code simpler and removes reference to global state all
> > over the place.
> >
> Changing the values from int to pointer will add unnecessary overhead
> since the instance ID is searched only once earlier in the process.

Is this overhead measurable? If it can't be measured and/or does not
make a difference, code clarity should always trump performance.

On the other hand if you think the current way is clearer just keep it
as is.

Thomas

  reply	other threads:[~2023-04-14 15:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 20:10 [PATCH v6 0/4] Introduction of HP-BIOSCFG driver Jorge Lopez
2023-03-09 20:10 ` [PATCH v6 1/4] " Jorge Lopez
2023-04-02 16:28   ` Thomas Weißschuh
2023-04-12 19:37     ` Jorge Lopez
2023-04-14 15:19       ` Thomas Weißschuh [this message]
2023-03-09 20:10 ` [PATCH v6 2/4] Introduction of HP-BIOSCFG driver [2] Jorge Lopez
2023-03-09 20:10 ` [PATCH v6 3/4] Introduction of HP-BIOSCFG driver [3] Jorge Lopez
2023-04-02 17:01   ` Thomas Weißschuh
2023-04-03 20:18     ` Jorge Lopez
2023-04-04 16:32       ` Thomas Weißschuh
2023-04-11 15:45         ` Jorge Lopez
2023-03-09 20:10 ` [PATCH v6 4/4] Introduction of HP-BIOSCFG driver [4] Jorge Lopez
2023-04-01 11:58   ` Thomas Weißschuh
2023-04-02  0:47     ` Mark Pearson
2023-04-03 20:44       ` Jorge Lopez
2023-04-03 16:33     ` Jorge Lopez
2023-04-03 17:30       ` Thomas Weißschuh
2023-04-03 19:33         ` Jorge Lopez

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=f87fb773-1dd0-47fb-aa86-e0d4cd0d274d@t-8ch.de \
    --to=thomas@t-8ch.de \
    --cc=hdegoede@redhat.com \
    --cc=jorgealtxwork@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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