All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-block@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-scsi@vger.kernel.org, dm-devel@redhat.com,
	Satya Tangirala <satyaprateek2357@gmail.com>
Subject: Re: [PATCH 2/5] blk-crypto-fallback: consolidate static variables
Date: Wed, 15 Sep 2021 08:39:53 +0100	[thread overview]
Message-ID: <YUGjSR1g+EH0o2xo@infradead.org> (raw)
In-Reply-To: <20210913013135.102404-3-ebiggers@kernel.org>

On Sun, Sep 12, 2021 at 06:31:32PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> blk-crypto-fallback.c has many static variables with inconsistent names,
> e.g. "blk_crypto_*", "crypto_*", and some unprefixed names.  This is
> confusing.  Consolidate them all into a struct named
> "blk_crypto_fallback" so that it's clear what they are.

I always find this pattern of a single instance global struct rather
confusing.  What is the advantage over just using a consistent prefix?

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-block@vger.kernel.org,
	Satya Tangirala <satyaprateek2357@gmail.com>,
	dm-devel@redhat.com, linux-mmc@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: Re: [dm-devel] [PATCH 2/5] blk-crypto-fallback: consolidate static variables
Date: Wed, 15 Sep 2021 08:39:53 +0100	[thread overview]
Message-ID: <YUGjSR1g+EH0o2xo@infradead.org> (raw)
In-Reply-To: <20210913013135.102404-3-ebiggers@kernel.org>

On Sun, Sep 12, 2021 at 06:31:32PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> blk-crypto-fallback.c has many static variables with inconsistent names,
> e.g. "blk_crypto_*", "crypto_*", and some unprefixed names.  This is
> confusing.  Consolidate them all into a struct named
> "blk_crypto_fallback" so that it's clear what they are.

I always find this pattern of a single instance global struct rather
confusing.  What is the advantage over just using a consistent prefix?

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


  reply	other threads:[~2021-09-15  7:40 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  1:31 [PATCH 0/5] blk-crypto cleanups Eric Biggers
2021-09-13  1:31 ` [dm-devel] " Eric Biggers
2021-09-13  1:31 ` [PATCH 1/5] blk-crypto-fallback: properly prefix function and struct names Eric Biggers
2021-09-13  1:31   ` [dm-devel] " Eric Biggers
2021-09-15  7:36   ` Christoph Hellwig
2021-09-15  7:36     ` [dm-devel] " Christoph Hellwig
2021-09-13  1:31 ` [PATCH 2/5] blk-crypto-fallback: consolidate static variables Eric Biggers
2021-09-13  1:31   ` [dm-devel] " Eric Biggers
2021-09-15  7:39   ` Christoph Hellwig [this message]
2021-09-15  7:39     ` Christoph Hellwig
2021-09-15 17:50     ` Eric Biggers
2021-09-15 17:50       ` [dm-devel] " Eric Biggers
2021-09-16  7:39       ` Christoph Hellwig
2021-09-16  7:39         ` [dm-devel] " Christoph Hellwig
2021-09-16 17:28         ` Eric Biggers
2021-09-16 17:28           ` Eric Biggers
2021-09-13  1:31 ` [PATCH 3/5] blk-crypto: rename keyslot-manager files to blk-crypto-profile Eric Biggers
2021-09-13  1:31   ` [dm-devel] " Eric Biggers
2021-09-14  9:04   ` Ulf Hansson
2021-09-14  9:04     ` [dm-devel] " Ulf Hansson
2021-09-15  7:45   ` Christoph Hellwig
2021-09-15  7:45     ` [dm-devel] " Christoph Hellwig
2021-09-15 17:40     ` Eric Biggers
2021-09-15 17:40       ` [dm-devel] " Eric Biggers
2021-09-16  7:42       ` Christoph Hellwig
2021-09-16  7:42         ` [dm-devel] " Christoph Hellwig
2021-09-13  1:31 ` [PATCH 4/5] blk-crypto: rename blk_keyslot_manager to blk_crypto_profile Eric Biggers
2021-09-13  1:31   ` [dm-devel] " Eric Biggers
2021-09-14  9:04   ` Ulf Hansson
2021-09-14  9:04     ` [dm-devel] " Ulf Hansson
2021-09-14 21:52   ` Eric Biggers
2021-09-14 21:52     ` [dm-devel] " Eric Biggers
2021-09-13  1:31 ` [PATCH 5/5] blk-crypto: update inline encryption documentation Eric Biggers
2021-09-13  1:31   ` [dm-devel] " Eric Biggers

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=YUGjSR1g+EH0o2xo@infradead.org \
    --to=hch@infradead.org \
    --cc=dm-devel@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=satyaprateek2357@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.