All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Nilsson <Jesper.Nilsson@axis.com>
To: "Krzysztof Wilczyński" <kw@linux.com>
Cc: Jesper Nilsson <Jesper.Nilsson@axis.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Rob Herring <robh@kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] PCI: artpec6: Remove local code block from within switch statement
Date: Thu, 1 Jul 2021 23:00:30 +0200	[thread overview]
Message-ID: <20210701210030.GO6299@axis.com> (raw)
In-Reply-To: <20210701204401.1636562-2-kw@linux.com>

On Thu, Jul 01, 2021 at 10:44:01PM +0200, Krzysztof Wilczyński wrote:
> At the moment, the switch statement in the artpec6_pcie_probe() has
> a local code block where the local variable "val" is defined and
> immediately used by the artpec6_pcie_readl() within this local scope.
> 
> This extra code block adds brackets at the same indentation level as the
> switch statement itself which can hinder readability of the code.
> 
> Thus, move the variable "val" declaration and definition at the top of
> the function where other variables are already present, and remove the
> extra code block from within the select statement.  This also is the
> preferred style in the PCI tree.
> 
> Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Krzysztof Wilczyński <kw@linux.com>

Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>


/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- jesper.nilsson@axis.com

  reply	other threads:[~2021-07-01 21:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01 20:44 [PATCH v2 1/2] PCI: artpec6: Remove surplus break statement after return Krzysztof Wilczyński
2021-07-01 20:44 ` [PATCH v2 2/2] PCI: artpec6: Remove local code block from within switch statement Krzysztof Wilczyński
2021-07-01 21:00   ` Jesper Nilsson [this message]
2021-07-01 20:59 ` [PATCH v2 1/2] PCI: artpec6: Remove surplus break statement after return Jesper Nilsson
2021-07-23 15:14 ` Lorenzo Pieralisi

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=20210701210030.GO6299@axis.com \
    --to=jesper.nilsson@axis.com \
    --cc=bhelgaas@google.com \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=robh@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 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.