From: Johan Hedberg <johan.hedberg@gmail.com>
To: Frederic Danis <frederic.danis@linux.intel.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/4] adapter: Convert storage aliases
Date: Wed, 14 Nov 2012 13:11:40 +0200 [thread overview]
Message-ID: <20121114111140.GA8393@x220> (raw)
In-Reply-To: <50A37AC7.1090009@linux.intel.com>
Hi Frederic,
On Wed, Nov 14, 2012, Frederic Danis wrote:
> On 14/11/2012 11:45, Johan Hedberg wrote:
> >Hi Frederic,
> >
> >On Wed, Nov 14, 2012, Frédéric Danis wrote:
> >> #define SETTINGS_PATH STORAGEDIR "/%s/settings"
> >> #define CACHE_PATH STORAGEDIR "/%s/cache/%s"
> >>+#define DEVICE_INFO_PATH STORAGEDIR "/%s/%s/info"
> >
> >Why do you have these separate defines? Do you need them in multiple
> >places? The define names are longer than the actual values and you're
> >just obfuscating the actual call that uses them (since you need to look
> >in two places to figure out of the format parameters are actually
> >matching the format string). So please don't use these.
> >
>
> CACHE_PATH and DEVICE_INFO_PATH are only used in one place, so they
> can be removed.
>
> SETTINGS_PATH is used in both store_adapter_info() and
> load_config(), so I think it is better to keep it.
I'd still just duplicate it in both places for readability. These
locations will be static at least for the entire 5.x series and maybe
longer.
Johan
prev parent reply other threads:[~2012-11-14 11:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 10:16 [PATCH 1/4] adapter: Convert storage aliases Frédéric Danis
2012-11-14 10:16 ` [PATCH 2/4] device: Use new storage for device alias Frédéric Danis
2012-11-14 10:16 ` [PATCH 3/4] adapter: Convert storage trusts Frédéric Danis
2012-11-14 10:16 ` [PATCH 4/4] device: Use new storage for device trust Frédéric Danis
2012-11-14 10:45 ` [PATCH 1/4] adapter: Convert storage aliases Johan Hedberg
2012-11-14 11:04 ` Frederic Danis
2012-11-14 11:11 ` Johan Hedberg [this message]
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=20121114111140.GA8393@x220 \
--to=johan.hedberg@gmail.com \
--cc=frederic.danis@linux.intel.com \
--cc=linux-bluetooth@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;
as well as URLs for NNTP newsgroup(s).