All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: "Simon Richter" <Simon.Richter@hogyros.de>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux Next Mailing List" <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the pci tree
Date: Mon, 30 Mar 2026 11:18:02 -0500	[thread overview]
Message-ID: <20260330161802.GA79047@bhelgaas> (raw)
In-Reply-To: <c1af4c63-185f-4252-b280-bb20ce9047a8@sirena.org.uk>

On Mon, Mar 30, 2026 at 03:51:47PM +0100, Mark Brown wrote:
> On Mon, Mar 30, 2026 at 11:48:58PM +0900, Simon Richter wrote:
> > On 3/30/26 23:06, Mark Brown wrote:
> 
> > > > After merging the pci tree, today's linux-next build (x86_64 allmodconfig)
> > > > failed like this:
> 
> > >> /tmp/next/build/drivers/gpu/drm/i915/display/intel_vga.c:
> > >> In function 'intel_vga_disable':
> > >> /tmp/next/build/drivers/gpu/drm/i915/display/intel_vga.c:68:9: error:
> > ignoring return value of 'vga_get_uninterruptible' declared with attribute
> > 'warn_unused_result' [-Werror=unused-result]
> > >>    68 |         vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
> > >>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> > > This is still present today.
> 
> > The fix for that should have gone in through drm-next. The version where the
> > warning occurs in line 68 is ancient however (that was changed[2] in
> > December).
> 
> The DRM tree is merged into -next after the PCI tree so that's not going
> to work, and in any case your tree really should work independently.

I dropped these these patches from the PCI tree for now, sorry for the
trouble:

  21b082bd2a45 ("PCI/VGA: Mark pci_set_vga_state() as __must_check")
  dc582b5ed4b7 ("PCI/VGA: Mark vga_get() and wrappers as __must_check")

For reference, I'm attaching the patches below.  We can deal with them
later.


commit 21b082bd2a45 ("PCI/VGA: Mark pci_set_vga_state() as __must_check")
Author: Simon Richter <Simon.Richter@hogyros.de>
Date:   Sun Mar 8 02:35:38 2026 +0900

    PCI/VGA: Mark pci_set_vga_state() as __must_check
    
    pci_set_vga_state() can return an error, usually on non-x86 or virtualized
    environments, so mark it as __must_check.
    
    The only caller so far is __vga_tryget() in vgaarb.
    
    Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Link: https://patch.msgid.link/20260307173538.763188-6-Simon.Richter@hogyros.de


diff --git a/include/linux/pci.h b/include/linux/pci.h
index 1c270f1d5123..aa1451d402d1 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1720,8 +1720,8 @@ resource_size_t pcibios_window_alignment(struct pci_bus *bus,
 #define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0)
 #define PCI_VGA_STATE_CHANGE_DECODES (1 << 1)
 
-int pci_set_vga_state(struct pci_dev *pdev, bool decode,
-		      unsigned int command_bits, u32 flags);
+int __must_check pci_set_vga_state(struct pci_dev *pdev, bool decode,
+				   unsigned int command_bits, u32 flags);
 
 /*
  * Virtual interrupts allow for more interrupts to be allocated
commit dc582b5ed4b7 ("PCI/VGA: Mark vga_get() and wrappers as __must_check")
Author: Simon Richter <Simon.Richter@hogyros.de>
Date:   Sun Mar 8 02:35:36 2026 +0900

    PCI/VGA: Mark vga_get() and wrappers as __must_check
    
    The vga_get() function and the two wrappers vga_get_interruptible() and
    vga_get_uninterruptible() can return errors. As these are paired with
    vga_put(), which must only be called after vga_get() returned success, all
    callers need to check the return code.
    
    Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Link: https://patch.msgid.link/20260307173538.763188-4-Simon.Richter@hogyros.de


diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
index 97129a1bbb7d..eed524c67c22 100644
--- a/include/linux/vgaarb.h
+++ b/include/linux/vgaarb.h
@@ -27,7 +27,8 @@ struct pci_dev;
 
 #ifdef CONFIG_VGA_ARB
 void vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes);
-int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible);
+int __must_check vga_get(struct pci_dev *pdev, unsigned int rsrc,
+			 int interruptible);
 void vga_put(struct pci_dev *pdev, unsigned int rsrc);
 struct pci_dev *vga_default_device(void);
 void vga_set_default_device(struct pci_dev *pdev);
@@ -39,8 +40,8 @@ static inline void vga_set_legacy_decoding(struct pci_dev *pdev,
 		unsigned int decodes)
 {
 };
-static inline int vga_get(struct pci_dev *pdev, unsigned int rsrc,
-		int interruptible)
+static inline int __must_check vga_get(struct pci_dev *pdev, unsigned int rsrc,
+				       int interruptible)
 {
 	return 0;
 }
@@ -74,8 +75,8 @@ static inline int vga_client_register(struct pci_dev *pdev,
  *
  * On success, release the VGA resource again with vga_put().
  */
-static inline int vga_get_interruptible(struct pci_dev *pdev,
-					unsigned int rsrc)
+static inline int __must_check vga_get_interruptible(struct pci_dev *pdev,
+						     unsigned int rsrc)
 {
 	return vga_get(pdev, rsrc, 1);
 }
@@ -89,8 +90,8 @@ static inline int vga_get_interruptible(struct pci_dev *pdev,
  *
  * On success, release the VGA resource again with vga_put().
  */
-static inline int vga_get_uninterruptible(struct pci_dev *pdev,
-					  unsigned int rsrc)
+static inline int __must_check vga_get_uninterruptible(struct pci_dev *pdev,
+						       unsigned int rsrc)
 {
 	return vga_get(pdev, rsrc, 0);
 }

  reply	other threads:[~2026-03-30 16:18 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-27 20:41 linux-next: build failure after merge of the pci tree Mark Brown
2026-03-30 14:06 ` Mark Brown
2026-03-30 14:48   ` Simon Richter
2026-03-30 14:51     ` Mark Brown
2026-03-30 16:18       ` Bjorn Helgaas [this message]
2026-03-30 14:53   ` [PATCH 1/1] drm/i915: handle failure from vga_get_uninterruptible() Simon Richter
  -- strict thread matches above, loose matches on Subject: below --
2024-11-07 12:02 linux-next: build failure after merge of the pci tree Stephen Rothwell
2024-11-07 12:07 ` Manivannan Sadhasivam
2024-11-07 13:13   ` Bjorn Helgaas
2024-07-01  3:01 Stephen Rothwell
2024-07-01 20:19 ` Krzysztof Wilczyński
2024-07-03  1:03   ` Krzysztof Wilczyński
2023-10-24  5:14 Stephen Rothwell
2023-10-24 11:01 ` Ilpo Järvinen
2023-10-23  0:05 Stephen Rothwell
2023-10-23  7:30 ` Yoshihiro Shimoda
2023-10-23  7:34   ` Krzysztof Wilczyński
2023-10-23  9:36     ` Yoshihiro Shimoda
2023-10-23 12:56       ` Krzysztof Wilczyński
2023-10-06  0:56 Stephen Rothwell
2023-10-06  1:23 ` Mario Limonciello
2023-10-06 14:11 ` Bjorn Helgaas
2023-01-15 22:53 Stephen Rothwell
2023-01-18 21:34 ` Bjorn Helgaas
2021-11-04 22:56 Stephen Rothwell
2021-10-17 22:55 Stephen Rothwell
2021-10-18 14:26 ` Bjorn Helgaas
2021-10-10 23:12 Stephen Rothwell
2021-10-11  5:37 ` Manivannan Sadhasivam
2021-10-11 11:22   ` Lorenzo Pieralisi
2020-08-03  1:36 Stephen Rothwell
2020-07-22  1:39 Stephen Rothwell
2020-03-13  1:54 Stephen Rothwell
2020-03-09 23:07 Stephen Rothwell
2020-03-10 19:10 ` Bjorn Helgaas
2019-08-30  3:23 Stephen Rothwell
2019-08-30 12:30 ` Bjorn Helgaas
2019-08-31  4:21   ` Vidya Sagar
2019-08-31  8:49     ` Lorenzo Pieralisi
2019-08-31 14:40       ` Bjorn Helgaas
2019-08-31 16:49       ` Vidya Sagar
2018-09-26  5:00 Stephen Rothwell
2018-09-26 14:25 ` Keith Busch
2018-09-26 14:58   ` Keith Busch
2018-09-26 19:48     ` Bjorn Helgaas
2018-09-26 21:27       ` Stephen Rothwell
2018-03-26  1:31 Stephen Rothwell
2018-03-26 19:53 ` Bjorn Helgaas
2018-03-27 16:53   ` Rob Herring
2018-01-31 23:51 Stephen Rothwell
2018-02-01  8:56 ` Niklas Cassel
2018-02-01 11:10   ` Lorenzo Pieralisi
2018-02-01 11:16     ` Niklas Cassel
2018-02-01 11:22       ` Kishon Vijay Abraham I
2018-02-01 11:29         ` Niklas Cassel
2018-02-01 19:00   ` Bjorn Helgaas
2018-02-01 21:13     ` Stephen Rothwell
2018-01-25  5:49 Stephen Rothwell
2018-01-25 13:55 ` Rob Herring
2018-01-25 14:58   ` Bjorn Helgaas
2018-01-29  4:41   ` Michael Ellerman
2016-04-26  1:13 Stephen Rothwell
2016-04-26 10:05 ` Joerg Roedel
2016-04-22  0:48 Stephen Rothwell
2016-01-11  1:42 Stephen Rothwell
2016-01-11  6:34 ` Bjorn Helgaas
2015-11-01 15:23 Stephen Rothwell
2015-11-02  0:00 ` Ley Foon Tan
2015-11-02  0:00   ` Ley Foon Tan
2015-11-02 18:12   ` Bjorn Helgaas
2015-11-03  8:02     ` Ley Foon Tan
2015-11-02  0:09 ` Ley Foon Tan
2015-11-02  0:09   ` Ley Foon Tan
2014-06-11  2:02 Stephen Rothwell
2014-06-11  2:23 ` Bjorn Helgaas
2014-05-22  4:09 Stephen Rothwell
2014-05-22  6:49 ` Sebastian Ott
2014-05-22 16:58   ` Bjorn Helgaas
2012-11-06  0:27 Stephen Rothwell
2012-11-06  1:55 ` Greg Kroah-Hartman
2012-11-06  2:09   ` Stephen Rothwell
2012-11-06 22:01 ` Bjorn Helgaas
2012-09-11  1:29 Stephen Rothwell
2012-09-11  1:29 ` Stephen Rothwell
2012-09-11  1:29 ` Stephen Rothwell
2012-09-11 14:28 ` Bjorn Helgaas
2012-09-11 14:28   ` Bjorn Helgaas
2012-02-13  2:21 Stephen Rothwell
2012-02-14 16:45 ` Jesse Barnes
2011-12-06  0:18 Stephen Rothwell
2011-12-06  3:16 ` Bjorn Helgaas
2011-12-06 17:28   ` Jesse Barnes
2011-10-25 13:44 Stephen Rothwell
2011-10-25 17:14 ` Myron Stowe
2011-10-25 19:58   ` Stephen Rothwell
     [not found] <20110110125411.2f45fd2f.sfr@canb.auug.org.au>
2011-01-11 15:18 ` Narendra_K
2011-01-11 15:18   ` Narendra_K
2011-01-11 23:12   ` Stephen Rothwell
2011-01-11 23:12     ` Stephen Rothwell
2010-10-18  2:20 Stephen Rothwell
2010-10-18  3:02 ` Jesse Barnes
2010-02-09  0:54 Stephen Rothwell
2010-02-09 16:27 ` Bjorn Helgaas

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=20260330161802.GA79047@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=Simon.Richter@hogyros.de \
    --cc=bhelgaas@google.com \
    --cc=broonie@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@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.