From nobody Mon May 23 16:40:37 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3915A1B38212; Mon, 23 May 2022 16:40:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L6NP2198lz3C7p; Mon, 23 May 2022 16:40:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653324038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FS0Cv9LnWr1e6gHqz5UdXkZH6bXx4mJ6/Y30JAnvPDs=; b=jKItRzF5CwCZWW7QgAOxVJwRnmSamCB/WNg6JsFT3Lc0MQq6QMpab8M0c4irYs7rwWk5mB jIm1QZ54Yu2Ak2MgSmfk48JxFOV4rmRNLtmvIx9Mbt8Luj/u4eZU3ogcuI3KcRnplMxwhm nlwZMbgDAB+wXvRvTny4vMmttPV+GoolFnG1d9cawyYy2lQ4GBzO0/eCyuJCS1kIG3d6Ls GtqFuplAzbB2qOuJQ47Q4aLxfaKxJ7gTW1OwWn2fKZQ1Ipa6+V2GRa0XZsDk2qYNDKxuTD bIQnAOYXWRqDcownp9CFGvFKfPY/fG+xfBZqiTnE3VIPnGLMHDPPLsF+tOo5qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0836812FF1; Mon, 23 May 2022 16:40:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24NGebIj047735; Mon, 23 May 2022 16:40:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24NGebGH047734; Mon, 23 May 2022 16:40:37 GMT (envelope-from git) Date: Mon, 23 May 2022 16:40:37 GMT Message-Id: <202205231640.24NGebGH047734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: c3147104fddd - main - Error is not a bool in bcm2838_pci, check for != 0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3147104fdddb5cb358726888a0a612439d10f9e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653324038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FS0Cv9LnWr1e6gHqz5UdXkZH6bXx4mJ6/Y30JAnvPDs=; b=rh6mUkf6WPUw3InjI8xXg9Dm29ZUhfwKalULcU4a5TDLm7gXDwjuN+gZlkty6mfKu2K4X1 /l52e+57sJ//qdIWNPj1hZlAlLkvtVlRosEj9AXjst2kbbVYcQnb8L3Ajfs5KSp3jUtBYf C/eKK6DRbQX3j8ND5gKmyG1Ms2YY+9p0OHI5Cxbmk6dSb+sl+1GtuyeCBwBCGBaGjG4CXu x7dyCIfAsJLLpbuNeT+LA8ELrcN0v6Yue+8PYxa0vZRfiper9fVHceVRikQdvQDbPgkcEx PlIma7eUVnuDG1ojrJYIhhPLVtLcRYP9WpcJDKNvyXLYPCcZcFoVhPlLxZh+gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653324038; a=rsa-sha256; cv=none; b=T09kL73nMICSrZ+ZkIjI5fXB6dp+/Vn1Ugor4NOIxFj733zVKW7+11dZKw2zYW9IYAjbVP 6Qzsn/ttHHZD3VG0BaQaGeS3qOnC8EMNA0tCLkE/u9f6ZqQt8JUy48SXbv+rgNfF0h8p8e wuntBHLDkwSEwWMVXLEVyAIRKjG5wl7GO8UP8rG2xc4uzH9cep1b5b2TlHHruwXgTV9+fX U43QXak/xlO3bAJwHp7U2Icu4aL1NWvpKaZN+SWkcP8xwvlQiVW/GMW8eYqlYGeSB3vy6g UbJxW8I7k4TzH/tQ7gxYSOHSvXVStFibv+3klg0lF3A9W+9g7wWc2KxYhHPNew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c3147104fdddb5cb358726888a0a612439d10f9e commit c3147104fdddb5cb358726888a0a612439d10f9e Author: Andrew Turner AuthorDate: 2022-05-23 16:38:18 +0000 Commit: Andrew Turner CommitDate: 2022-05-23 16:38:18 +0000 Error is not a bool in bcm2838_pci, check for != 0 Fix for style an check if error != 0 in the bcm2838 pci driver. Sponsored by: The FreeBSD Foundation --- sys/arm/broadcom/bcm2835/bcm2838_pci.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2838_pci.c b/sys/arm/broadcom/bcm2835/bcm2838_pci.c index 7c5fd8d787b6..dee90a4532bc 100644 --- a/sys/arm/broadcom/bcm2835/bcm2838_pci.c +++ b/sys/arm/broadcom/bcm2835/bcm2838_pci.c @@ -534,7 +534,7 @@ bcm_pcib_msi_attach(device_t dev) error = bus_setup_intr(dev, sc->msi_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, bcm_pcib_msi_intr, NULL, sc, &sc->msi_intr_cookie); - if (error) { + if (error != 0) { device_printf(dev, "error: failed to setup MSI handler.\n"); return (ENXIO); } @@ -544,7 +544,7 @@ bcm_pcib_msi_attach(device_t dev) sc->msi_isrcs[i].irq = i; error = intr_isrc_register(&sc->msi_isrcs[i].isrc, dev, 0, "%s,%u", bcm_name, i); - if (error) { + if (error != 0) { device_printf(dev, "error: failed to register interrupt %d.\n", i); return (ENXIO); @@ -556,7 +556,7 @@ bcm_pcib_msi_attach(device_t dev) OF_device_register_xref(xref, dev); error = intr_msi_register(dev, xref); - if (error) + if (error != 0) return (ENXIO); mtx_init(&sc->msi_mtx, "bcm_pcib: msi_mtx", NULL, MTX_DEF); @@ -651,15 +651,15 @@ bcm_pcib_attach(device_t dev) 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ &sc->dmat); - if (error) + if (error != 0) return (error); error = pci_host_generic_setup_fdt(dev); - if (error) + if (error != 0) return (error); error = bcm_pcib_check_ranges(dev); - if (error) + if (error != 0) return (error); mtx_init(&sc->config_mtx, "bcm_pcib: config_mtx", NULL, MTX_DEF); @@ -743,7 +743,7 @@ bcm_pcib_attach(device_t dev) /* Configure interrupts. */ error = bcm_pcib_msi_attach(dev); - if (error) + if (error != 0) return (error); /* Done. */