All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: Kurt Schwemmer <kurt.schwemmer@microsemi.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH 2/2] PCI: switchtec: Remove useless assignments in switchtec_dev_read()
Date: Thu, 15 Dec 2022 13:07:49 -0600	[thread overview]
Message-ID: <20221215190749.GA132793@bhelgaas> (raw)
In-Reply-To: <81a72082-94ec-4011-1e54-3b278317a44e@deltatee.com>

On Thu, Dec 15, 2022 at 11:34:06AM -0700, Logan Gunthorpe wrote:
> On 2022-12-15 11:21, Bjorn Helgaas wrote:
> > From: Bjorn Helgaas <bhelgaas@google.com>
> > 
> > Some switchtec_dev_read() error cases assign to "rc", then branch to "out".
> > But the code at "out" never uses "rc".  Drop the useless assignments.  No
> > functional change intended.
> 
> Ah, hmm, yes. I think if copy_to_user() fails, the function should
> probably return -EFAULT. So perhaps an unlock and specific return as is
> done in previous conditions in the same function?

Sure, I'll post a v2 that does that.

      reply	other threads:[~2022-12-15 19:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 18:21 [PATCH 0/2] PCI: switchtec: Trivial cleanups Bjorn Helgaas
2022-12-15 18:21 ` [PATCH 1/2] PCI: switchtec: Simplify switchtec_dma_mrpc_isr() Bjorn Helgaas
2022-12-15 18:26   ` Logan Gunthorpe
2022-12-15 18:21 ` [PATCH 2/2] PCI: switchtec: Remove useless assignments in switchtec_dev_read() Bjorn Helgaas
2022-12-15 18:34   ` Logan Gunthorpe
2022-12-15 19:07     ` Bjorn Helgaas [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=20221215190749.GA132793@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=kurt.schwemmer@microsemi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=logang@deltatee.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.