public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: tim.gover@raspberrypi.org, ScottBranden <sbranden@broadcom.com>,
	linux-pci@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, RayJui <rjui@broadcom.com>,
	f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com,
	Stefan Wahren <wahrenst@gmx.net>,
	Greg KH <gregkh@linuxfoundation.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org
Subject: Re: [PATCH v7 2/4] firmware: raspberrypi: Introduce vl805 init routine
Date: Mon, 4 May 2020 17:52:34 -0500	[thread overview]
Message-ID: <20200504225234.GA300024@bjorn-Precision-5520> (raw)
In-Reply-To: <d105712418b93ebce7c0498d05eea77171892366.camel@suse.de>

On Mon, May 04, 2020 at 10:59:29AM +0200, Nicolas Saenz Julienne wrote:
> On Sat, 2020-05-02 at 11:05 +0200, Stefan Wahren wrote:
> > > +	pci_read_config_dword(pdev, VL805_PCI_CONFIG_VERSION_OFFSET, &version);
> > pci_read_config_dword() can fail, we might want to store the return value?
> 
> I planned on doing that, but realised that the vast majority of
> pci_read_config_*() users pass on checking for errors.
> 
> Bjorn, any rule of thumb on when to check for errors here?

Not really.  It *can* fail, for sure.  If it does fail, you normally
get ~0 data, which means you would skip the firmware load, do another
config read (which probably also returns ~0) and print firmware
version ffffffff, and the device probably won't work.

But checking doesn't get you much other than a better error message.

Personally I probably wouldn't bother because it clutters the code so
much for so little benefit.

Bjorn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-05-04 22:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 16:47 [PATCH v7 0/4] USB: pci-quirks: Add Raspberry Pi 4 quirk Nicolas Saenz Julienne
2020-04-29 16:47 ` [PATCH v7 1/4] soc: bcm2835: Add notify xHCI reset property Nicolas Saenz Julienne
2020-04-29 16:47 ` [PATCH v7 2/4] firmware: raspberrypi: Introduce vl805 init routine Nicolas Saenz Julienne
2020-05-02  9:05   ` Stefan Wahren
2020-05-04  8:59     ` Nicolas Saenz Julienne
2020-05-04 19:06       ` Stefan Wahren
2020-05-04 22:52       ` Bjorn Helgaas [this message]
2020-04-29 16:47 ` [PATCH v7 3/4] PCI: brcmstb: Wait for Raspberry Pi's firmware when present Nicolas Saenz Julienne
2020-04-29 16:47 ` [PATCH v7 4/4] USB: pci-quirks: Add Raspberry Pi 4 quirk Nicolas Saenz Julienne

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=20200504225234.GA300024@bjorn-Precision-5520 \
    --to=helgaas@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nsaenzjulienne@suse.de \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=tim.gover@raspberrypi.org \
    --cc=wahrenst@gmx.net \
    /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